diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-07 04:27:28 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-07 04:27:28 -0400 |
commit | 011f35b730817034168369be1a7bd62b31146b64 (patch) | |
tree | ad5c85c5417278cbb6dd4b1e544e36f6ebc304e0 /src/expr.cc | |
parent | 19694cf2a2986849048ab01fbbfda7f0b9ee102a (diff) | |
download | fork-ledger-011f35b730817034168369be1a7bd62b31146b64.tar.gz fork-ledger-011f35b730817034168369be1a7bd62b31146b64.tar.bz2 fork-ledger-011f35b730817034168369be1a7bd62b31146b64.zip |
Implemented expr_context.
Diffstat (limited to 'src/expr.cc')
-rw-r--r-- | src/expr.cc | 5 |
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 |