From d2db7eb8efc37f0f57b1f0e409b1c137c2d8d708 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Sat, 28 Dec 2024 16:12:45 -0500 Subject: [PATCH] docs: add back detailed info about points --- docs/src/using-parsers/2-basic-parsing.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/src/using-parsers/2-basic-parsing.md b/docs/src/using-parsers/2-basic-parsing.md index 17e77324..795ff611 100644 --- a/docs/src/using-parsers/2-basic-parsing.md +++ b/docs/src/using-parsers/2-basic-parsing.md @@ -68,7 +68,10 @@ A syntax node's _type_ is a string that indicates which grammar rule the node re const char *ts_node_type(TSNode); ``` -Syntax nodes store their position in the source code both in raw bytes and row/column coordinates: +Syntax nodes store their position in the source code both in 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);