aboutsummaryrefslogtreecommitdiff
path: root/interpreter/print.c
diff options
context:
space:
mode:
authorCamil Staps2016-08-29 19:55:21 +0200
committerCamil Staps2016-08-29 19:55:21 +0200
commitc62d7748aace9ae1234c53703fe8231236c9e123 (patch)
treec0c6c6017914cfe9b3b8995759a454564bb6faf3 /interpreter/print.c
parentmatch EXPR_APP (diff)
Currying arguments and Code applications
Diffstat (limited to 'interpreter/print.c')
-rw-r--r--interpreter/print.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/interpreter/print.c b/interpreter/print.c
index d700101..edcedf3 100644
--- a/interpreter/print.c
+++ b/interpreter/print.c
@@ -3,6 +3,7 @@
#include <stdio.h>
#include "log.h"
+#include "mem.h"
void print_token(token* tk) {
char c;
@@ -113,3 +114,11 @@ void print_fuspel(fuspel* rules) {
print_fuspel(rules->rest);
}
}
+
+void print_node(struct node* node) {
+ expression* e = my_calloc(1, sizeof(expression));
+ cpy_node_to_expression(e, node);
+ print_expression(e);
+ free_expression(e);
+ my_free(e);
+}