diff --git a/src/compiler/build_tables/remove_duplicate_states.h b/src/compiler/build_tables/remove_duplicate_states.h index 35b2d822..48734596 100644 --- a/src/compiler/build_tables/remove_duplicate_states.h +++ b/src/compiler/build_tables/remove_duplicate_states.h @@ -8,8 +8,7 @@ namespace tree_sitter { namespace build_tables { template -std::map remove_duplicate_states( - std::vector *states) { +std::map remove_duplicate_states(std::vector *states) { std::map replacements; while (true) { diff --git a/src/runtime/parser.c b/src/runtime/parser.c index 4410de11..9403fbc5 100644 --- a/src/runtime/parser.c +++ b/src/runtime/parser.c @@ -185,7 +185,8 @@ static TSTree *ts_parser__get_next_lookahead(TSParser *self, int head) { } if (!ts_parser__can_reuse(self, head, state->reusable_subtree)) { - LOG("breakdown_unreusable sym:%s", SYM_NAME(state->reusable_subtree->symbol)); + LOG("breakdown_unreusable sym:%s", + SYM_NAME(state->reusable_subtree->symbol)); ts_parser__breakdown_reusable_subtree(state); continue; } @@ -511,9 +512,9 @@ static void ts_parser__accept(TSParser *self, int head) { TSTree *root = pop_result->trees[i]; size_t leading_extra_count = i; size_t trailing_extra_count = pop_result->tree_count - 1 - i; - TSTree **new_children = - malloc((root->child_count + leading_extra_count + trailing_extra_count) * - sizeof(TSTree *)); + TSTree **new_children = malloc( + (root->child_count + leading_extra_count + trailing_extra_count) * + sizeof(TSTree *)); memcpy(new_children, pop_result->trees, leading_extra_count * sizeof(TSTree *)); memcpy(new_children + leading_extra_count, root->children, @@ -526,7 +527,8 @@ static void ts_parser__accept(TSParser *self, int head) { ts_tree_set_children(root, new_count, new_children); ts_tree_retain(root); ts_parser__remove_head(self, pop_result->head_index); - self->finished_tree = ts_parser__select_tree(self, self->finished_tree, root); + self->finished_tree = + ts_parser__select_tree(self, self->finished_tree, root); break; } } diff --git a/src/runtime/tree.c b/src/runtime/tree.c index 0f9a279c..1442c28f 100644 --- a/src/runtime/tree.c +++ b/src/runtime/tree.c @@ -220,8 +220,8 @@ static size_t ts_tree__write_to_string(const TSTree *self, char *cursor = string; char **writer = (limit > 0) ? &cursor : &string; - bool visible = is_root || (self->visible && - (include_anonymous || self->named)); + bool visible = + is_root || (self->visible && (include_anonymous || self->named)); if (visible && !is_root) cursor += snprintf(*writer, limit, " "); diff --git a/src/runtime/tree.h b/src/runtime/tree.h index 615d6f6e..26a41a27 100644 --- a/src/runtime/tree.h +++ b/src/runtime/tree.h @@ -68,7 +68,8 @@ static inline TSLength ts_tree_total_size(const TSTree *self) { } static inline bool ts_tree_is_fragile(const TSTree *tree) { - return tree->fragile_left || tree->fragile_right || ts_tree_total_chars(tree) == 0; + return tree->fragile_left || tree->fragile_right || + ts_tree_total_chars(tree) == 0; } #ifdef __cplusplus