Improve parsing for or_return; allow #force_inline foo() or_return;

This commit is contained in:
gingerBill
2021-08-16 11:58:50 +01:00
parent 4c306a6f99
commit e3fef2dade
7 changed files with 59 additions and 59 deletions
-15
View File
@@ -1456,21 +1456,6 @@ bool all_operands_valid(Array<Operand> const &operands) {
return true;
}
Ast *strip_or_return_expr(Ast *node) {
for (;;) {
if (node == nullptr) {
return node;
}
if (node->kind == Ast_OrReturnExpr) {
node = node->OrReturnExpr.expr;
} else if (node->kind == Ast_ParenExpr) {
node = node->ParenExpr.expr;
} else {
return node;
}
}
}
void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
u32 mod_flags = flags & (~Stmt_FallthroughAllowed);
switch (node->kind) {