diff --git a/src/runtime/tree.c b/src/runtime/tree.c index 2e2a5d89..04aa6e5f 100644 --- a/src/runtime/tree.c +++ b/src/runtime/tree.c @@ -69,6 +69,7 @@ void ts_tree_assign_parents(TSTree *self) { void ts_tree_set_children(TSTree *self, size_t child_count, TSTree **children) { self->children = children; self->child_count = child_count; + self->named_child_count = 0; self->visible_child_count = 0; for (size_t i = 0; i < child_count; i++) { TSTree *child = children[i];