mirror of
https://github.com/odin-lang/Odin.git
synced 2026-05-26 13:48:23 +00:00
Disallow procedure calls with an associated deferred procedure to be used in logical binary expressions (short-circuiting)
This commit is contained in:
@@ -14,7 +14,6 @@ Token ast_token(Ast *node) {
|
||||
return node->CompoundLit.open;
|
||||
|
||||
case Ast_TagExpr: return node->TagExpr.token;
|
||||
case Ast_RunExpr: return node->RunExpr.token;
|
||||
case Ast_BadExpr: return node->BadExpr.begin;
|
||||
case Ast_UnaryExpr: return node->UnaryExpr.op;
|
||||
case Ast_BinaryExpr: return ast_token(node->BinaryExpr.left);
|
||||
@@ -155,9 +154,6 @@ Ast *clone_ast(Ast *node) {
|
||||
case Ast_TagExpr:
|
||||
n->TagExpr.expr = clone_ast(n->TagExpr.expr);
|
||||
break;
|
||||
case Ast_RunExpr:
|
||||
n->RunExpr.expr = clone_ast(n->RunExpr.expr);
|
||||
break;
|
||||
case Ast_UnaryExpr:
|
||||
n->UnaryExpr.expr = clone_ast(n->UnaryExpr.expr);
|
||||
break;
|
||||
@@ -458,15 +454,6 @@ Ast *ast_tag_expr(AstFile *f, Token token, Token name, Ast *expr) {
|
||||
return result;
|
||||
}
|
||||
|
||||
Ast *ast_run_expr(AstFile *f, Token token, Token name, Ast *expr) {
|
||||
Ast *result = alloc_ast_node(f, Ast_RunExpr);
|
||||
result->RunExpr.token = token;
|
||||
result->RunExpr.name = name;
|
||||
result->RunExpr.expr = expr;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Ast *ast_tag_stmt(AstFile *f, Token token, Token name, Ast *stmt) {
|
||||
Ast *result = alloc_ast_node(f, Ast_TagStmt);
|
||||
result->TagStmt.token = token;
|
||||
|
||||
Reference in New Issue
Block a user