Return a TreeArray from ts_stack_pop
Since the capacity is now included in the return value, the buffer can be reused in the ts_parser__accept function. Also, it's just cleaner to use Array consistently, rather than a separate buffer and size.
This commit is contained in:
parent
f92b35e77e
commit
b113dc8b0f
5 changed files with 142 additions and 129 deletions
|
|
@ -16,9 +16,10 @@ typedef struct {
|
|||
TSLength position;
|
||||
} StackEntry;
|
||||
|
||||
typedef Array(TSTree *) TreeArray;
|
||||
|
||||
typedef struct {
|
||||
TSTree **trees;
|
||||
size_t tree_count;
|
||||
TreeArray trees;
|
||||
int head_index;
|
||||
} StackPopResult;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue