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

Fix addEach #378

Closed bakkot closed 7 years ago

bakkot commented 7 years ago

377 removed our MultiMap.prototype.addEach shim, since it was marked as dead code. Turns out that was because it was being added by normalize-parser-test, which was being run before any test code; as such, all tests passed, but the package itself was broken.

This patch makes our code stops relying on that prototype being mutated, and does not mutate it itself.

Includes a patch commit, so please rebase, not squash.