diff --git a/src/compiler/build_tables/build_parse_table.cc b/src/compiler/build_tables/build_parse_table.cc index b11b0967..d9118b5a 100644 --- a/src/compiler/build_tables/build_parse_table.cc +++ b/src/compiler/build_tables/build_parse_table.cc @@ -135,9 +135,9 @@ class ParseTableBuilder { conflict_manager(ParseConflictManager(grammar, lex_grammar)) {} pair > build() { - auto start_symbol = grammar.rules.empty() ? - make_shared(0, rules::SymbolOptionToken) : - make_shared(0); + auto start_symbol = grammar.rules.empty() + ? make_shared(0, rules::SymbolOptionToken) + : make_shared(0); ParseItem start_item(rules::START(), start_symbol, 0); add_parse_state( item_set_closure(start_item, { rules::END_OF_INPUT() }, grammar)); diff --git a/src/runtime/document.c b/src/runtime/document.c index 59f24eb1..02b0172c 100644 --- a/src/runtime/document.c +++ b/src/runtime/document.c @@ -8,12 +8,15 @@ struct TSDocument { TSParser *parser; const TSTree *tree; TSInput input; - size_t error_count; }; TSDocument *ts_document_make() { TSDocument *document = malloc(sizeof(TSDocument)); - *document = (TSDocument) { .input = (TSInput) {} }; + *document = (TSDocument) { + .input = (TSInput) { .data = NULL, .read_fn = NULL, .seek_fn = NULL }, + .parser = NULL, + .tree = NULL + }; return document; }