From 08488d4cd733ff37a0a096f4b5bcbece0c181cc9 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 17 Aug 2008 04:41:02 -0400 Subject: Removed more dead code and todo comments, and made it possible to stream compiled value expressions. --- src/expr.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/expr.cc') 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; } -- cgit v1.2.3