diff options
| author | gingerBill <bill@gingerbill.org> | 2018-05-26 23:12:55 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-05-26 23:12:55 +0100 |
| commit | c067b90403ab8493daa0bf5867b2bd92319feea5 (patch) | |
| tree | f8d8162cc7d0e937c925ed8b07831ffc0e9c75de /src/check_stmt.cpp | |
| parent | 5b6770f3d297c0639bdbe8b1b029616c16669165 (diff) | |
Add basic package support (no IR support yet)
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 54226e565..c0e885664 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -627,7 +627,10 @@ void check_switch_stmt(Checker *c, AstNode *node, u32 mod_flags) { Token token = {}; token.pos = ast_node_token(ss->body).pos; token.string = str_lit("true"); - x.expr = ast_ident(c->curr_ast_file, token); + + x.expr = gb_alloc_item(c->allocator, AstNode); + x.expr->kind = AstNode_Ident; + x.expr->Ident.token = token; } // NOTE(bill): Check for multiple defaults |