Hi! I have been using fields like described in this comment https://github.com/tree-sitter/node-tree-sitter/issues/54#issuecomment-568545364 They work well for accessing childs, but not parents As an example, I would expect `node.functionNode.parent` to be `node`, but it isn't Here is a minimum reproducible example, just follow the instructions in the readme https://github.com/sguillia/tree-sitter-repro/blob/master/main.ts This is slightly related to https://github.com/tree-sitter/tree-sitter-javascript/issues/127 I had some parents with type `_expression` that went away with some void expressions. Is there any way to still access fields parents? Thank you!
Activity
Fix incorrect parent values after call to child_by_field_name
maxbrunsfeld commentedon Apr 3, 2020
Thanks so much for the reproduction script. This is fixed on Tree-sitter master. I'll close this when I upgrade the Tree-sitter submodule.
maxbrunsfeld commentedon Apr 3, 2020
The fix is in v0.16.1.
Bump tree-sitter library