diff --git a/app/bridge.c b/app/bridge.c index e181994c6..e1cc9fecf 100644 --- a/app/bridge.c +++ b/app/bridge.c @@ -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); +} diff --git a/app/bridge.h b/app/bridge.h index d5f71be99..245dc9ba3 100644 --- a/app/bridge.h +++ b/app/bridge.h @@ -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);