Commit 6e1399127ec69536314362772201d76652607da1

Thomas de Grivel 2023-08-10T15:47:19

wip env_resolve_call

diff --git a/libc3/env.c b/libc3/env.c
index 8297aa7..4e16e10 100644
--- a/libc3/env.c
+++ b/libc3/env.c
@@ -71,7 +71,7 @@ void env_error_tag (s_env *env, const s_tag *tag)
   }
 }
 
-bool env_resolve_ident (s_env *env, const s_call *call, s_tag *dest)
+bool env_resolve_call (s_env *env, s_call *call)
 {
   s_call c;
   s_facts_with_cursor cursor;
@@ -138,7 +138,7 @@ bool env_resolve_ident (s_env *env, const s_call *call, s_tag *dest)
   facts_with(&env->facts, &cursor, (t_facts_spec) {
       &tag_ident, &tag_is_a, &tag_macro, NULL, NULL });
   if (facts_with_cursor_next(&cursor))
-    result = env_eval_call_macro(env, &c, dest);
+    result = call->macro = true;
   else {
     facts_with_cursor_clean(&cursor);
     facts_with(&env->facts, &cursor, (t_facts_spec) {
diff --git a/libc3/env.h b/libc3/env.h
index b9fce6e..e5459fd 100644
--- a/libc3/env.h
+++ b/libc3/env.h
@@ -53,6 +53,7 @@ bool       env_operator_is_right_associative (s_env *env,
 bool       env_operator_is_unary (s_env *env, const s_ident *op);
 s8         env_operator_precedence (s_env *env,
                                     const s_ident *op);
+bool       env_resolve_call (s_env *env, s_call *call);
 
 /* control structures */
 void env_error_f (s_env *env, const char *fmt, ...);