diff options
Diffstat (limited to 'compiler/fuspelc.c')
-rw-r--r-- | compiler/fuspelc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/fuspelc.c b/compiler/fuspelc.c index 38e4a99..9964349 100644 --- a/compiler/fuspelc.c +++ b/compiler/fuspelc.c @@ -8,6 +8,14 @@ #include "eval.h" #include "print.h" +//static char* program = +// "take_one [x:_] = [x:[]];" +// "inflist = [1:inflist];" +// "main = take_one inflist;"; +//static char* program = +// "append [] ys = ys;" +// "append [x:xs] ys = [x:append xs ys];" +// "main = append [1:[2:[3:[]]]] [5:[6:[]]];"; static char* program = "singleton x = [x:[]];" "push x y = [x:y];" @@ -52,6 +60,7 @@ int main(void) { strcpy(to_eval.var1, "main"); evaled = eval(pgm, &to_eval); + free_expression(&to_eval); if (evaled) { print_expression(evaled); printf("\n"); @@ -60,5 +69,8 @@ int main(void) { free(evaled); } + free_fuspel(pgm); + free(pgm); + return 0; } |