From: fennecdjay Date: Tue, 24 Sep 2019 19:15:11 +0000 (+0200) Subject: :art: Remove useless unary_uniq op checker X-Git-Tag: nightly~2204 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=9f48ee334e8dbcb96be7592099fc4b51fba89dee;p=gwion.git :art: Remove useless unary_uniq op checker --- diff --git a/include/import.h b/include/import.h index 3122f6ff..8db7f574 100644 --- a/include/import.h +++ b/include/import.h @@ -72,7 +72,6 @@ ANN Type_Decl* str2decl(const Env, const m_str, m_uint* depth); OP_CHECK(opck_const_rhs); OP_CHECK(opck_unary_meta); OP_CHECK(opck_unary_meta2); -OP_CHECK(opck_unary_meta2_uniq); OP_CHECK(opck_unary); OP_CHECK(opck_post); OP_CHECK(opck_rassign); diff --git a/src/lib/opfunc.c b/src/lib/opfunc.c index 0f4a9dfc..5053d515 100644 --- a/src/lib/opfunc.c +++ b/src/lib/opfunc.c @@ -69,15 +69,6 @@ OP_CHECK(opck_unary_meta2) { return t_int; } -OP_CHECK(opck_unary_meta2_uniq) { - const Exp_Unary* unary = (Exp_Unary*)data; - CHECK_OO(opck_unary_meta2(env, data, mut)) - if(unary->exp->next) - ERR_N(exp_self(unary)->pos, - _("'%s' must be applied to a unique expression"), s_name(unary->op)) - return t_int; -} - OP_CHECK(opck_unary) { const Exp_Unary* unary = (Exp_Unary*)data; if(unary->exp->meta != ae_meta_var) diff --git a/src/lib/prim.c b/src/lib/prim.c index 295e6809..3f4fc03a 100644 --- a/src/lib/prim.c +++ b/src/lib/prim.c @@ -62,7 +62,6 @@ static GWION_IMPORT(int_unary) { GWI_BB(gwi_oper_ini(gwi, NULL, "int", "int")) GWI_BB(gwi_oper_add(gwi, opck_unary_meta)) GWI_BB(gwi_oper_end(gwi, "-", int_negate)) - GWI_BB(gwi_oper_add(gwi, opck_unary_meta2_uniq)) GWI_BB(gwi_oper_end(gwi, "!", IntNot)) CHECK_OP("++", unary, pre_inc) CHECK_OP("--", unary, pre_dec) @@ -273,11 +272,8 @@ static GWION_IMPORT(float) { GWI_BB(gwi_oper_ini(gwi, NULL, "float", "float")) CHECK_FF("-", unary_meta, negate) GWI_BB(gwi_oper_ini(gwi, NULL, "float", "int")) - CHECK_FF("!", unary_meta2_uniq, not) GWI_BB(gwi_oper_ini(gwi, NULL, "time", "int")) - CHECK_FF("!", unary_meta2_uniq, not) GWI_BB(gwi_oper_ini(gwi, NULL, "dur", "int")) - CHECK_FF("!", unary_meta2_uniq, not) GWI_BB(gwi_oper_ini(gwi, "int", "dur", "dur")) GWI_BB(gwi_oper_end(gwi, "::", int_float_mul)) GWI_BB(gwi_oper_ini(gwi, "float", "dur", "dur")) diff --git a/tests/error/unary_uniq.gw b/tests/error/unary_uniq.gw deleted file mode 100644 index 548cfe0e..00000000 --- a/tests/error/unary_uniq.gw +++ /dev/null @@ -1,2 +0,0 @@ -#! [contains] must be applied to a unique expression -!(1,2);