Skip to content

v2.5.0

Compare
Choose a tag to compare
@tdewolff tdewolff released this 26 Aug 13:52
· 247 commits to master since this release
dfae400
  • Add JS (ECMAScript 2020) lexer and parser.
  • Add parse.Input and use that instead of io.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.