🎨 Use NULL_SUBTREE constant in a few more places

This commit is contained in:
Max Brunsfeld 2018-09-17 22:24:37 -07:00
parent 2408e7fec0
commit 3672da6ac3
3 changed files with 6 additions and 6 deletions

View file

@ -375,7 +375,7 @@ Stack *ts_stack_new(SubtreePool *subtree_pool) {
array_reserve(&self->node_pool, MAX_NODE_POOL_SIZE);
self->subtree_pool = subtree_pool;
self->base_node = stack_node_new(NULL, (Subtree) {.ptr = NULL}, false, 1, &self->node_pool);
self->base_node = stack_node_new(NULL, NULL_SUBTREE, false, 1, &self->node_pool);
ts_stack_clear(self);
return self;
@ -682,7 +682,7 @@ void ts_stack_clear(Stack *self) {
array_clear(&self->heads);
array_push(&self->heads, ((StackHead){
.node = self->base_node,
.last_external_token.ptr = NULL,
.last_external_token = NULL_SUBTREE,
.status = StackStatusActive,
.lookahead_when_paused = 0,
}));