diff options
author | Teddy <[email protected]> | 2013-08-14 14:52:46 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2013-08-14 14:52:46 +0800 |
commit | 8c93190f057399889425a9103fe0615dcef4e1b7 (patch) | |
tree | e6b3dbc1967c3dc98cca6e8f2046f4a32afbbf92 /main.cpp | |
parent | c2522466d2fcb5273004f1989b89186cd68001d7 (diff) |
gc detect in list-specific built-ins, proper numeric conversion
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -21,18 +21,19 @@ void load_file(const char *fname) { exit(0); } tk.set_stream(f); + Pair *tree; while (1) { try { - Pair *tree = ast.absorb(&tk); + tree = ast.absorb(&tk); if (!tree) break; EvalObj *ret = eval.run_expr(tree); gc.expose(ret); } catch (GeneralError &e) { - fprintf(stderr, "An error occured: %s\n", e.get_msg().c_str()); + fprintf(stderr, "An error occured near [%s]: %s\n", tree->ext_repr().c_str(), e.get_msg().c_str()); } gc.force(); gc.cycle_resolve(); |