optimize parserlib by ~10%

* add skipValidation option
* set `recoverable:true` on errors inside declarations
This commit is contained in:
tophf 2020-11-25 21:01:36 +03:00
parent e6f94378bf
commit 6d04c0eb7d
2 changed files with 1980 additions and 2830 deletions

View File

@ -18,7 +18,7 @@ function parseMozFormat({code, styleId}) {
'regexp': 'regexps',
};
const hasSingleEscapes = /([^\\]|^)\\([^\\]|$)/;
const parser = new parserlib.css.Parser({starHack: true});
const parser = new parserlib.css.Parser({starHack: true, skipValidation: true});
const sectionStack = [{code: '', start: 0}];
const errors = [];
const sections = [];

File diff suppressed because it is too large Load Diff