diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-08 04:30:05 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-08 04:30:05 -0400 |
commit | 2d5ad7dee89ebe9c014270882e44d3a7a8a626fd (patch) | |
tree | 20a6d2c34d86dcc9f68201dc1028f9053834ba7b /src/report.h | |
parent | f7f5ed3d0fe96854f048609433fc68a3fb6fcf34 (diff) | |
download | ledger-2d5ad7dee89ebe9c014270882e44d3a7a8a626fd.tar.gz ledger-2d5ad7dee89ebe9c014270882e44d3a7a8a626fd.tar.bz2 ledger-2d5ad7dee89ebe9c014270882e44d3a7a8a626fd.zip |
Added support for value expression definitions.
Example:
] expr f(x) := x + 100
] expr f(100)
200
Diffstat (limited to 'src/report.h')
-rw-r--r-- | src/report.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/report.h b/src/report.h index c4ef7f92..1aff9212 100644 --- a/src/report.h +++ b/src/report.h @@ -166,6 +166,10 @@ public: option_t<report_t> * lookup_option(const char * p); + virtual void define(const string& name, expr_t::ptr_op_t def) { + session.define(name, def); + } + virtual expr_t::ptr_op_t lookup(const string& name); /** |