From ebca8e1282bcf4d6a83fc1fe5d8bed5834b68e2b Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 27 May 2014 16:31:55 -0400 Subject: [PATCH] Parser - Made 'plain args' diagnostics debug-only. --- src/Parser.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Parser.cpp b/src/Parser.cpp index 50fc0daac..3abbafb0b 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -1353,14 +1353,17 @@ void Parser::findModifications () // are not otherwise recognized, and potentially promote them to patterns. void Parser::findPlainArgs () { - std::vector ::iterator i; - for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i) + if (context.config.getBoolean ("debug")) { - if ((*i)->hasTag ("FILTER") && - (*i)->hasTag ("ORIGINAL") && // TODO Wrong, can come in through alias/filter - (*i)->countTags () == 2) + std::vector ::iterator i; + for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i) { - std::cout << "# plain arg '" << (*i)->attribute ("raw") << "'\n"; + if ((*i)->hasTag ("FILTER") && + (*i)->hasTag ("ORIGINAL") && // TODO Wrong, can come in through alias/filter + (*i)->countTags () <= 2) + { + std::cout << "# plain arg '" << (*i)->attribute ("raw") << "'\n"; + } } } }