mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
A3t
- Implemented ::findModifications to identify nodes that comprise the task modifications.
This commit is contained in:
parent
2390838894
commit
e05610d1d7
2 changed files with 22 additions and 0 deletions
21
src/A3t.cpp
21
src/A3t.cpp
|
@ -135,6 +135,7 @@ Tree* A3t::parse ()
|
|||
findAttributeModifier ();
|
||||
findOperator ();
|
||||
findFilter ();
|
||||
findModifications ();
|
||||
|
||||
validate ();
|
||||
|
||||
|
@ -949,6 +950,26 @@ void A3t::findFilter ()
|
|||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void A3t::findModifications ()
|
||||
{
|
||||
bool after_writecmd = false;
|
||||
std::vector <Tree*>::iterator i;
|
||||
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
|
||||
{
|
||||
if ((*i)->hasTag ("WRITECMD"))
|
||||
after_writecmd = true;
|
||||
|
||||
if (after_writecmd &&
|
||||
! (*i)->hasTag ("CMD") &&
|
||||
! (*i)->hasTag ("TERMINATOR") &&
|
||||
! (*i)->hasTag ("BINARY") &&
|
||||
! (*i)->hasTag ("RC") &&
|
||||
! (*i)->hasTag ("CONFIG"))
|
||||
(*i)->tag ("MODIFICATION");
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Validate the parse tree.
|
||||
void A3t::validate ()
|
||||
|
|
|
@ -65,6 +65,7 @@ private:
|
|||
void findAttributeModifier ();
|
||||
void findOperator ();
|
||||
void findFilter ();
|
||||
void findModifications ();
|
||||
void validate ();
|
||||
|
||||
// TODO Resolve aliases
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue