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

Remove dead state tracking #400

Closed bakkot closed 5 years ago

bakkot commented 5 years ago

Every function which modifies allowYieldExpression restores its original state before returning, so these did precisely nothing.

I imagine there used to be (incorrect) this.allowYieldExpression = false statements following the initial previousYield = this.allowYieldExpression which were removed without removing the attendant code.