diff options
author | John Wiegley <johnw@newartisans.com> | 2008-08-17 04:41:02 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-08-17 04:41:02 -0400 |
commit | 08488d4cd733ff37a0a096f4b5bcbece0c181cc9 (patch) | |
tree | d7a9e55a030707adab9935885f2fad278d10e83b /src/expr.cc | |
parent | 1c079630cf21c2e257e272897a987c0968571865 (diff) | |
download | fork-ledger-08488d4cd733ff37a0a096f4b5bcbece0c181cc9.tar.gz fork-ledger-08488d4cd733ff37a0a096f4b5bcbece0c181cc9.tar.bz2 fork-ledger-08488d4cd733ff37a0a096f4b5bcbece0c181cc9.zip |
Removed more dead code and todo comments, and made it possible to stream
compiled value expressions.
Diffstat (limited to 'src/expr.cc')
-rw-r--r-- | src/expr.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/expr.cc b/src/expr.cc index 37433179..73bf2993 100644 --- a/src/expr.cc +++ b/src/expr.cc @@ -32,7 +32,6 @@ #include "expr.h" #include "parser.h" #include "op.h" -#include "scope.h" // jww (2008-08-01): not necessary namespace ledger { @@ -160,10 +159,10 @@ value_t expr_t::eval(const string& _expr, scope_t& scope) return expr_t(_expr).calc(scope); } -void expr_t::print(std::ostream& out, scope_t& scope) const +void expr_t::print(std::ostream& out) const { if (ptr) { - op_t::print_context_t context(scope); + op_t::print_context_t context; ptr->print(out, context); } } @@ -194,9 +193,7 @@ void expr_t::shutdown() } std::ostream& operator<<(std::ostream& out, const expr_t& expr) { - // jww (2008-08-01): shouldn't be necessary - symbol_scope_t scope; - expr.print(out, scope); + expr.print(out); return out; } |