Grammar of Maparoni's expressions for tree-sitter.
Makes a good basis for grammars of other expressions that are built using nicklockwood/Expression.
The grammar is defined in grammar.js
, mostly be specifying all those rules.
Rules that are prefixed with a _
will not be returned by the parser. Be mindful about that, when defining the grammar as how to build these rules depends on how they'll be used.
- When adding new functionality add new tests in the
test
directory. - Run
tree-sitter generate
first, and thentree-sitter test
to run the suite from thetest
directory, and check that it all passes.
- Run
tree-sitter generate
to build the C files (insrc
), that can be used with anything that can integrate C code - Run
tree-sitter build-wasm
to build the WASM file, that can be used with JS-based tree-sitter highlighters