1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00

Add a wrapper function for getting the child at a specific index.

This commit is contained in:
Rob Rix 2015-11-25 11:46:34 -05:00
parent 6c1688f7ef
commit 4f63394379
2 changed files with 5 additions and 0 deletions

View File

@ -11,3 +11,7 @@ const char *ts_node_p_name(const TSNode *node, const TSDocument *document) {
size_t ts_node_p_named_child_count(const TSNode *node) {
return ts_node_named_child_count(*node);
}
void ts_node_p_named_child(const TSNode *node, size_t index, TSNode *outNode) {
*outNode = ts_node_named_child(*node, index);
}

View File

@ -5,3 +5,4 @@ void ts_document_root_node_p(TSDocument *document, TSNode *outNode);
const char *ts_node_p_name(const TSNode *node, const TSDocument *document);
size_t ts_node_p_named_child_count(const TSNode *node);
void ts_node_p_named_child(const TSNode *node, size_t index, TSNode *outNode);