| ranges {treesitter} | R Documentation |
Ranges
Description
-
range()creates a new tree-sitter range. -
range_start_byte()andrange_end_byte()access a range's start and end bytes, respectively. -
range_start_point()andrange_end_point()access a range's start and end points, respectively. -
is_range()determines whether or not an object is a range.
Note that the bytes and points used in ranges are 0-indexed.
Usage
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)
Arguments
start_byte, end_byte |
0-indexed bytes for the start and end of the range, respectively. |
start_point, end_point |
0-indexed points for the start and end of the range, respectively. |
x |
A range. |
Value
-
range()returns a new range. -
range_start_byte()andrange_end_byte()return a single double. -
range_start_point()andrange_end_point()return apoint(). -
is_range()returnsTRUEorFALSE.
See Also
Examples
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)
[Package treesitter version 0.1.0 Index]