start the root node from 1
This commit is contained in:
parent
11efff2442
commit
7fab9e2c42
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ void ts_document_invalidate(TSDocument *self) {
|
|||
}
|
||||
|
||||
TSNode ts_document_root_node(const TSDocument *self) {
|
||||
TSNode result = ts_node_make(self->tree, ts_length_zero(), 0);
|
||||
TSNode result = ts_node_make(self->tree, ts_length_zero(), 1);
|
||||
while (result.data && !ts_tree_is_visible(result.data))
|
||||
result = ts_node_named_child(result, 0);
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue