From 648b83d6ead67a291dc023f93a7262622991be2a Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 30 Sep 2023 15:04:17 +0100 Subject: Add `or_break` and `or_continue` constructs --- src/check_stmt.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/check_stmt.cpp') diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 3f1b9611c..0fe44289c 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -102,8 +102,13 @@ gb_internal void check_stmt_list(CheckerContext *ctx, Slice const &stmts, new_flags |= Stmt_FallthroughAllowed; } + u32 prev_stmt_flags = ctx->stmt_flags; + ctx->stmt_flags = new_flags; + check_stmt(ctx, n, new_flags); + ctx->stmt_flags = prev_stmt_flags; + if (i+1 < max_non_constant_declaration) { switch (n->kind) { case Ast_ReturnStmt: -- cgit v1.2.3