Rework AST access API: reduce heap allocation

This commit is contained in:
Max Brunsfeld 2015-07-31 15:47:48 -07:00
parent feb46302f3
commit 54e40b8146
16 changed files with 288 additions and 273 deletions

View file

@ -17,10 +17,7 @@ typedef enum {
} TSTreeOptions;
struct TSTree {
TSSymbol symbol;
TSTreeOptions options;
TSLength padding;
TSLength size;
struct TSTree *parent;
size_t child_count;
union {
struct {
@ -29,6 +26,10 @@ struct TSTree {
};
char lookahead_char;
};
TSLength padding;
TSLength size;
TSSymbol symbol;
TSTreeOptions options;
unsigned short int ref_count;
};