diff options
| author | gingerBill <bill@gingerbill.org> | 2018-08-04 23:14:55 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-08-04 23:14:55 +0100 |
| commit | cdbf831a7a6d9bc36e3cf76d525c44af88dc0a53 (patch) | |
| tree | ea6d0be0d032a77f6d7c0303be4dffd31c837412 /src/check_stmt.cpp | |
| parent | 0718f14774c152b84edb747c03ca53b9400407b9 (diff) | |
Replace `context <- c {}` with `context = c;`. context assignments are scope based
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 4a98db600..4a7c6c621 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -167,10 +167,6 @@ bool check_is_terminating(Ast *node) { } return has_default; case_end; - - case_ast_node(pc, PushContext, node); - return check_is_terminating(pc->body); - case_end; } return false; @@ -306,6 +302,10 @@ Type *check_assignment_variable(CheckerContext *ctx, Operand *lhs, Operand *rhs) break; } + case Addressing_Context: { + break; + } + default: { if (lhs->expr->kind == Ast_SelectorExpr) { // NOTE(bill): Extra error checks @@ -1597,13 +1597,6 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) { } case_end; - case_ast_node(pa, PushContext, node); - Operand op = {}; - check_expr(ctx, &op, pa->expr); - check_assignment(ctx, &op, t_context, str_lit("argument to context <-")); - check_stmt(ctx, pa->body, mod_flags); - case_end; - case_ast_node(fb, ForeignBlockDecl, node); Ast *foreign_library = fb->foreign_library; CheckerContext c = *ctx; |