You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
f3d392bd1c
JavaScript allows one to skip (elide) elements in array literals. It also allows a trailing comma, which doesn't imply an element elision. For example, an array literal: [,,,] contains three elided elements (one before each comma) and a trailing comma. Example JavaScript parser handled elided elements incorrectly and just threw them away. This commit fixes this behvior and inserts |null| in the AST for each elided element. This is in line with how SpiderMonkey's JavaScript parser (the |Reflect.parse| API), Esprima and Acorn behave. Based on a patch by @fpirsch: https://github.com/dmajda/pegjs/pull/177 |
11 years ago | |
---|---|---|
.. | ||
arithmetics.pegjs | 12 years ago | |
css.pegjs | 12 years ago | |
javascript.pegjs | 11 years ago | |
json.pegjs | 11 years ago |