Ensure root node has a null parent
This commit is contained in:
parent
b520bdd2d5
commit
919c9d8715
1 changed files with 1 additions and 0 deletions
|
|
@ -204,6 +204,7 @@ Tree *ts_tree_make_copy(TreePool *pool, Tree *self) {
|
|||
}
|
||||
|
||||
void ts_tree_assign_parents(Tree *self, TreePool *pool, const TSLanguage *language) {
|
||||
self->context.parent = NULL;
|
||||
array_clear(&pool->tree_stack);
|
||||
array_push(&pool->tree_stack, self);
|
||||
while (pool->tree_stack.size > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue