diff --git a/include/tree_sitter/runtime.h b/include/tree_sitter/runtime.h index fc041596..e7e8f899 100644 --- a/include/tree_sitter/runtime.h +++ b/include/tree_sitter/runtime.h @@ -52,6 +52,7 @@ typedef struct TSDocument TSDocument; TSLength ts_node_pos(TSNode); TSLength ts_node_size(TSNode); +TSPoint ts_node_end_point(TSNode); TSSymbol ts_node_symbol(TSNode); const char *ts_node_name(TSNode, const TSDocument *); const char *ts_node_string(TSNode, const TSDocument *); diff --git a/src/runtime/node.c b/src/runtime/node.c index a36105c5..d8fb80ff 100644 --- a/src/runtime/node.c +++ b/src/runtime/node.c @@ -168,6 +168,10 @@ TSLength ts_node_size(TSNode self) { return ts_node__tree(self)->size; } +TSLength ts_node_point(TSNode self) { + return ts_node__tree(self)->size_point; +} + TSSymbol ts_node_symbol(TSNode self) { return ts_node__tree(self)->symbol; }