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:
Max Brunsfeld 2014-08-28 13:22:06 -07:00
parent 226ffd6b5b
commit 3430a5edcc
6 changed files with 126 additions and 78 deletions

View file

@ -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