]> Nishi Git Mirror - gwion.git/commitdiff
:art: Remove useless unary_uniq op checker
authorfennecdjay <astor.jeremie@wanadoo.fr>
Tue, 24 Sep 2019 19:15:11 +0000 (21:15 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Tue, 24 Sep 2019 19:15:11 +0000 (21:15 +0200)
include/import.h
src/lib/opfunc.c
src/lib/prim.c
tests/error/unary_uniq.gw [deleted file]

index 3122f6ff06b85c60399c22d5ff6dc94b5885c43e..8db7f5742307d2bc159dacbdd1582268b7df2c66 100644 (file)
@@ -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);
index 0f4a9dfc1bcc977f3d37a7a0257da794c450e232..5053d5158075994bd6696afcaaebe2b9ccb0559d 100644 (file)
@@ -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)
index 295e6809fd66d72b7ff11a491ef0ae98d0487dc6..3f4fc03abe005f248f3a111757361114d81fe246 100644 (file)
@@ -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 (file)
index 548cfe0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#! [contains] must be applied to a unique expression
-!(1,2);