Open andrescodas opened 2 years ago
Solving this may require tree-sitter/tree-sitter#1635.
I am afraid that you need to accept this at the parsing level and then make another run of queries such as ((identifier) @bad (#match? @bad "while|def|for"))
to report second-stage errors. Unfortunately, it won't help you when this affects error recovery, or worse, conflict solving. Gotta wait for the reserved keywords feature.
I posted other instance here: https://github.com/tree-sitter/tree-sitter/issues/1773