From eb00230840603ba449398c88cee790a1f2afb195 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 17 Aug 2014 13:17:43 -0400 Subject: [PATCH] Parser - Modified ::findIdSequence to use collect. --- src/Parser.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Parser.cpp b/src/Parser.cpp index 5712af660..840ea0a59 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -186,9 +186,9 @@ Tree* Parser::parse () findAttributeModifier (); findOperator (); findCommand (); - // GOOD ^^^ findUUIDList (); findIdSequence (); + // GOOD ^^^ findFilter (); findModifications (); findStrayModifications (); @@ -1226,17 +1226,14 @@ void Parser::findAttributeModifier () // void Parser::findIdSequence () { + context.debug ("Parser::findAttributeModifier"); + bool action = false; + + std::vector nodes; + collect (nodes, false); std::vector ::iterator i; - for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i) + for (i = nodes.begin (); i != nodes.end (); ++i) { - // Parser override operator. - if ((*i)->attribute ("raw") == "--") - break; - - // Skip known args. - if (! (*i)->hasTag ("?")) - continue; - // Container for min/max ID ranges. std::vector > ranges; @@ -1378,7 +1375,11 @@ void Parser::findIdSequence () branch = (*i)->addBranch (new Tree ("argSeq")); branch->attribute ("raw", ")"); branch->tag ("OP"); + action = true; } + + if (action) + context.debug (_tree->dump ()); } ////////////////////////////////////////////////////////////////////////////////