Commit f998a044396f03210bbf05250aa88f548fb40d7c

Thomas de Grivel 2024-02-15T12:38:51

pin operator

diff --git a/.ic3_history b/.ic3_history
index 753f3d6..6e3377b 100644
--- a/.ic3_history
+++ b/.ic3_history
@@ -1,15 +1,3 @@
-quote %GL.Object{}
-quote %GL.Sphere{}
-dlopen("../libc3/window/.libs/libc3_window_debug.so.0.0")
-dlopen("libc3/window/.libs/libc3_window_debug.dylib")
-dlopen("libc3/window/sdl2/.libs/libc3_window_sdl2_debug.dylib")
-quote %GL.Sphere{}
-do
-123
-456
-789
-end
-123/
 234
 123/123
 123/ 123
@@ -97,4 +85,15 @@ List.reverse([1, 2, 3])
 dlopen("libc3/window/.libs/libc3_window_debug.so")
 dlopen("libc3/window/sdl2/.libs/libc3_window_sdl2.so")
 %GL.Object{}
-
+name = "Plop"
+m = macro (name) { quote "Hello, " + name + " !" }
+m(name)
+m(^ name)
+name = "Plop"
+m = macro (name) { quote "Hello, " + unquote name + " !" }
+name = "Plop"
+m = macro (name) { quote "Hello, " + unquote name + " !" }
+m(name)
+m("Plop")
+m(^ name)
+m = macro (name) { quote "Hello, " + unquote name + " !" }
diff --git a/libc3/env.c b/libc3/env.c
index 613e38b..f92a8b0 100644
--- a/libc3/env.c
+++ b/libc3/env.c
@@ -415,7 +415,7 @@ bool env_eval_equal_tag (s_env *env, const s_tag *a, const s_tag *b,
     return true;
   }
   if (a->type == TAG_CALL &&
-      //a->data.call.ident.module == &g_sym_C3 &&
+      a->data.call.ident.module == &g_sym_C3 &&
       a->data.call.ident.sym == &g_sym_operator_pin) {
     if (! env_eval_tag(env, &a->data.call.arguments->tag, &tmp_a))
       return false;
@@ -427,7 +427,7 @@ bool env_eval_equal_tag (s_env *env, const s_tag *a, const s_tag *b,
     return true;
   }
   if (b->type == TAG_CALL &&
-      //b->data.call.ident.module == &g_sym_C3 &&
+      b->data.call.ident.module == &g_sym_C3 &&
       b->data.call.ident.sym == &g_sym_operator_pin) {
     if (! env_eval_tag(env, &b->data.call.arguments->tag, &tmp_b))
       return false;