- TW-1306 Arguments before 'add' are ignored.
This commit is contained in:
Paul Beckingham 2014-07-03 10:50:25 -04:00
parent d6e734b57d
commit e5834c8a4f
3 changed files with 23 additions and 0 deletions

View file

@ -89,6 +89,7 @@
- TW-1301 Virtual tag +PENDING (thanks to Profpatsch).
- TW-1302 CmdShow.cpp:244: bad length in substr ? (thanks to David Binderman).
- TW-1304 Minor build and install fix for NetBSD (thanks to atomicules).
- TW-1306 Arguments before 'add' are ignored.
- TW-1307 burndown is aliased to burndown.weekly (thanks to darkfeline).
- TW-1309 memory error, if misconfigured calendar.details.report (thanks to
Onion).

View file

@ -178,6 +178,7 @@ Tree* Parser::parse ()
findIdSequence ();
findFilter ();
findModifications ();
findStrayModifications ();
findPlainArgs ();
findMissingOperators ();
@ -1426,6 +1427,26 @@ void Parser::findModifications ()
}
}
////////////////////////////////////////////////////////////////////////////////
void Parser::findStrayModifications ()
{
std::string command = getCommand ();
if (command == "add" ||
command == "log")
{
std::vector <Tree*>::iterator i;
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
{
if ((*i)->hasTag ("FILTER"))
{
(*i)->unTag ("FILTER");
(*i)->tag ("MODIFICATION");
(*i)->removeAllBranches ();
}
}
}
}
////////////////////////////////////////////////////////////////////////////////
// This is called after parsing. The intention is to find plain arguments that
// are not otherwise recognized, and potentially promote them to patterns.

View file

@ -75,6 +75,7 @@ private:
void findOperator ();
void findFilter ();
void findModifications ();
void findStrayModifications ();
void findPlainArgs ();
void findMissingOperators ();
bool insertOr ();