diff options
author | Teddy <ted.sybil@gmail.com> | 2013-08-06 12:39:39 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2013-08-06 12:39:39 +0800 |
commit | 9e76d377dad809f4aa3faa700883dbfc9b2fa769 (patch) | |
tree | 4baeec32938ea656866b9158b1541af28e7e91d9 /main.cpp | |
parent | 5e5a8ab8b6046dccecf2cbb5a85324bbf42b43de (diff) |
vector, literal support!
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -21,6 +21,7 @@ int main() { ASTGenerator *ast = new ASTGenerator(); Evaluator *eval = new Evaluator(); + int rcnt = 0; while (1) { printf("Sonsi> "); @@ -29,11 +30,12 @@ int main() { Cons *tree = ast->absorb(tk); if (!tree) break; //tree_print(tree); - printf("%s\n", eval->run_expr(tree)->ext_repr().c_str()); + fprintf(stderr, "Ret> $%d = %s\n", rcnt++, + eval->run_expr(tree)->ext_repr().c_str()); } catch (GeneralError &e) { - printf("An error occured: %s\n", e.get_msg().c_str()); + fprintf(stderr, "An error occured: %s\n", e.get_msg().c_str()); } } } |