mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 22:47:20 +02:00
Eval
- Debug mode can now be disabled.
This commit is contained in:
parent
567f242e6d
commit
a97ce45cdf
4 changed files with 14 additions and 10 deletions
|
@ -201,9 +201,9 @@ void Eval::ambiguity (bool value)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Eval::debug ()
|
||||
void Eval::debug (bool value)
|
||||
{
|
||||
_debug = true;
|
||||
_debug = value;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
void compileExpression (const std::string&);
|
||||
void evaluateCompiledExpression (Variant&);
|
||||
void ambiguity (bool);
|
||||
void debug ();
|
||||
void debug (bool);
|
||||
|
||||
static void getOperators (std::vector <std::string>&);
|
||||
|
||||
|
|
|
@ -92,10 +92,12 @@ void Filter::subset (const std::vector <Task>& input, std::vector <Task>& output
|
|||
Eval eval;
|
||||
eval.addSource (namedDates);
|
||||
eval.addSource (domSource);
|
||||
eval.compileExpression (filterExpr);
|
||||
|
||||
if (context.config.getBoolean ("debug"))
|
||||
eval.debug ();
|
||||
// Debug output from Eval during compilation is useful. During evaluation
|
||||
// it is mostly noise.
|
||||
eval.debug (context.config.getBoolean ("debug"));
|
||||
eval.compileExpression (filterExpr);
|
||||
eval.debug (false);
|
||||
|
||||
std::vector <Task>::const_iterator task;
|
||||
for (task = input.begin (); task != input.end (); ++task)
|
||||
|
@ -147,10 +149,12 @@ void Filter::subset (std::vector <Task>& output)
|
|||
Eval eval;
|
||||
eval.addSource (namedDates);
|
||||
eval.addSource (domSource);
|
||||
eval.compileExpression (filterExpr);
|
||||
|
||||
if (context.config.getBoolean ("debug"))
|
||||
eval.debug ();
|
||||
// Debug output from Eval during compilation is useful. During evaluation
|
||||
// it is mostly noise.
|
||||
eval.debug (context.config.getBoolean ("debug"));
|
||||
eval.compileExpression (filterExpr);
|
||||
eval.debug (false);
|
||||
|
||||
output.clear ();
|
||||
std::vector <Task>::const_iterator task;
|
||||
|
|
|
@ -120,7 +120,7 @@ int main (int argc, char** argv)
|
|||
exit (1);
|
||||
}
|
||||
else if (!strcmp (argv[i], "-d") || !strcmp (argv[i], "--debug"))
|
||||
e.debug ();
|
||||
e.debug (true);
|
||||
else if (!strcmp (argv[i], "-i") || !strcmp (argv[i], "--infix"))
|
||||
infix = true;
|
||||
else if (!strcmp (argv[i], "-p") || !strcmp (argv[i], "--postfix"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue