Closed DavidTanner closed 1 year ago
Just use @preprocessor
in your grammar file.
For example: @preprocessor typescript
at the beginning of your grammar file lets you use typescript in your post-processors and generates typescript for you.
@preprocessor
also supports coffeescript.
Awesome. Thank you for the answer. That took a bit of digging to find in the docs. https://nearley.js.org/docs/parser#using-preprocessors
I would like to be able to use the cli to generate typescript output. This change adds an optional language flag to specify which of the existing generators might be used.