Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix this.lexer undefined, fixes #246 #267

Merged
merged 1 commit into from
Aug 18, 2015
Merged

Fix this.lexer undefined, fixes #246 #267

merged 1 commit into from
Aug 18, 2015

Conversation

nolanlawson
Copy link
Contributor

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.

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.
'expressions\n : e EOF\n {return $1;}\n ;\n\n' +
'e\n : phrase+ \'joy\'? -> $1 + \' \' + yytext \n ;\n\n' +
'phrase\n : \'happy\' \'happy\' \'joy\' \'joy\' ' +
' -> [$1, $2, $3, $4].join(\' \'); \n ;';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I actually wrote this just for the test. Fun exercise. :)

@alkhe
Copy link

alkhe commented Mar 8, 2015

+1, can confirm that this fixes #246.

@edi9999
Copy link
Contributor

edi9999 commented May 1, 2015

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

@lukasz-karolewski
Copy link

+1 i confirm it fixes the issue too

@nolanlawson
Copy link
Contributor Author

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

  "jison": "nolanlawson/jison#246"

zaach added a commit that referenced this pull request Aug 18, 2015
Fix this.lexer undefined, fixes #246
@zaach zaach merged commit 494f5e5 into zaach:master Aug 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants