-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Did you check existing issues?
- I have read all the tree-sitter docs if it relates to using the parser
- I have searched the existing issues
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)
No response
Describe the bug
I parsed simple xml with an attribute set.
<root>
<field id="id"/>
</root>
If parse this file the AttValue will show the correct value of "id". However if I try to get the id value by looking at the content field it will break and have no content. I am working on
Steps To Reproduce/Bad Parse Tree
- Parse and xml file with an attribute value set.
- Try to get the attribute value by getting the
contentfield fromAttValue - This will not find the field even though the file parses correctly.
Expected Behavior/Parse Tree
It should be possible to get the content field. This can be fixed by using optional and adding an alias to the rule.
Repro
I have a rust project that I was using to parse the xml code. I don't really have a minimal program shareable. But I have a fix that can PR shortly.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working