diff options
author | Preston Pan <preston@nullring.xyz> | 2023-01-03 14:41:57 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2023-01-03 14:41:57 -0800 |
commit | f8cedce5299d12adc3ce3249fd5b3a9fe5578c0a (patch) | |
tree | df77b3d66798665b8c170a876fad00a412d922d7 /src/parser.c | |
parent | 41bfa91100b3ddf36496b5dff6e10bfd5394017d (diff) |
hypothetically fixed bug
Diffstat (limited to 'src/parser.c')
-rw-r--r-- | src/parser.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |