CLI2: Added ::prepareFilter for the deferred parsing of filters

This commit is contained in:
Paul Beckingham
2015-06-19 10:15:01 -07:00
parent dc5f9e38a6
commit 6c0ba77204
3 changed files with 19 additions and 1 deletions

View File

@@ -72,6 +72,11 @@ void Filter::subset (const std::vector <Task>& input, std::vector <Task>& output
context.timer_filter.start ();
_startCount = (int) input.size ();
context.cli2.prepareFilter (applyContext);
// TODO Need to replace CLI2::getFilter with something that just walks the
// the parse tree. No point in combining the parse tree into a string,
// only to lex it back into tokens for Eval.
if (context.config.getInteger ("debug.parser") >= 1)
context.debug (context.cli.dump ("Filter::subset"));
@@ -114,6 +119,11 @@ void Filter::subset (std::vector <Task>& output, bool applyContext /* = true */)
{
context.timer_filter.start ();
context.cli2.prepareFilter (applyContext);
// TODO Need to replace CLI2::getFilter with something that just walks the
// the parse tree. No point in combining the parse tree into a string,
// only to lex it back into tokens for Eval.
if (context.config.getInteger ("debug.parser") >= 1)
context.debug (context.cli.dump ("Filter::subset"));