From ad58b752e62df2fcbe384d203badb2ba1a5060e4 Mon Sep 17 00:00:00 2001 From: joshvera Date: Wed, 25 Nov 2015 11:28:28 -0500 Subject: [PATCH] Rename ts_tree_total_size_point to ts_tree_offset_point --- src/runtime/parser.c | 4 ++-- src/runtime/tree.c | 4 ++-- src/runtime/tree.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/runtime/parser.c b/src/runtime/parser.c index 7e06ec76..bd477d3d 100644 --- a/src/runtime/parser.c +++ b/src/runtime/parser.c @@ -119,12 +119,12 @@ static void ts_parser__get_next_lookahead(TSParser *self) { self->lookahead = self->reusable_subtree; TSLength size = ts_tree_total_size(self->lookahead); - TSPoint point_size = ts_tree_total_size_point(self->lookahead); + TSPoint offset_point = ts_tree_offset_point(self->lookahead); DEBUG("reuse sym:%s size:%lu extra:%d", SYM_NAME(self->lookahead->symbol), size.chars, self->lookahead->options.extra); ts_lexer_reset(&self->lexer, ts_length_add(self->lexer.current_position, size), - ts_point_add(self->lexer.current_point, point_size)); + ts_point_add(self->lexer.current_point, offset_point)); ts_parser__pop_reusable_subtree(self); return; } diff --git a/src/runtime/tree.c b/src/runtime/tree.c index 31c13815..ed9a8b9d 100644 --- a/src/runtime/tree.c +++ b/src/runtime/tree.c @@ -55,7 +55,7 @@ static void ts_tree__set_children(TSTree *self, TSTree **children, child->context.parent = self; child->context.index = i; child->context.offset = ts_tree_total_size(self); - child->context.end_point = ts_tree_end_point(self); + child->context.offset_point = ts_tree_offset_point(self); if (i == 0) { self->padding = child->padding; @@ -130,7 +130,7 @@ TSLength ts_tree_total_size(const TSTree *self) { return ts_length_add(self->padding, self->size); } -TSPoint ts_tree_total_size_point(const TSTree *self) { +TSPoint ts_tree_offset_point(const TSTree *self) { return ts_point_add(self->padding_point, self->size_point); } diff --git a/src/runtime/tree.h b/src/runtime/tree.h index 582b3381..cd83d0de 100644 --- a/src/runtime/tree.h +++ b/src/runtime/tree.h @@ -54,7 +54,7 @@ char *ts_tree_string(const TSTree *tree, const char **names, TSPoint ts_find_parent_offset_point(const TSTree *self); TSLength ts_tree_total_size(const TSTree *tree); -TSPoint ts_tree_total_size_point(const TSTree *self); +TSPoint ts_tree_offset_point(const TSTree *self); void ts_tree_prepend_children(TSTree *, size_t, TSTree **); void ts_tree_edit(TSTree *, TSInputEdit);