Rename ts_tree_total_size_point to ts_tree_offset_point
This commit is contained in:
parent
2669933d06
commit
ad58b752e6
3 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue