mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-16 10:52:22 -07:00
Improve parsing for or_return; allow #force_inline foo() or_return;
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user