shapesecurity / shift-parser-js

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

Setting property in shorthand illegally causes earlyErrors set as false Test to fail #319

Closed Shilpi3 closed 7 years ago

Shilpi3 commented 7 years ago

script 557 : ({ a = 0 }); earlyErrors : false

Expected: No Exception Actual: Exception ` ../shift-parser-js/dist/parser.js:1069 throw this.firstExprError; ^

Error: [1:4]: Illegal property initializer`

bakkot commented 7 years ago

This is indeed supposed to be an early error, but our AST format can't represent that program. Closing as WONTFIX.