From bcffbc96ba88bd19f5f8ac00015ff38131fd6466 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 3 Aug 2008 23:44:18 -0400 Subject: Regular expressions are working again, such that very basic register reports are now possible. --- report.h | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'report.h') diff --git a/report.h b/report.h index 6bcd8e88..b6da2bc8 100644 --- a/report.h +++ b/report.h @@ -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 // -- cgit v1.2.3