-
Notifications
You must be signed in to change notification settings - Fork 452
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
Problem bundling compiled grammars with rollup #351
Comments
I think I found the problem. According to this, labeled function declarations are not allowed in strict mode, which is how all ES modules are treated. Since rollup only operates on ES modules the labeled function declaration is considered invalid. I see that the label is used as a marker for where to add a function into the file. |
Nevermind. I just realized that this is already fixed in #285. I'll close this. |
Nevermind nevermind. Apparently #285 did not fix this issue. For some reason Is there some way to ensure that the |
#352 fixes this. A more correct way to do it would be replacing the |
I am experiencing this issue as well with https://github.com/knsv/mermaid (see mermaid-js/mermaid#277 (comment) ). My solution was to remove all occurrences of Why is #352 not merged yet? I see the current workaround is the post-process the generated code and strip the Jison team, is there anything we can do to help you get this merged? |
// Remove _token_stack label manually until fixed in jison: // zaach/jison#351 // zaach/jison#352
I'm trying to build a library that depends on a library that uses jison to generate a grammar.
Unfortunately while building with rollup I get the following error:
The files concerned can be seen here.
Do you know why this bit is considered to be invalid javascript? The whole file looks a little odd to me.
Is there something that can be changed to make the file pass validation?
The text was updated successfully, but these errors were encountered: