Store indices on nodes to speed up traversal methods
This commit is contained in:
parent
d70a7227a1
commit
a5d73ed676
4 changed files with 66 additions and 39 deletions
|
|
@ -17,7 +17,10 @@ typedef enum {
|
|||
} TSTreeOptions;
|
||||
|
||||
struct TSTree {
|
||||
struct TSTree *parent;
|
||||
struct {
|
||||
struct TSTree *parent;
|
||||
size_t index;
|
||||
} context;
|
||||
size_t child_count;
|
||||
size_t visible_child_count;
|
||||
union {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue