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

Invalid pattern matching throws error with "earlyErrors" set as "false" #316

Closed Shilpi3 closed 7 years ago

Shilpi3 commented 7 years ago

earlyErrors: false

input script 56 : /[a-z]/s input script 641: /./a input script 642: /./ii

Expected: No Exceptions Actual: Exception `.../shift-parser-js/dist/parser.js:1736 throw this.createError("Invalid regular expression flag '" + f + "'"); ^

bakkot commented 7 years ago

Our AST format can't represent regex literals with invalid flags. Closing as WONTFIX.