tree-sitter-cli
tree-sitter-cli copied to clipboard
Grammar builder ergonomics — throw if incorrect signature used
Specifically, throw if grammar builder functions are passed wrong number of args. This catches the common (for me) problem of doing something like optional('+', $.term) when I meant to do optional(seq('+', term)).