diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-31 18:52:34 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-31 18:52:34 -0400 |
commit | 9d267fa1331a570e2b4c978f0b35a107a47b51c1 (patch) | |
tree | ed8c5bc7d5b3b2024fb4fee80f4ec86332fb277f /src/report.cc | |
parent | 75daee6a5df8154ecd6011f93af746105529a13d (diff) | |
download | ledger-9d267fa1331a570e2b4c978f0b35a107a47b51c1.tar.gz ledger-9d267fa1331a570e2b4c978f0b35a107a47b51c1.tar.bz2 ledger-9d267fa1331a570e2b4c978f0b35a107a47b51c1.zip |
Inspired by Omari Norman, I've rewritten main.cc so it's easy to approach.
Diffstat (limited to 'src/report.cc')
-rw-r--r-- | src/report.cc | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/report.cc b/src/report.cc index 37ac1912..e811666a 100644 --- a/src/report.cc +++ b/src/report.cc @@ -488,38 +488,7 @@ namespace { out << std::endl << "--- Expression tree ---" << std::endl; expr.dump(out); - out << std::endl << "--- Calculated value ---" << std::endl; - expr.calc(args).print(out); - out << std::endl; - - return 0L; - } - - value_t compile_command(call_scope_t& args) - { - var_t<string> arg(args, 0); - - if (! arg) { - throw std::logic_error("Usage: compile TEXT"); - return 1L; - } - - report_t& report(find_scope<report_t>(args)); - std::ostream& out(report.output_stream); - - out << "--- Input text ---" << std::endl; - out << *arg << std::endl; - - out << std::endl << "--- Text as parsed ---" << std::endl; - expr_t expr(*arg); - expr.print(out); - out << std::endl; - - out << std::endl << "--- Expression tree ---" << std::endl; - expr.dump(out); - expr.compile(args); - out << std::endl << "--- Compiled tree ---" << std::endl; expr.dump(out); @@ -680,11 +649,6 @@ expr_t::ptr_op_t report_t::lookup(const string& name) return WRAP_FUNCTOR(period_command); break; - case 'c': - if (std::strcmp(p, "compile") == 0) - return WRAP_FUNCTOR(compile_command); - break; - case 'e': if (std::strcmp(p, "eval") == 0) return WRAP_FUNCTOR(eval_command); |