From cdbf831a7a6d9bc36e3cf76d525c44af88dc0a53 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 4 Aug 2018 23:14:55 +0100 Subject: Replace `context <- c {}` with `context = c;`. context assignments are scope based --- src/check_stmt.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/check_stmt.cpp') 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; -- cgit v1.2.3