From: Jérémie Astor Date: Mon, 20 Sep 2021 18:36:42 +0000 (+0200) Subject: :art: use ?= in match X-Git-Tag: nightly~432 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=78b84d9f3fcf5f7da1b7265e1bd6668bd8e5424a;p=gwion.git :art: use ?= in match --- diff --git a/src/emit/emit.c b/src/emit/emit.c index 6c649b5e..719e2558 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -2494,14 +2494,14 @@ ANN static Symbol case_op(const Emitter emit, const Exp base, const Exp e, } } } - if (!n) return insert_symbol("=="); + if (!n) return insert_symbol("?="); regpush(emit, SZ_INT); CHECK_BO(emit_exp(emit, e)); - const Exp_Binary bin = {.lhs = base, .rhs = e, .op = insert_symbol("==")}; + const Exp_Binary bin = {.lhs = base, .rhs = e, .op = insert_symbol("?=")}; struct Exp_ ebin = { .d = {.exp_binary = bin}, }; - struct Op_Import opi = {.op = insert_symbol("=="), + struct Op_Import opi = {.op = insert_symbol("?="), .lhs = base->type, .rhs = e->type, .data = (uintptr_t)&ebin.d.exp_binary, diff --git a/src/parse/check.c b/src/parse/check.c index 03136e57..e6fbe284 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -1337,7 +1337,7 @@ ANN static Symbol case_op(const Env env, const Type base, const Exp e) { } } } - return insert_symbol("=="); + return insert_symbol("?="); } ANN static m_bool match_case_exp(const Env env, Exp e) {