v2.5.0
- Add JS (ECMAScript 2020) lexer and parser.
- Add
parse.Input
and use that instead ofio.Reader
for input to lexers. - Use predefined byte-slices instead of inline ones.
For users, there is a slight breakage of function signatures in this release: instead of calling for example p := css.NewParser(r, false)
you should call
input := parse.NewInput(r)
defer input.Restore()
p := css.NewParser(input, false)
or if the byte-slice behind r
is not used anywhere else (which is generally the case), then you could just call
p := css.NewParser(parse.NewInput(r), false)
This is for all lexers/parsers.