shapesecurity / shift-parser-js

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

Remove dead state tracking #400

Closed bakkot closed 6 years ago

bakkot commented 6 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.