From 78b84d9f3fcf5f7da1b7265e1bd6668bd8e5424a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 20 Sep 2021 20:36:42 +0200 Subject: [PATCH] :art: use ?= in match --- src/emit/emit.c | 6 +++--- src/parse/check.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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) { -- 2.43.0