}
binop->type = &basic_types[Basic_Kind_Bool];
+ if (binop->flags & Ast_Flag_Comptime) {
+ // NOTE: Not a binary op
+ *pbinop = (AstBinaryOp *) ast_reduce(semstate.node_allocator, (AstTyped *) binop);
+ }
+
return 0;
}
}
binop->type = &basic_types[Basic_Kind_Bool];
+
+ if (binop->flags & Ast_Flag_Comptime) {
+ // NOTE: Not a binary op
+ *pbinop = (AstBinaryOp *) ast_reduce(semstate.node_allocator, (AstTyped *) binop);
+ }
return 0;
}
// NOTE: Not a binary op
*pbinop = (AstBinaryOp *) ast_reduce(semstate.node_allocator, (AstTyped *) binop);
}
-
return 0;
}
} \
break;
-
-AstTyped* ast_reduce(bh_allocator a, AstTyped* node);
-
AstNumLit* ast_reduce_binop(bh_allocator a, AstBinaryOp* node) {
AstNumLit* left = (AstNumLit *) ast_reduce(a, node->left);
AstNumLit* right = (AstNumLit *) ast_reduce(a, node->right);