Hide the details of TSNode's fields in the public API

This commit is contained in:
Max Brunsfeld 2018-05-16 15:44:04 -07:00
parent ebddb1a0b5
commit 6fc8d9871c
7 changed files with 120 additions and 100 deletions

View file

@ -25,13 +25,7 @@ void ts_tree_delete(TSTree *self) {
}
TSNode ts_tree_root_node(const TSTree *self) {
return (TSNode) {
.subtree = self->root,
.tree = self,
.position = {0, 0},
.byte = 0,
.alias_symbol = 0,
};
return ts_node_new(self, self->root, length_zero(), 0);
}
void ts_tree_edit(TSTree *self, const TSInputEdit *edit) {