OpenSCAD grammar for the tree-sitter parsing library
Most development of tree-sitter parsers is done using nodejs and npm. You can find the instructions on how to set that up here: https://tree-sitter.github.io/tree-sitter/creating-parsers
The TLDR would be:
npm
(there are many ways, pick your poison)npm install
to get all the dependenciesexport PATH=$PATH:./node_modules/.bin
to get the tree-sitter
CLI commandtree-sitter generate
to build your changestree-sitter test
to make sure you didn't unintentionally break any of the existing test cases