mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-18 11:52:22 -07:00
Replace context <- c {} with context = c;. context assignments are scope based
This commit is contained in:
+4
-11
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user