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:
Max Brunsfeld 2016-02-21 22:31:04 -08:00
parent f92b35e77e
commit b113dc8b0f
5 changed files with 142 additions and 129 deletions

View file

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