aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 230d077..eae0597 100644
--- a/main.cpp
+++ b/main.cpp
@@ -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());
}
}
}