Require that grammars' start rules be visible
This commit is contained in:
parent
1dca3a0b58
commit
94dc703bfc
12 changed files with 64 additions and 56 deletions
|
|
@ -148,20 +148,11 @@ static Iterator iterator_new(TreePath *path, Tree *tree, const TSLanguage *langu
|
|||
.child_index = 0,
|
||||
.structural_child_index = 0,
|
||||
}));
|
||||
|
||||
Iterator self = {
|
||||
return (Iterator) {
|
||||
.path = *path,
|
||||
.language = language,
|
||||
.visible_depth = 0,
|
||||
.visible_depth = 1,
|
||||
};
|
||||
|
||||
if (tree->visible) {
|
||||
self.visible_depth++;
|
||||
} else {
|
||||
iterator_descend(&self, length_zero());
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
Length iterator_start_position(Iterator *self) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue