Store indices on nodes to speed up traversal methods

This commit is contained in:
Max Brunsfeld 2015-08-15 23:35:20 -07:00
parent d70a7227a1
commit a5d73ed676
4 changed files with 66 additions and 39 deletions

View file

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