From 583bbda8a8b8cb204ccf03fa917a287e65491185 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sat, 21 Apr 2018 11:11:11 +0200 Subject: Add print_eval for NODE_APP --- interpreter/eval.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/interpreter/eval.c b/interpreter/eval.c index cfcdb0c..2ea2f0b 100644 --- a/interpreter/eval.c +++ b/interpreter/eval.c @@ -388,8 +388,15 @@ void print_eval(FILE *out, struct fuspel *rules, struct node **node) { print_eval(out, rules, (struct node**) &(*node)->var2); fprintf(out, ")"); break; + case NODE_APP: + print_eval(out, rules, (struct node**) &(*node)->var1); + fprintf(out, " ("); + fflush(out); + print_eval(out, rules, (struct node**) &(*node)->var2); + fprintf(out, ")"); + break; default: - fprintf(out, "", (*node)->kind); + fprintf(out, "", (*node)->kind); break; } -- cgit v1.2.3