Closed andrhua closed 2 years ago
Good catch! That line should be #eq?
. All tree-sitter consumers that I know of use #eq?
, but you're right that they're implemented by higher level code. For example, neovim implements #any-of?
while tree-sitter-cli does not.
I'll push a commit to fix this. Thanks for the report!
Good catch, currently I get this:
and it's the same when changing #eq
to #whatever
, so it seems like there's some error that is being silently ignored. With the change it works as expected
There's perhaps a small typo in injections queries, where
#eq
should've been#eq?
, at least that's what Lua TS binding lib uses, as well as Rust and Webassembly. Here's an error from nvim:But I'm not sure since docs (Predicates section) state that predicates are handled by "higher level code", so perhaps the author of this query had used parser where question mark is omitted from predicate syntax. Anyway, adding
?
fixed mentioned error for me.Minimal reproducing code: