powered by
range() creates a new tree-sitter range.
range()
range_start_byte() and range_end_byte() access a range's start and end bytes, respectively.
range_start_byte()
range_end_byte()
range_start_point() and range_end_point() access a range's start and end points, respectively.
range_start_point()
range_end_point()
is_range() determines whether or not an object is a range.
is_range()
Note that the bytes and points used in ranges are 0-indexed.
range(start_byte, start_point, end_byte, end_point)range_start_byte(x)range_start_point(x)range_end_byte(x)range_end_point(x)is_range(x)
range_start_byte(x)
range_start_point(x)
range_end_byte(x)
range_end_point(x)
is_range(x)
range() returns a new range.
range_start_byte() and range_end_byte() return a single double.
range_start_point() and range_end_point() return a point().
point()
is_range() returns TRUE or FALSE.
TRUE
FALSE
[double(1)]
0-indexed bytes for the start and end of the range, respectively.
[tree_sitter_point]
0-indexed points for the start and end of the range, respectively.
[tree_sitter_range]
A range.
node_range()
x <- range(5, point(1, 3), 7, point(1, 5)) x range_start_byte(x) range_end_byte(x) range_start_point(x) range_end_point(x) is_range(x)
Run the code above in your browser using DataLab