You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took from #14 that jison should be producing es5 code. However, the lexer emitted by jison contains const, which is not a keyword recognized in es5. The code may misleadingly run just fine on browsers/JS engines that declare themselves to be es5 engines. The problem is that, historically, many engines declaring themselves to support es5, in fact support es5 andlet and const though they are not part of es5 proper.
Steps to reproduce:
Install the latest jison. (I used 0.6.1-215).
Grab the basic_lex.jison example from the examples subdirectory.
Run jison basic_lex.jison.
Open the resulting basic_lex.js and search for const. You'll find some in the lexer_prettyPrintRange function.
The text was updated successfully, but these errors were encountered:
Jison (jison-gho, rather) is being reworked to become a babel-assisted process: the goal with upcoming v0.6.5 is to have a parser-generator which can validate/parse modern JS code in action code and spit out JS that's suitable for modern platforms with babel-assisted support for older platforms where and when one wants. That includes ES5 support.
I don't plan to fix this in a 0.6.1 hotfix release as all effort should focus on 0.6.5 and making sure that one delivers as expected.
I took from #14 that jison should be producing es5 code. However, the lexer emitted by jison contains
const
, which is not a keyword recognized in es5. The code may misleadingly run just fine on browsers/JS engines that declare themselves to be es5 engines. The problem is that, historically, many engines declaring themselves to support es5, in fact support es5 andlet
andconst
though they are not part of es5 proper.Steps to reproduce:
Install the latest jison. (I used 0.6.1-215).
Grab the
basic_lex.jison
example from theexamples
subdirectory.Run
jison basic_lex.jison
.Open the resulting
basic_lex.js
and search forconst
. You'll find some in thelexer_prettyPrintRange
function.The text was updated successfully, but these errors were encountered: