You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the screenshot below, the comment // Page size extension is recognized as part of preproc_arc, not a comment node
Steps To Reproduce/Bad Parse Tree
install tree-sitter and tree-sitter-cli (I'm using Arch Linux so sudo pacman -S tree-sitter tree-sitter-cli)
clone tree-sitter/tree-sitter-c repository and cd into it
run tree-sitter init-config and tree-sitter generate to set up the environment properly
create a simple test file (see Repro below) that has a line of macro mentioned above and run tree-sitter parse test.c I got the the following parse tree
Linerre
changed the title
bug: tree-sitter-c does ignores line comment after the macro defined on the same line
bug: tree-sitter-c ignores line comment after the macro defined on the same line
Oct 7, 2024
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)Describe the bug
In Emacs (v29+ with built-in tree-sitter support), when editing C files, I found tree-sitter-c does not recognize the line comment like below
The parse tree for the above line is
In the screenshot below, the comment
// Page size extension
is recognized as part ofpreproc_arc
, not a comment nodeSteps To Reproduce/Bad Parse Tree
tree-sitter
andtree-sitter-cli
(I'm using Arch Linux sosudo pacman -S tree-sitter tree-sitter-cli
)tree-sitter/tree-sitter-c
repository andcd
into ittree-sitter init-config
andtree-sitter generate
to set up the environment properlytree-sitter parse test.c
I got the the following parse treeExpected Behavior/Parse Tree
Something similar to the below if possible
Repro
The text was updated successfully, but these errors were encountered: