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
The problem is that function_statement node for foo function has start_point with position (line=0, col=6). But the 0th line corresponds to the definition of a = 42, and the correct line number for the foo is 2.
Here is the minimal driver code using py-tree-sitter to quickly reproduce this issue:
The text was updated successfully, but these errors were encountered:
jubnzv
changed the title
Incorrect line number in start_point for `function_statement node
Incorrect line number in start_point for function_statement node
Dec 25, 2021
Consider the minimal example:
The problem is that
function_statement
node forfoo
function hasstart_point
with position(line=0, col=6)
. But the 0th line corresponds to the definition ofa = 42
, and the correct line number for thefoo
is2
.Here is the minimal driver code using py-tree-sitter to quickly reproduce this issue:
Output:
Expected:
The text was updated successfully, but these errors were encountered: