TW-1306
- TW-1306 Arguments before 'add' are ignored.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user