parse

Go parsers for web formats

MIT License

Stars
403

Bot releases are hidden (Show)

parse - v2.5.17

Published by tdewolff over 3 years ago

  • JS: add variable scope to switch statement
  • JS: parse async(a) as possible expression or arrow func
  • JS: fix lexical variable renaming for descoped
  • JS: fix import statement/call parsing at module level
parse - v2.5.16

Published by tdewolff over 3 years ago

  • JS: add expression level maximum for expression suffices as well (from fuzz)
parse - v2.5.15

Published by tdewolff over 3 years ago

  • JS: fix import statement/call parsing at module level
parse - v2.5.14

Published by tdewolff over 3 years ago

  • CSS: proper unicode range parsing with wildcards
parse - v2.5.13

Published by tdewolff over 3 years ago

  • JS: accept shebang comments at the start of the file
parse - v2.5.12

Published by tdewolff over 3 years ago

JS: add support for class field definitions (see https://github.com/tc39/proposal-class-fields)

parse - v2.5.11

Published by tdewolff over 3 years ago

JS: add &&= ||= ??= operators

parse - v2.5.10

Published by tdewolff over 3 years ago

  • JS: register directive prologues ("use strict") as a separate statement
parse - v2.5.9

Published by tdewolff over 3 years ago

  • JS: support ellipsis operator anywhere in arguments
parse - v2.5.8

Published by tdewolff over 3 years ago

  • JS: fix declarations with the same name as in the for initializer, see #69
  • JS: fix var declarations not adding their usage in all the scopes between its block scope and the function scope
parse - v2.5.7

Published by tdewolff almost 4 years ago

  • JS: put limits to the number of levels in statements and in expressions
  • JS: fix import/export statements with one element in list
parse - v2.5.6

Published by tdewolff almost 4 years ago

  • JS: fix errors messages that contain % symbols
parse - v2.5.5

Published by tdewolff about 4 years ago

Fix position of error in error context with unicode characters

parse - v2.5.4

Published by tdewolff about 4 years ago

  • JS: add var decl as undeclared in block scopes between the current scope and the function scope, fixes tdewolff/minify#334
parse - v2.5.3

Published by tdewolff about 4 years ago

  • DataURI: encode \r, \n and \t using URL encoding, fixes tdewolff/minify#329
  • DecodeURL: don't decode when percent is followed by non-hexadecimal character
  • JS: remove trailing commas in var [a,,]
  • JS: variable declaration using BindingPattern must be followed by an assignment
  • JS: improve parsing of in operator in for statements and arrow function bodies
parse - v2.5.2

Published by tdewolff about 4 years ago

  • JS: mark number of declared variables in for initializers in Scope
parse - v2.5.1

Published by tdewolff about 4 years ago

  • JS: allow parsing in parameters in group expressions (that couldn't have been an arrow function)
  • JS: store all comments in the head of the document (for license comments)
  • JS: fix parsing identifiers in arrow functions, it used to assume they were part of the parameter list causing nil errors
parse - v2.5.0

Published by tdewolff about 4 years ago

  • 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.

parse - v2.4.4

Published by tdewolff about 4 years ago

Update URLEncodingTable and add DataURIEncodingTable for better URL/URI encoding.

parse - v2.4.3

Published by tdewolff over 4 years ago

  • CSS: fix slow execution of selector with many errors
  • Fix panic on MediaType that ends in a space
  • Fix parsing + or - as integers, and don't parse the exponent if there is no number
  • Fix parsing e as a float
  • Moving hash tables/entities maps to minify repository
  • JS: improved performance