fix(lib): do not access the alias sequence for the end subtree in ts_subtree_summarize_children
This commit is contained in:
parent
e057299b0d
commit
21c658a12c
1 changed files with 6 additions and 1 deletions
|
|
@ -407,7 +407,12 @@ void ts_subtree_summarize_children(
|
|||
self.ptr->dynamic_precedence += ts_subtree_dynamic_precedence(child);
|
||||
self.ptr->visible_descendant_count += ts_subtree_visible_descendant_count(child);
|
||||
|
||||
if (alias_sequence && alias_sequence[structural_index] != 0 && !ts_subtree_extra(child)) {
|
||||
if (
|
||||
!ts_subtree_extra(child) &&
|
||||
ts_subtree_symbol(child) != 0 &&
|
||||
alias_sequence &&
|
||||
alias_sequence[structural_index] != 0
|
||||
) {
|
||||
self.ptr->visible_descendant_count++;
|
||||
self.ptr->visible_child_count++;
|
||||
if (ts_language_symbol_metadata(language, alias_sequence[structural_index]).named) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue