jison
jison copied to clipboard
TypeError: undefined is not an object (evaluating 'this.yy.parser')
I am using handlebars.js, which uses the lexer of jison in the source code. I found out that an invalid template can crash the library at the lexer generated by jison.
The following JSFiddle reproduces the error.
To fix the bug, you may change the if condition if (this.yy.parser)
at line 1988 of handlebars.js to if (this.yy && this.yy.parser)
.