Clarify distinction btwn tree padding, tree offset, node position
- Node position is public. It represents the node's first character index in the document. - Tree offset is private. It represents the distance between the tree's first character index and it's parent's first character index. - Tree padding is private. It represents the amount of whitespace (or other separator characters) immediately preceding the tree.
This commit is contained in:
parent
226ffd6b5b
commit
3430a5edcc
6 changed files with 126 additions and 78 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
struct TSNode {
|
||||
size_t ref_count;
|
||||
size_t start_position;
|
||||
size_t position;
|
||||
size_t index;
|
||||
const TSTree *content;
|
||||
struct TSNode *parent;
|
||||
|
|
@ -14,7 +14,7 @@ struct TSNode {
|
|||
};
|
||||
|
||||
TSNode *ts_node_make(const TSTree *tree, TSNode *parent, size_t index,
|
||||
size_t start_position, const char **names);
|
||||
size_t position, const char **names);
|
||||
TSNode *ts_node_make_root(const TSTree *tree, const char **names);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue