mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Parser
- Modified ::findModifications to use collect.
This commit is contained in:
parent
4425f5e142
commit
d7ba49084b
1 changed files with 12 additions and 2 deletions
|
@ -189,8 +189,8 @@ Tree* Parser::parse ()
|
||||||
findUUIDList ();
|
findUUIDList ();
|
||||||
findIdSequence ();
|
findIdSequence ();
|
||||||
findFilter ();
|
findFilter ();
|
||||||
// GOOD ^^^
|
|
||||||
findModifications ();
|
findModifications ();
|
||||||
|
// GOOD ^^^
|
||||||
findStrayModifications ();
|
findStrayModifications ();
|
||||||
|
|
||||||
findPlainArgs ();
|
findPlainArgs ();
|
||||||
|
@ -1545,9 +1545,15 @@ void Parser::findFilter ()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Parser::findModifications ()
|
void Parser::findModifications ()
|
||||||
{
|
{
|
||||||
|
context.debug ("Parser::findModifications");
|
||||||
|
bool action = false;
|
||||||
|
|
||||||
bool after_writecmd = false;
|
bool after_writecmd = 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)
|
||||||
{
|
{
|
||||||
if ((*i)->hasTag ("WRITECMD"))
|
if ((*i)->hasTag ("WRITECMD"))
|
||||||
after_writecmd = true;
|
after_writecmd = true;
|
||||||
|
@ -1562,8 +1568,12 @@ void Parser::findModifications ()
|
||||||
(*i)->unTag ("?");
|
(*i)->unTag ("?");
|
||||||
(*i)->tag ("MODIFICATION");
|
(*i)->tag ("MODIFICATION");
|
||||||
(*i)->removeAllBranches ();
|
(*i)->removeAllBranches ();
|
||||||
|
action = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (action)
|
||||||
|
context.debug (_tree->dump ());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue