aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-09-08 18:28:18 +0100
committerGinger Bill <bill@gingerbill.org>2016-09-08 18:28:18 +0100
commit56dd12c54c20b2e4a7f896999ece1cf184f09e88 (patch)
tree64947563e064550cef3ecdc26bd9b36bb05b48a3 /src/parser.cpp
parentc6d02e4778486c350a732105b6413ba1d32a234a (diff)
Fix match statements for the new AstNodeArray type
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index ec741ce1e..24810259d 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -78,6 +78,7 @@ enum CallExprKind {
AstNodeArray make_ast_node_array(AstFile *f) {
AstNodeArray a;
gb_array_init(a, gb_arena_allocator(&f->arena));
+ GB_ASSERT(a != NULL);
return a;
}
@@ -2220,7 +2221,7 @@ AstNode *parse_for_stmt(AstFile *f) {
AstNode *parse_case_clause(AstFile *f) {
Token token = f->cursor[0];
- AstNodeArray list = NULL;
+ AstNodeArray list = make_ast_node_array(f);
if (allow_token(f, Token_case)) {
list = parse_rhs_expr_list(f);
} else {