Start work on new ref API, for giving names to nodes' children

Co-Authored-By: Ayman Nadeem <aymannadeem@gmail.com>
This commit is contained in:
Max Brunsfeld 2019-01-22 12:02:17 -08:00
parent dac13af206
commit bf4e1304f8
7 changed files with 85 additions and 1 deletions

View file

@ -453,6 +453,10 @@ TSNode ts_node_named_child(TSNode self, uint32_t child_index) {
return ts_node__child(self, child_index, false);
}
TSNode ts_node_child_by_ref(TSNode self, const char *ref_name) {
return ts_node__null();
}
uint32_t ts_node_child_count(TSNode self) {
Subtree tree = ts_node__subtree(self);
if (ts_subtree_child_count(tree) > 0) {