kach / nearley

📜🔜🌲 Simple, fast, powerful parser toolkit for JavaScript.
https://nearley.js.org
MIT License
3.57k stars 232 forks source link

rules.map isn't a function #521

Closed Freddson closed 4 years ago

Freddson commented 4 years ago

I'm making a parser using nearley, and when I try to use it, this error appears: ` var rules = rules.map(function (r) { return (new Rule(r.name, r.symbols, r.postprocess)); }); ^

TypeError: rules.map is not a function`

The code is: https://pastebin.com/tw2NbMq8

I don't know why is this happening. The code is correct for me.