mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-07 22:58:34 +02:00
Diagnostics
- Further removal of diagnostic output.
This commit is contained in:
parent
fa02eb4ed2
commit
949063102a
3 changed files with 6 additions and 14 deletions
|
@ -221,9 +221,7 @@ int Context::initialize (int argc, const char** argv)
|
||||||
a3.categorize ();
|
a3.categorize ();
|
||||||
|
|
||||||
// Parse the command line.
|
// Parse the command line.
|
||||||
Tree* parseTree = parser.parse ();
|
parser.parse ();
|
||||||
if (parseTree && config.getBoolean ("debug"))
|
|
||||||
debug (parseTree->dump ());
|
|
||||||
|
|
||||||
// Initialize the database.
|
// Initialize the database.
|
||||||
tdb2.set_location (data_dir);
|
tdb2.set_location (data_dir);
|
||||||
|
|
11
src/Eval.cpp
11
src/Eval.cpp
|
@ -157,7 +157,7 @@ void Eval::evaluatePostfixExpression (const std::string& e, Variant& v) const
|
||||||
tokens.push_back (std::pair <std::string, Lexer::Type> (token, type));
|
tokens.push_back (std::pair <std::string, Lexer::Type> (token, type));
|
||||||
|
|
||||||
if (_debug)
|
if (_debug)
|
||||||
context.debug ("Filter postfix tokens " + dump (tokens));
|
context.debug ("Postfix tokens " + dump (tokens));
|
||||||
|
|
||||||
// Call the postfix evaluator.
|
// Call the postfix evaluator.
|
||||||
evaluatePostfixStack (tokens, v);
|
evaluatePostfixStack (tokens, v);
|
||||||
|
@ -176,7 +176,7 @@ void Eval::compileExpression (const std::string& e)
|
||||||
|
|
||||||
// Parse for syntax checking and operator replacement.
|
// Parse for syntax checking and operator replacement.
|
||||||
if (_debug)
|
if (_debug)
|
||||||
context.debug ("Filter infix tokens " + dump (_compiled));
|
context.debug ("Filter infix tokens " + dump (_compiled));
|
||||||
infixParse (_compiled);
|
infixParse (_compiled);
|
||||||
if (_debug)
|
if (_debug)
|
||||||
context.debug ("Filter parsed tokens " + dump (_compiled));
|
context.debug ("Filter parsed tokens " + dump (_compiled));
|
||||||
|
@ -184,7 +184,7 @@ void Eval::compileExpression (const std::string& e)
|
||||||
// Convert infix --> postfix.
|
// Convert infix --> postfix.
|
||||||
infixToPostfix (_compiled);
|
infixToPostfix (_compiled);
|
||||||
if (_debug)
|
if (_debug)
|
||||||
context.debug ("Postfix tokens " + dump (_compiled));
|
context.debug ("Postfix tokens " + dump (_compiled));
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -805,8 +805,7 @@ std::string Eval::dump (
|
||||||
{
|
{
|
||||||
// Set up a color mapping.
|
// Set up a color mapping.
|
||||||
std::map <Lexer::Type, Color> color_map;
|
std::map <Lexer::Type, Color> color_map;
|
||||||
color_map[Lexer::typeNone] = Color ("color15 on gray4");
|
color_map[Lexer::typeNone] = Color ("white on green");
|
||||||
color_map[Lexer::typeOperator] = Color ("green on gray4");
|
|
||||||
/*
|
/*
|
||||||
Lexer::typeOperator
|
Lexer::typeOperator
|
||||||
Lexer::typeNone
|
Lexer::typeNone
|
||||||
|
@ -841,7 +840,7 @@ std::string Eval::dump (
|
||||||
output += c.colorize (i->first);
|
output += c.colorize (i->first);
|
||||||
}
|
}
|
||||||
|
|
||||||
return output;
|
return output + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -72,7 +72,6 @@ Filter::~Filter ()
|
||||||
void Filter::subset (const std::vector <Task>& input, std::vector <Task>& output)
|
void Filter::subset (const std::vector <Task>& input, std::vector <Task>& output)
|
||||||
{
|
{
|
||||||
context.timer_filter.start ();
|
context.timer_filter.start ();
|
||||||
|
|
||||||
_startCount = (int) input.size ();
|
_startCount = (int) input.size ();
|
||||||
|
|
||||||
if (context.config.getBoolean ("debug"))
|
if (context.config.getBoolean ("debug"))
|
||||||
|
@ -83,8 +82,6 @@ void Filter::subset (const std::vector <Task>& input, std::vector <Task>& output
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string filterExpr = context.parser.getFilterExpression ();
|
std::string filterExpr = context.parser.getFilterExpression ();
|
||||||
context.debug ("\033[1;37;42mFILTER\033[0m " + filterExpr);
|
|
||||||
|
|
||||||
if (filterExpr.length ())
|
if (filterExpr.length ())
|
||||||
{
|
{
|
||||||
Eval eval;
|
Eval eval;
|
||||||
|
@ -132,8 +129,6 @@ void Filter::subset (std::vector <Task>& output)
|
||||||
|
|
||||||
bool shortcut = false;
|
bool shortcut = false;
|
||||||
std::string filterExpr = context.parser.getFilterExpression ();
|
std::string filterExpr = context.parser.getFilterExpression ();
|
||||||
context.debug ("\033[1;37;42mFILTER\033[0m " + filterExpr);
|
|
||||||
|
|
||||||
if (filterExpr.length ())
|
if (filterExpr.length ())
|
||||||
{
|
{
|
||||||
context.timer_filter.stop ();
|
context.timer_filter.stop ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue