diff options
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/print.c b/src/print.c index e653571..49b6ec9 100644 --- a/src/print.c +++ b/src/print.c @@ -17,9 +17,10 @@ void print_float(ast_t *f) { printf("=> %f\n", f->float_value); } void print_symbol(ast_t *s) { printf("=> %s\n", s->string_value); } -void print_func(ast_t *f) {} +void print_func(ast_t *f) { print_pair(f->cdr); } void print_pair(ast_t *p) {} + void print(ast_t *res) { switch (res->type) { case AST_STRING: @@ -48,3 +49,8 @@ void print(ast_t *res) { break; } } + +void print_root(ast_t *root) { + for (int i = 0; i < root->root_size; i++) + print(root->subnodes[i]); +} |