- Made 'plain args' diagnostics debug-only.
This commit is contained in:
Paul Beckingham 2014-05-27 16:31:55 -04:00
parent 84b95ce06d
commit ebca8e1282

View file

@ -1353,16 +1353,19 @@ void Parser::findModifications ()
// are not otherwise recognized, and potentially promote them to patterns. // are not otherwise recognized, and potentially promote them to patterns.
void Parser::findPlainArgs () void Parser::findPlainArgs ()
{ {
if (context.config.getBoolean ("debug"))
{
std::vector <Tree*>::iterator i; std::vector <Tree*>::iterator i;
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i) for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
{ {
if ((*i)->hasTag ("FILTER") && if ((*i)->hasTag ("FILTER") &&
(*i)->hasTag ("ORIGINAL") && // TODO Wrong, can come in through alias/filter (*i)->hasTag ("ORIGINAL") && // TODO Wrong, can come in through alias/filter
(*i)->countTags () == 2) (*i)->countTags () <= 2)
{ {
std::cout << "# plain arg '" << (*i)->attribute ("raw") << "'\n"; std::cout << "# plain arg '" << (*i)->attribute ("raw") << "'\n";
} }
} }
}
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////