summaryrefslogtreecommitdiff
path: root/src/expr.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-28 23:46:14 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-28 23:46:14 -0400
commit2b3f3e9867431174f5b5b25e47098a7218213a82 (patch)
treea27560ebcfad59813cd5e988ffae933c1d04cec3 /src/expr.cc
parent375f6c257d23ac7655ce0738a72acceb78119457 (diff)
parent52433e56e562976887325ce48a6271abb82a89aa (diff)
downloadledger-2b3f3e9867431174f5b5b25e47098a7218213a82.tar.gz
ledger-2b3f3e9867431174f5b5b25e47098a7218213a82.tar.bz2
ledger-2b3f3e9867431174f5b5b25e47098a7218213a82.zip
Merge branch 'next'
Diffstat (limited to 'src/expr.cc')
-rw-r--r--src/expr.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/expr.cc b/src/expr.cc
index 89214d51..4f12a648 100644
--- a/src/expr.cc
+++ b/src/expr.cc
@@ -78,6 +78,16 @@ expr_t::ptr_op_t expr_t::get_op() throw()
return ptr;
}
+string expr_t::text()
+{
+ if (str.empty()) {
+ std::ostringstream out;
+ ptr->print(out);
+ set_text(out.str());
+ }
+ return str;
+}
+
expr_t& expr_t::operator=(const expr_t& _expr)
{
if (this != &_expr) {