diff --git a/src/runtime/document.c b/src/runtime/document.c index 063d8fbd..8712c3aa 100644 --- a/src/runtime/document.c +++ b/src/runtime/document.c @@ -9,9 +9,7 @@ struct TSDocument { TSNode *node; }; -TSDocument *ts_document_make() { - return calloc(sizeof(TSDocument), 1); -} +TSDocument *ts_document_make() { return calloc(sizeof(TSDocument), 1); } void ts_document_free(TSDocument *document) { ts_parser_destroy(&document->parser); diff --git a/src/runtime/parser.c b/src/runtime/parser.c index 8a3f7536..a521c1b0 100644 --- a/src/runtime/parser.c +++ b/src/runtime/parser.c @@ -6,10 +6,10 @@ #include "runtime/stack.h" #include "runtime/parser.h" -#define DEBUG_PARSE(...) \ - if (parser->debug) { \ +#define DEBUG_PARSE(...) \ + if (parser->debug) { \ fprintf(stderr, "PARSE " __VA_ARGS__); \ - fprintf(stderr, "\n"); \ + fprintf(stderr, "\n"); \ } static const TSParseAction *actions_for_state(const TSLanguage *language, diff --git a/src/runtime/tree.c b/src/runtime/tree.c index 69be08f8..91253b7e 100644 --- a/src/runtime/tree.c +++ b/src/runtime/tree.c @@ -54,10 +54,10 @@ TSTree *ts_tree_make_node(TSSymbol symbol, size_t child_count, .symbol = symbol, .size = size, .offset = offset, - .options = options, - .children = children, - .child_count = child_count, - .visible_child_count = visible_child_count, }; + .options = options }; + result->children = children; + result->child_count = child_count; + result->visible_child_count = visible_child_count; TSChildWithPosition *visible_children = ts_tree_visible_children(result, NULL);