From f8cedce5299d12adc3ce3249fd5b3a9fe5578c0a Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Tue, 3 Jan 2023 14:41:57 -0800 Subject: hypothetically fixed bug --- src/parser.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/parser.c') diff --git a/src/parser.c b/src/parser.c index 92e9ccf..7f174a5 100644 --- a/src/parser.c +++ b/src/parser.c @@ -212,6 +212,8 @@ ast_t *parse_all(parser_t *parser) { int i = 0; while (t != NULL) { cur = parse_expr(parser); + if (cur == NULL) + continue; i++; asts = realloc(asts, i * sizeof(ast_t *)); asts[i - 1] = cur; -- cgit