mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Parser
- Modified ::findUUIDList to use collect.
This commit is contained in:
parent
2018eae295
commit
9111866f80
1 changed files with 12 additions and 11 deletions
|
@ -185,8 +185,8 @@ Tree* Parser::parse ()
|
||||||
findAttribute ();
|
findAttribute ();
|
||||||
findAttributeModifier ();
|
findAttributeModifier ();
|
||||||
findOperator ();
|
findOperator ();
|
||||||
// GOOD ^^^
|
|
||||||
findCommand ();
|
findCommand ();
|
||||||
|
// GOOD ^^^
|
||||||
findUUIDList ();
|
findUUIDList ();
|
||||||
findIdSequence ();
|
findIdSequence ();
|
||||||
findFilter ();
|
findFilter ();
|
||||||
|
@ -425,7 +425,7 @@ void Parser::resolveAliases ()
|
||||||
// autoCompletes to a valid command/report.
|
// autoCompletes to a valid command/report.
|
||||||
void Parser::findCommand ()
|
void Parser::findCommand ()
|
||||||
{
|
{
|
||||||
context.debug ("Parse::findOverrides");
|
context.debug ("Parse::findCommand");
|
||||||
std::vector <Tree*> nodes;
|
std::vector <Tree*> nodes;
|
||||||
collect (nodes, false);
|
collect (nodes, false);
|
||||||
|
|
||||||
|
@ -1384,17 +1384,14 @@ void Parser::findIdSequence ()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Parser::findUUIDList ()
|
void Parser::findUUIDList ()
|
||||||
{
|
{
|
||||||
|
context.debug ("Parser::findUUIDList");
|
||||||
|
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;
|
|
||||||
|
|
||||||
std::string raw = (*i)->attribute ("raw");
|
std::string raw = (*i)->attribute ("raw");
|
||||||
Nibbler n (raw);
|
Nibbler n (raw);
|
||||||
|
|
||||||
|
@ -1448,9 +1445,13 @@ void Parser::findUUIDList ()
|
||||||
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