points | R Documentation |
point()
creates a new tree-sitter point.
point_row()
and point_column()
access a point's row and column value,
respectively.
is_point()
determines whether or not an object is a point.
Note that points are 0-indexed. This is typically the easiest form to work with them in, since most of the time when you are provided row and column information from third party libraries, they will already be 0-indexed. It is also consistent with bytes, which are also 0-indexed and are often provided alongside their corresponding points.
point(row, column)
point_row(x)
point_column(x)
is_point(x)
row |
A 0-indexed row to place the point at. |
column |
A 0-indexed column to place the point at. |
x |
A point. |
point()
returns a new point.
point_row()
and point_column()
return a single double.
is_point()
returns TRUE
or FALSE
.
x <- point(1, 2)
point_row(x)
point_column(x)
is_point(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.