🎨 Use NULL_SUBTREE constant in a few more places
This commit is contained in:
parent
2408e7fec0
commit
3672da6ac3
3 changed files with 6 additions and 6 deletions
|
|
@ -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,
|
||||
}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue