diff options
author | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2025-05-22 13:49:33 +0200 |
---|---|---|
committer | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2025-05-22 13:49:33 +0200 |
commit | 84e800f7f8a81cb022cce69c4d6faef8deb3a023 (patch) | |
tree | 57e1bfb4e7c5edfff3d059f9bc67879f2a100fac | |
parent | a80f818de34a631b4b1c9c9e866c6f43de07d816 (diff) | |
download | imp-84e800f7f8a81cb022cce69c4d6faef8deb3a023.tar.gz imp-84e800f7f8a81cb022cce69c4d6faef8deb3a023.zip |
[bugfix] print ast, assign
-rw-r--r-- | src/interpreter.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interpreter.c b/src/interpreter.c index 8176bad..ecf26bd 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -105,9 +105,10 @@ void ast_print(ASTNode *node, int depth) { break; } case NT_ASSIGN: { - printf("%*sASSIGN %s=%d\n", indent, "", - node->u.d_assign.var->u.d_var.name, - node->u.d_assign.aexp->u.d_int.val); + printf("%*sASSIGN %s=", indent, "", + node->u.d_assign.var->u.d_var.name); + ast_print(node->u.d_assign.aexp, 0); + printf("\n"); break; } case NT_SEQ: { |