-
-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Description
I tried to run this code with tree-sitter-rust v0.19.0 and tree-sitter v0.19.4
for i in 0.. {
if *wide.offset(i) == 0 {
return Self::from_wide_ptr(wide, i as usize)
}
}and I got the following AST:
(source_file [0, 0] - [5, 0]
(ERROR [0, 0] - [4, 1]
(identifier [0, 4] - [0, 5])
(range_expression [0, 9] - [4, 1]
(integer_literal [0, 9] - [0, 10])
(block [0, 13] - [4, 1]
(if_expression [1, 4] - [3, 5]
condition: (binary_expression [1, 7] - [1, 27]
left: (unary_expression [1, 7] - [1, 22]
(call_expression [1, 8] - [1, 22]
function: (field_expression [1, 8] - [1, 19]
value: (identifier [1, 8] - [1, 12])
field: (field_identifier [1, 13] - [1, 19]))
arguments: (arguments [1, 19] - [1, 22]
(identifier [1, 20] - [1, 21]))))
right: (integer_literal [1, 26] - [1, 27]))
consequence: (block [1, 28] - [3, 5]
(return_expression [2, 8] - [2, 52]
(call_expression [2, 15] - [2, 52]
function: (scoped_identifier [2, 15] - [2, 34]
path: (identifier [2, 15] - [2, 19])
name: (identifier [2, 21] - [2, 34]))
arguments: (arguments [2, 34] - [2, 52]
(identifier [2, 35] - [2, 39])
(type_cast_expression [2, 41] - [2, 51]
value: (identifier [2, 41] - [2, 42])
type: (primitive_type [2, 46] - [2, 51])))))))))))
Metadata
Metadata
Assignees
Labels
No labels