diff options
| author | gingerBill <bill@gingerbill.org> | 2023-09-30 15:04:17 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-09-30 15:04:17 +0100 |
| commit | 648b83d6ead67a291dc023f93a7262622991be2a (patch) | |
| tree | 722495f871bb992e44e321d894879337dd03c20c /src/check_stmt.cpp | |
| parent | 4e97b833126d9773ec23a0a0652beb19aab4aea4 (diff) | |
Add `or_break` and `or_continue` constructs
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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<Ast *> 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: |