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

CST and literals #9

Closed
char0n opened this issue Sep 25, 2020 · 4 comments · Fixed by #11
Closed

CST and literals #9

char0n opened this issue Sep 25, 2020 · 4 comments · Fixed by #11
Labels
enhancement New feature or request

Comments

@char0n
Copy link

char0n commented Sep 25, 2020

Hi @ikatyang,

I was wondering if the CST that tree-sitter-yaml produces could additionally contain literals like :.

Having a following yaml

openapi: 3.1.0

I'd expect CST to contain the : literal as a SyntaxNode with a location information. Currently literals are consumed by the grammar. For example tree-sitter-json does provide literals as SyntaxNodes within CST.

Thank you

@char0n
Copy link
Author

char0n commented Sep 28, 2020

@ikatyang not sure I see a difference in CST. What has actually changed ? Thanks!

@ikatyang
Copy link
Owner

They are now anonymous nodes, and you can verify it by enabling "Query" in the playground:

image

@char0n
Copy link
Author

char0n commented Sep 29, 2020

Hm interesting. This is what I see:

image

I've used Incognito Chrome window to eliminate any cache problems.

@char0n
Copy link
Author

char0n commented Sep 29, 2020

I do confirm though, that I'm seeing anonymous nodes when building [email protected] locally. Great job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants