Open stefnotch opened 2 weeks ago
I'm experimenting here: https://github.com/k2d222/tree-sitter-wesl
The tree-sitter parser generated from the spec is not very practical from a usability stand-point, e.g. expressions with different precedences are parsed as nested nonterminals (as explained here in the tree-sitter doc. And many grammar rules could be hidden.
So two approaches: patching the spec extractor program to use precedence directives and patch a few grammar rules, or edit manually the generated grammar.
I'm leaning towards option 2.
Also, the scanner (recognizes template lists and block comments) has a few bugs