zaach / jison

Bison in JavaScript.
http://jison.org
4.35k stars 448 forks source link

Fix this.lexer undefined, fixes #246 #267

Closed nolanlawson closed 9 years ago

nolanlawson commented 9 years ago

It seems that 9e0cc65 introduced a bug in the generated code, such that this.lexer is undefined, and so it throws a runtime error.

This fixes the bug, and also adds a test to reproduce the error. The test fails before the fix, but succeeds after. I ran the tests and confirmed 100% success and no errors.

alkhe commented 9 years ago

+1, can confirm that this fixes #246.

edi9999 commented 9 years ago

Please merge :-), I'm encountering the same problem

lukasz-karolewski commented 9 years ago

+1 i confirm it fixes the issue too

nolanlawson commented 9 years ago

For anyone who's stuck waiting for a merge, you can add this to your package.json:

  "jison": "nolanlawson/jison#246"