tree-sitter-c
tree-sitter-c copied to clipboard
Incorrect Unnamed Node Range
I'm using this string: "#define a \n"
. The following is a list representation of the parse tree including the unnamed nodes:
(:TRANSLATION-UNIT ((0 0) (0 1))
((:PREPROC-DEF ((0 0) (0 1))
((:|#DEFINE| ((0 0) (7 0)) NIL)
((:NAME :IDENTIFIER) ((8 0) (9 0)) NIL)
(:|
|
((9 0) (0 1)) NIL)))))
In the parse tree, the newline starts at (9 0), but in the provided string above, the space after the a
is at (9 0) and the newline is at (10 0). Is this behavior expected?