Add #load(path) or_else default in favour of #load_or(path, default)

This commit is contained in:
gingerBill
2022-08-11 13:01:54 +01:00
parent 0997df4fcf
commit 38102f14c1
4 changed files with 171 additions and 81 deletions

View File

@@ -351,6 +351,10 @@ lbValue lb_emit_try_has_value(lbProcedure *p, lbValue rhs) {
lbValue lb_emit_or_else(lbProcedure *p, Ast *arg, Ast *else_expr, TypeAndValue const &tv) {
if (arg->state_flags & StateFlag_DirectiveWasFalse) {
return lb_build_expr(p, else_expr);
}
lbValue lhs = {};
lbValue rhs = {};
lb_emit_try_lhs_rhs(p, arg, tv, &lhs, &rhs);