docs: add documentation for TSPoint coordinates (#3949)

* docs: add documentation for TSPoint coordinates

* docs: applied suggestion for TSPoint coordinates documentation
This commit is contained in:
Karl Traunmüller 2024-11-19 21:24:31 +01:00 committed by GitHub
parent 274e60a523
commit 9c80557658
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -173,7 +173,9 @@ Tree-sitter provides a [DOM](https://en.wikipedia.org/wiki/Document_Object_Model
const char *ts_node_type(TSNode);
```
Syntax nodes store their position in the source code both in terms of raw bytes and row/column coordinates:
Syntax nodes store their position in the source code both in terms of raw bytes and row/column coordinates.
In a point, rows and columns are zero-based. The `row` field represents the number of newlines before a given
position, while `column` represents the number of bytes between the position and beginning of the line.
```c
uint32_t ts_node_start_byte(TSNode);