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

comment has white space in end of line #12

Open
zoomer-k opened this issue Dec 13, 2024 · 5 comments
Open

comment has white space in end of line #12

zoomer-k opened this issue Dec 13, 2024 · 5 comments

Comments

@zoomer-k
Copy link

//test1;
//test2;

first line parse
//test1;
second line parse
//test2;

is this the expected behavior?

@gmlarumbe
Copy link
Owner

Hi @zoomer-k ,

I am not sure what the issue is here.

The output of $ tree-sitter parse <file.sv> gives the following parsed tree, which seems correct to me:

(source_file [0, 0] - [2, 0]
  (comment [0, 0] - [0, 8])
  (comment [1, 0] - [1, 8]))

Please first make sure it is not a tool related issue instead of a parser error running the tree-sitter parse command on the snippet.

@zoomer-k
Copy link
Author

zoomer-k commented Dec 16, 2024

Hi @gmlarumbe
thank you for researching
i try it in windows10

(source_file [0, 0] - [1, 8]
  (comment [0, 0] - [0, 9])
  (comment [1, 0] - [1, 8])) 

tree-sitter 0.22.2 (fc15f621334a262039ffaded5937e2844f88da61)
node v18.16.0

@gmlarumbe
Copy link
Owner

Hi @zoomer-k ,

It seems it might be because of CRLF Windows format for newlines.

Can you try updating tree-sitter to the latest release and check the result of the parsed tree?

Thanks!

@zoomer-k
Copy link
Author

Hi @gmlarumbe
I'm trying but recently tree-sitter add tree-sitter.json file
tree-sitter/tree-sitter#3637

could you update repository for latest tree-sitter?

@gmlarumbe
Copy link
Owner

Hi @zoomer-k ,

I updated generated files with tree-sitter 0.24 on 4344f7e, including the new tree-sitter.json file.

Hope it helps!

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

2 participants