summaryrefslogtreecommitdiff
path: root/src/report.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-28 23:46:14 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-28 23:46:14 -0400
commit2b3f3e9867431174f5b5b25e47098a7218213a82 (patch)
treea27560ebcfad59813cd5e988ffae933c1d04cec3 /src/report.cc
parent375f6c257d23ac7655ce0738a72acceb78119457 (diff)
parent52433e56e562976887325ce48a6271abb82a89aa (diff)
downloadfork-ledger-2b3f3e9867431174f5b5b25e47098a7218213a82.tar.gz
fork-ledger-2b3f3e9867431174f5b5b25e47098a7218213a82.tar.bz2
fork-ledger-2b3f3e9867431174f5b5b25e47098a7218213a82.zip
Merge branch 'next'
Diffstat (limited to 'src/report.cc')
-rw-r--r--src/report.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/report.cc b/src/report.cc
index 62b54ad1..281057d3 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -380,23 +380,24 @@ namespace {
value_t::sequence_t::const_iterator end =
args.value().as_sequence().end();
- string limit = args_to_predicate_expr(begin, end);
+ std::pair<expr_t, query_parser_t> info = args_to_predicate(begin, end);
+ string limit = info.first.text();
if (! limit.empty())
report.HANDLER(limit_).on(whence, limit);
DEBUG("report.predicate",
"Predicate = " << report.HANDLER(limit_).str());
- string display;
- if (begin != end)
- display = args_to_predicate_expr(begin, end);
+ if (info.second.tokens_remaining()) {
+ string display = args_to_predicate(info.second).first.text();
- if (! display.empty())
- report.HANDLER(display_).on(whence, display);
+ if (! display.empty())
+ report.HANDLER(display_).on(whence, display);
- DEBUG("report.predicate",
- "Display predicate = " << report.HANDLER(display_).str());
+ DEBUG("report.predicate",
+ "Display predicate = " << report.HANDLER(display_).str());
+ }
}
(report.*report_method)(handler_ptr(handler));