diff options
author | Camil Staps | 2018-04-21 11:11:11 +0200 |
---|---|---|
committer | Camil Staps | 2018-04-21 11:11:11 +0200 |
commit | 583bbda8a8b8cb204ccf03fa917a287e65491185 (patch) | |
tree | ae4600ea153173a116c3bd5dfaa2215981d5d82d | |
parent | Update copyright (diff) |
Add print_eval for NODE_APP
-rw-r--r-- | interpreter/eval.c | 9 |
1 files changed, 8 insertions, 1 deletions
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, "<unimplemented:%d>", (*node)->kind); + fprintf(out, "<print_eval unimplemented case:%d>", (*node)->kind); break; } |