aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorTeddy <ted.sybil@gmail.com>2013-08-06 12:39:39 +0800
committerTeddy <ted.sybil@gmail.com>2013-08-06 12:39:39 +0800
commit9e76d377dad809f4aa3faa700883dbfc9b2fa769 (patch)
tree4baeec32938ea656866b9158b1541af28e7e91d9 /main.cpp
parent5e5a8ab8b6046dccecf2cbb5a85324bbf42b43de (diff)
vector, literal support!
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());
}
}
}