zaach / jison

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

Generate valid "strict mode" javascript #373

Closed mathiasrw closed 4 years ago

mathiasrw commented 6 years ago

In strict mode code, functions can only be declared at the top level or immediately within another function. With this commit locateNearestErrorRecoveryRule is declared as a variable and assigned a function instead of being declared as a named function.

With this PR one can include the generated file directly in a "use strict"; setup.


This change is Reviewable

mathiasrw commented 4 years ago

Hi @zaach

This PR is one-liner semantic javascript change that lets the ecosystem around jison use strict syntax.

Please have a look and consider if its OK to merge.

mathiasrw commented 4 years ago

Just found out that https://www.npmjs.com/package/jison-gho seems more active. Closing.