diff options
author | John Wiegley <johnw@newartisans.com> | 2009-03-03 13:36:23 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-03-03 13:36:23 -0400 |
commit | 478998b4e9f5ce3b73361c9acca73a2222354942 (patch) | |
tree | f8766a2b4b6e9044f521cc755de33e6edadf8067 /src/report.cc | |
parent | 0f9d919367ada929daa6fc8d8a176a4ba63308b2 (diff) | |
download | fork-ledger-478998b4e9f5ce3b73361c9acca73a2222354942.tar.gz fork-ledger-478998b4e9f5ce3b73361c9acca73a2222354942.tar.bz2 fork-ledger-478998b4e9f5ce3b73361c9acca73a2222354942.zip |
Added a "null" value for value expressions
Diffstat (limited to 'src/report.cc')
-rw-r--r-- | src/report.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/report.cc b/src/report.cc index 6a311bb8..708ee39a 100644 --- a/src/report.cc +++ b/src/report.cc @@ -305,6 +305,10 @@ value_t report_t::fn_ansify_if(call_scope_t& scope) } namespace { + value_t fn_null(call_scope_t&) { + return NULL_VALUE; + } + template <class Type = post_t, class handler_ptr = post_handler_ptr, void (report_t::*report_method)(handler_ptr) = @@ -716,6 +720,11 @@ expr_t::ptr_op_t report_t::lookup(const string& name) return MAKE_FUNCTOR(report_t::fn_market); break; + case 'n': + if (is_eq(p, "null")) + return WRAP_FUNCTOR(fn_null); + break; + case 'o': if (WANT_OPT()) { const char * q = p + OPT_PREFIX_LEN; if (option_t<report_t> * handler = lookup_option(q)) |