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

Incorrect string parsing in Go #180

Open
aresler opened this issue Dec 16, 2024 · 1 comment
Open

Incorrect string parsing in Go #180

aresler opened this issue Dec 16, 2024 · 1 comment

Comments

@aresler
Copy link

aresler commented Dec 16, 2024

Steps to reproduce:

str1 := "hello world"
  1. Parse the sample above
  2. Check the nodes

Expected:

(source_file (short_var_declaration left: (expression_list (identifier)) right: (expression_list (interpreted_string_literal (interpreted_string_literal_content)))))

Actual:

(source_file (short_var_declaration left: (expression_list (identifier)) right: (expression_list (interpreted_string_literal))))

As you can see, the interpreted_string_literal_content node is missing.

github.com/smacker/go-tree-sitter v0.0.0-20240827094217-dd81d9e9be82

@aresler
Copy link
Author

aresler commented Dec 16, 2024

Maybe it's an expected behavior, I'm not sure, but all the other languages I checked had a parent node for the string literal, and a child node for string content. It's helpful to follow a single standard in this case.

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

No branches or pull requests

1 participant