shapesecurity / shift-parser-js

ECMAScript parser that produces a Shift format AST
http://shift-ast.org/parser.html
Apache License 2.0
248 stars 28 forks source link

ES2016: Accepts trailing commas in arguments lists #398

Closed bakkot closed 5 years ago

bakkot commented 5 years ago

f(a,) parses, but is not valid ES2016. We do not accept function f(a,){} or similar.

Debatable whether this is worth fixing, since it's legal in the next version of the spec, which I am currently working on implementing.

... But I'm gonna fix it anyway. Fix incoming.