summaryrefslogtreecommitdiff
path: root/src/expr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr.cc')
-rw-r--r--src/expr.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/expr.cc b/src/expr.cc
index ee06187a..69319105 100644
--- a/src/expr.cc
+++ b/src/expr.cc
@@ -190,4 +190,9 @@ std::ostream& operator<<(std::ostream& out, const expr_t& expr) {
return out;
}
+string expr_context(const expr_t& expr)
+{
+ return expr ? op_context(expr.ptr) : "<empty expression>";
+}
+
} // namespace ledger