summaryrefslogtreecommitdiff
path: root/src/expr.cc
diff options
context:
space:
mode:
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) {