New step3 tests were added during basic implementation that broke Ada
and C.
with Ada.Command_Line;
+with Ada.Exceptions;
with Ada.Text_IO;
with Envs;
with Eval_Callback;
Init (Repl_Env);
loop
- Ada.Text_IO.Put ("user> ");
- exit when Ada.Text_IO.End_Of_File;
- Ada.Text_IO.Put_Line (Rep (Ada.Text_IO.Get_Line, Repl_Env));
+ begin
+ Ada.Text_IO.Put ("user> ");
+ exit when Ada.Text_IO.End_Of_File;
+ Ada.Text_IO.Put_Line (Rep (Ada.Text_IO.Get_Line, Repl_Env));
+ exception
+ when E : others =>
+ Ada.Text_IO.Put_Line
+ (Ada.Text_IO.Standard_Error,
+ Ada.Exceptions.Exception_Information (E));
+ end;
end loop;
end Step3_Env;
MalVal *a1 = _nth(ast, 1),
*a2 = _nth(ast, 2);
MalVal *res = EVAL(a2, env);
+ if (mal_error) return NULL;
env_set(env, a1, res);
return res;
} else if (strcmp("let*", a0->val.string) == 0) {
#ifdef USE_GC
#include <gc/gc.h>
+void nop_free(void* ptr);
+void GC_setup();
char* GC_strdup(const char *src);
#define MAL_GC_SETUP() GC_setup()
#define MAL_GC_MALLOC GC_MALLOC