- Added debug.parser=3 support to ::desugarAttributeModifiers.
This commit is contained in:
Paul Beckingham 2014-10-31 19:58:59 -04:00
parent 73e767ec3e
commit 3b88106be8

View file

@ -905,6 +905,7 @@ void CLI::desugarAttributes ()
// <name>.[~]<mod>[:=]['"]<value>['"] --> name <op> value
void CLI::desugarAttributeModifiers ()
{
bool changes = false;
std::vector <A> reconstructed;
std::vector <A>::iterator a;
for (a = _args.begin (); a != _args.end (); ++a)
@ -1066,14 +1067,22 @@ void CLI::desugarAttributeModifiers ()
}
}
if (!found)
if (found)
changes = true;
else
reconstructed.push_back (*a);
}
else
reconstructed.push_back (*a);
}
_args = reconstructed;
if (changes)
{
_args = reconstructed;
if (context.config.getInteger ("debug.parser") >= 3)
context.debug (context.cli.dump ("CLI::analyze desugarAttributeModifiers"));
}
}
////////////////////////////////////////////////////////////////////////////////