Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Incorrect parsing of flow sequence entry which is a mapping with a single key/value pair #13

Open
2 tasks done
char0n opened this issue Nov 12, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@char0n
Copy link

char0n commented Nov 12, 2024

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.24.3 (bdfe32402e85673bbc693216f0a6ef72c98bb665)

Describe the bug

YAML fragment:

[key: value]

CST:
image

We can see that the flow_mapping node is missing from the CST. Section 7.4.1 of YAML 1.2.2 specification contains explicit direction about how to handle cases like these.

Block style of this syntax parses correctly:

YAML fragment:

- key: value

CST:
image

Steps To Reproduce/Bad Parse Tree

https://tree-sitter.github.io/tree-sitter/playground

Expected Behavior/Parse Tree

Having flow_mapping node wrapping the flow_pairs nodes

Repro

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants