Closed wolfmanstout closed 2 weeks ago
May I ask in what scenario you need to match on null? On top of my head I can't think of any language where we do that.
May I ask in what scenario you need to match on null? On top of my head I can't think of any language where we do that.
I don't plan to explicitly match on null, I simply need (_) to match null in addition to everything else. Right now null doesn't generate any node in the parse tree at all and can only be matched with an explicit "null". Hence it breaks for various scopes (I bumped into it when attempting to refer to the "value" of an argument that was null).
Also I probably should have mentioned that I filed this tracking bug per pokey's request.
If you want to match on both named and unnamed nodes you can just use _
. That should also match on "null"
. (_)
on the other hand only matches on named nodes.
Could you get by with something like: value: _ @value
?
That would likely cause trouble to use everywhere I use (_), because it would also match syntactic elements like braces. And it would need to be everywhere I use an expression, not just value.
There are pull requests already out for both these bugs.
@AndreasArvidsson these issues are now both fixed upstream. Shall I create a PR to bump the Kotlin tree sitter version? I ask only because pokey wanted to do this himself last time I sent a similar PR.
Ideally yes, but I don't think the parse tree extension deploys automatically and only Pokey knows how to do that manually.
ok tree-sitter-kotlin is now bumped. @wolfmanstout feel free to close if everything is now working as expected
This issue will track upstream bugs in tree-sitter-kotlin that are not mitigated in the Cursorless scope queries.