From fe4e2cf260ea201d8153b9a24ecb94e76af50954 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 1 Dec 2015 14:59:29 -0500 Subject: [PATCH] Bridge to the node start/end point functions. --- app/bridge.c | 12 ++++++++++++ app/bridge.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/app/bridge.c b/app/bridge.c index d3b9c4803..088803a70 100644 --- a/app/bridge.c +++ b/app/bridge.c @@ -50,3 +50,15 @@ size_t ts_node_p_size_chars(const TSNode *node) { assert(node->data != NULL); return ts_node_size(*node).chars; } + +size_t ts_node_p_start_point(const TSNode *node) { + assert(node != NULL); + assert(node->data != NULL); + return ts_node_start_point(*node).row; +} + +size_t ts_node_p_end_point(const TSNode *node) { + assert(node != NULL); + assert(node->data != NULL); + return ts_node_end_point(*node).row; +} diff --git a/app/bridge.h b/app/bridge.h index 6ca8a08c6..63a502968 100644 --- a/app/bridge.h +++ b/app/bridge.h @@ -11,3 +11,6 @@ void ts_node_p_named_child(const TSNode *node, size_t index, TSNode *outNode); size_t ts_node_p_pos_chars(const TSNode *node); size_t ts_node_p_size_chars(const TSNode *node); + +size_t ts_node_p_start_point(const TSNode *node); +size_t ts_node_p_end_point(const TSNode *node);