Rework AST access API: reduce heap allocation
This commit is contained in:
parent
feb46302f3
commit
54e40b8146
16 changed files with 288 additions and 273 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue