-
Notifications
You must be signed in to change notification settings - Fork 232
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
2.19.0: rules.map is not a function #486
Comments
I'm having the same issue, is there a fix or workaround for it? |
I was having this issue. Workaround when you're importing your grammar do this: import { default as myGrammar } from './my-grammar-module';
const myParser = new nearley.Parser(nearley.Grammar.fromCompiled(myGrammar)); Instead of: import * myGrammar from './my-grammar-module';
const myParser = new nearley.Parser(nearley.Grammar.fromCompiled(myGrammar)); Unfortunately it seems this affects |
Thank you very much, you saved my project. |
No problem, glad I can help! |
Fix export for browsers kach#486
I'm using moo 0.5.0, with nearley 2.18.0. Upgrading to 0.5.1 and 2.19.0 respectively, then re-generating the parsers causes the following error:
The preceding call in the stack is
const parser = new nearley.Parser(nearley.Grammar.fromCompiled(grammar));
, where the grammar is compiled withnearleyc grammar.ne -o src/grammar.ts
.I'm using node 10.17.0 with typescript 3.5.3. Have you come across this issue?
The text was updated successfully, but these errors were encountered: