they have a tool that generates a c-parser from JS grammar files, like this
This is done for portability since every OS can compile C (but maybe not javascript / node).
when I was working on this PR to tree-sitter-javascript, I only dealt with “the grammar file”
and I could delete all the C code, and when I ran tree-sitter generate
, it would all come back.
maybe I’m just getting hung up on something stupid it then. Clearly something is not clicking in to place my brain.
ah ok – that makes me feel a little better. My first pass at this lezer stuff is “just a superset of HTML”