aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/parser.c b/src/parser.c
index ce8eef8..cdd3c47 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -976,8 +976,7 @@ parse_symbol(Parser *parser) {
976 } 976 }
977 } else if (parse_match(parser, TOK_LSQUARE)) { 977 } else if (parse_match(parser, TOK_LSQUARE)) {
978 node->kind = NODE_SYMBOL_IDX; 978 node->kind = NODE_SYMBOL_IDX;
979 parse_consume(parser, TOK_NUM_INT, cstr("no array size given")); 979 parse_expr(parser, PREC_LOW);
980 parse_number(parser);
981 node->arr_size = array_pop(parser->nodes); 980 node->arr_size = array_pop(parser->nodes);
982 parse_consume(parser, TOK_RSQUARE, 981 parse_consume(parser, TOK_RSQUARE,
983 cstr("unmatched brackets ']' in array type")); 982 cstr("unmatched brackets ']' in array type"));