forked from ikatyang/tree-sitter-yaml
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
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
)
tree-sitter 0.22.5 (cdd46888603e06d6474a96c0024907f68242c45f)
Steps To Reproduce/Bad Parse Tree
As far as I can tell this is valid yaml file:
root: "a\
b\
c"
But it produces a bad tree:
(ERROR
(block_mapping_pair
key: (flow_node
(plain_scalar
(string_scalar))))
(ERROR
(escape_sequence)
(flow_node
(plain_scalar
(string_scalar))))
(flow_node
(plain_scalar
(string_scalar))))
Expected Behavior/Parse Tree
(stream
(document
(block_node
(block_mapping
(block_mapping_pair
key: (flow_node
(plain_scalar
(string_scalar)))
value: (flow_node
(double_quote_scalar
(escape_sequence)
(escape_sequence))))))))
Adding additional space after a newline solves the problem somehow:
root: "a\
b\
c"
The same'ish problem occurs with arrays and maps: ikatyang#29
oligot and woodruffw
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed