helixbass / tree-sitter-grep

The Unlicense
4 stars 1 forks source link

Dig into token tree "fallback" for Rust grammar? #67

Open helixbass opened 10 months ago

helixbass commented 10 months ago

It seems like the hacked version of the tree-sitter Rust grammar is parsing lists of expressions and key => value macro syntax ok, but what I ran into was that it wasn't behaving the way I'd thought it might when it can't successfully parse the macro invocation contents as either of those (I figured it would "fall back" to the (presumably successful) token-tree parsing and abandon the others, but per some of the tree-sitter-rust test cases with ERROR nodes it seems like sometimes it decides "to go with the list-of-expressions parsing anyway"?)

So might be worth trying to dig into that at some point?