tree-sitter-cli icon indicating copy to clipboard operation
tree-sitter-cli copied to clipboard

Grammar builder ergonomics — throw if incorrect signature used

Open queerviolet opened this issue 7 years ago • 0 comments

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)).

queerviolet avatar Aug 06 '18 16:08 queerviolet