points {treesitter}R Documentation

Points

Description

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.

Usage

point(row, column)

point_row(x)

point_column(x)

is_point(x)

Arguments

row

⁠[double(1)]⁠

A 0-indexed row to place the point at.

column

⁠[double(1)]⁠

A 0-indexed column to place the point at.

x

⁠[tree_sitter_point]⁠

A point.

Value

Examples

x <- point(1, 2)

point_row(x)
point_column(x)

is_point(x)

[Package treesitter version 0.1.0 Index]