mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-01 09:17:19 +02:00
Parser
- Modified ::findIdSequence to use collect.
This commit is contained in:
parent
9111866f80
commit
eb00230840
1 changed files with 11 additions and 10 deletions
|
@ -186,9 +186,9 @@ Tree* Parser::parse ()
|
||||||
findAttributeModifier ();
|
findAttributeModifier ();
|
||||||
findOperator ();
|
findOperator ();
|
||||||
findCommand ();
|
findCommand ();
|
||||||
// GOOD ^^^
|
|
||||||
findUUIDList ();
|
findUUIDList ();
|
||||||
findIdSequence ();
|
findIdSequence ();
|
||||||
|
// GOOD ^^^
|
||||||
findFilter ();
|
findFilter ();
|
||||||
findModifications ();
|
findModifications ();
|
||||||
findStrayModifications ();
|
findStrayModifications ();
|
||||||
|
@ -1226,17 +1226,14 @@ void Parser::findAttributeModifier ()
|
||||||
//
|
//
|
||||||
void Parser::findIdSequence ()
|
void Parser::findIdSequence ()
|
||||||
{
|
{
|
||||||
|
context.debug ("Parser::findAttributeModifier");
|
||||||
|
bool action = false;
|
||||||
|
|
||||||
|
std::vector <Tree*> nodes;
|
||||||
|
collect (nodes, false);
|
||||||
std::vector <Tree*>::iterator i;
|
std::vector <Tree*>::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.
|
// Container for min/max ID ranges.
|
||||||
std::vector <std::pair <int, int> > ranges;
|
std::vector <std::pair <int, int> > ranges;
|
||||||
|
|
||||||
|
@ -1378,7 +1375,11 @@ void Parser::findIdSequence ()
|
||||||
branch = (*i)->addBranch (new Tree ("argSeq"));
|
branch = (*i)->addBranch (new Tree ("argSeq"));
|
||||||
branch->attribute ("raw", ")");
|
branch->attribute ("raw", ")");
|
||||||
branch->tag ("OP");
|
branch->tag ("OP");
|
||||||
|
action = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (action)
|
||||||
|
context.debug (_tree->dump ());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue