kach / nearley

šŸ“œšŸ”œšŸŒ² Simple, fast, powerful parser toolkit for JavaScript.
https://nearley.js.org
MIT License
3.59k stars 232 forks source link

allows old import style + allows nearely-test to run for typescript gā€¦ #544

Open okonech opened 3 years ago

okonech commented 3 years ago

Fix the export default syntax for typescript to line up with js grammars.

This allows the old style

`import * as grammar from './grammar';

export const parser = new Parser(Grammar.fromCompiled(grammar));`

as well as allowing nearley-test to actually test the compiled javascript.