- Argument decomposition now skips terminated args.
This commit is contained in:
Paul Beckingham 2014-10-24 22:01:53 -04:00
parent dbefd7d6fe
commit e0fac11eed

View file

@ -1330,6 +1330,9 @@ void CLI::decomposeModAttributes ()
std::vector <A>::iterator a; std::vector <A>::iterator a;
for (a = _args.begin (); a != _args.end (); ++a) for (a = _args.begin (); a != _args.end (); ++a)
{ {
if (a->hasTag ("TERMINATOR"))
break;
if (a->hasTag ("MODIFICATION")) if (a->hasTag ("MODIFICATION"))
{ {
// Look for a valid attribute name. // Look for a valid attribute name.
@ -1385,6 +1388,9 @@ void CLI::decomposeModAttributeModifiers ()
std::vector <A>::iterator a; std::vector <A>::iterator a;
for (a = _args.begin (); a != _args.end (); ++a) for (a = _args.begin (); a != _args.end (); ++a)
{ {
if (a->hasTag ("TERMINATOR"))
break;
if (a->hasTag ("MODIFICATION")) if (a->hasTag ("MODIFICATION"))
{ {
// Look for a valid attribute name. // Look for a valid attribute name.
@ -1460,6 +1466,9 @@ void CLI::decomposeModTags ()
std::vector <A>::iterator a; std::vector <A>::iterator a;
for (a = _args.begin (); a != _args.end (); ++a) for (a = _args.begin (); a != _args.end (); ++a)
{ {
if (a->hasTag ("TERMINATOR"))
break;
if (a->hasTag ("MODIFICATION")) if (a->hasTag ("MODIFICATION"))
{ {
Nibbler n (a->attribute ("raw")); Nibbler n (a->attribute ("raw"));
@ -1485,6 +1494,9 @@ void CLI::decomposeModSubstitutions ()
std::vector <A>::iterator a; std::vector <A>::iterator a;
for (a = _args.begin (); a != _args.end (); ++a) for (a = _args.begin (); a != _args.end (); ++a)
{ {
if (a->hasTag ("TERMINATOR"))
break;
if (a->hasTag ("MODIFICATION")) if (a->hasTag ("MODIFICATION"))
{ {
std::string raw = a->attribute ("raw"); std::string raw = a->attribute ("raw");