diff options
author | John Wiegley <johnw@newartisans.com> | 2008-08-03 23:44:18 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-08-03 23:44:18 -0400 |
commit | bcffbc96ba88bd19f5f8ac00015ff38131fd6466 (patch) | |
tree | 7f4a9646bb05f138b00cdc7127dd45cc05142cb5 /report.h | |
parent | 8a21391d0a6d6187855b40530f25b1d8beb0d67a (diff) | |
download | fork-ledger-bcffbc96ba88bd19f5f8ac00015ff38131fd6466.tar.gz fork-ledger-bcffbc96ba88bd19f5f8ac00015ff38131fd6466.tar.bz2 fork-ledger-bcffbc96ba88bd19f5f8ac00015ff38131fd6466.zip |
Regular expressions are working again, such that very basic register reports
are now possible.
Diffstat (limited to 'report.h')
-rw-r--r-- | report.h | 23 |
1 files changed, 16 insertions, 7 deletions
@@ -198,6 +198,7 @@ public: // Config options // +#if 0 void eval(const string& expr) { expr_t(expr).calc(*this); } @@ -206,22 +207,23 @@ public: return NULL_VALUE; } - value_t option_amount(call_scope_t& args) { + value_t option_amount_(call_scope_t& args) { eval(string("t=") + args[0].as_string()); return NULL_VALUE; } - value_t option_total(call_scope_t& args) { + value_t option_total_(call_scope_t& args) { eval(string("T()=") + args[0].as_string()); return NULL_VALUE; } - value_t option_format(call_scope_t& args) { - format_string = args[0].as_string(); + value_t option_raw(call_scope_t&) { + raw_mode = true; return NULL_VALUE; } +#endif - value_t option_raw(call_scope_t&) { - raw_mode = true; + value_t option_format_(call_scope_t& args) { + format_string = args[0].as_string(); return NULL_VALUE; } @@ -229,11 +231,18 @@ public: std::cout << "This is foo" << std::endl; return NULL_VALUE; } - value_t option_bar(call_scope_t& args) { + value_t option_bar_(call_scope_t& args) { std::cout << "This is bar: " << args[0] << std::endl; return args[0]; } + value_t option_limit_(call_scope_t& args) { + if (! predicate.empty()) + predicate += "&"; + predicate += args[0].as_string(); + return true; + } + // // Formatting functions // |