Require that grammars' start rules be visible

This commit is contained in:
Max Brunsfeld 2017-08-04 15:21:53 -07:00
parent 1dca3a0b58
commit 94dc703bfc
12 changed files with 64 additions and 56 deletions

View file

@ -159,10 +159,7 @@ void ts_document_invalidate(TSDocument *self) {
}
TSNode ts_document_root_node(const TSDocument *self) {
TSNode result = ts_node_make(self->tree, 0, 0, 0);
while (result.data && !((Tree *)result.data)->visible)
result = ts_node_named_child(result, 0);
return result;
return ts_node_make(self->tree, 0, 0, 0);
}
uint32_t ts_document_parse_count(const TSDocument *self) {