mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +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 ();
|
findAttributeModifier ();
|
||||||
findOperator ();
|
findOperator ();
|
||||||
findFilter ();
|
findFilter ();
|
||||||
|
findModifications ();
|
||||||
|
|
||||||
validate ();
|
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.
|
// Validate the parse tree.
|
||||||
void A3t::validate ()
|
void A3t::validate ()
|
||||||
|
|
|
@ -65,6 +65,7 @@ private:
|
||||||
void findAttributeModifier ();
|
void findAttributeModifier ();
|
||||||
void findOperator ();
|
void findOperator ();
|
||||||
void findFilter ();
|
void findFilter ();
|
||||||
|
void findModifications ();
|
||||||
void validate ();
|
void validate ();
|
||||||
|
|
||||||
// TODO Resolve aliases
|
// TODO Resolve aliases
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue