- Added debug.parser=3 support to ::insertIDExpr.
This commit is contained in:
Paul Beckingham 2014-10-31 20:00:06 -04:00
parent 371e4a4603
commit 08310cf2a2

View file

@ -1292,6 +1292,7 @@ void CLI::insertIDExpr ()
{ {
// Iterate over all args. The first ID/UUID arg found will be replaced by // Iterate over all args. The first ID/UUID arg found will be replaced by
// the combined ID clause. All other ID/UUID args are removed. // the combined ID clause. All other ID/UUID args are removed.
bool changes = false;
bool foundID = false; bool foundID = false;
std::vector <A> reconstructed; std::vector <A> reconstructed;
std::vector <A>::iterator a; std::vector <A>::iterator a;
@ -1414,6 +1415,7 @@ void CLI::insertIDExpr ()
} }
reconstructed.push_back (closeParen); reconstructed.push_back (closeParen);
changes = true;
} }
// No 'else' which cause all other ID/UUID args to be eaten. // No 'else' which cause all other ID/UUID args to be eaten.
@ -1422,7 +1424,13 @@ void CLI::insertIDExpr ()
reconstructed.push_back (*a); reconstructed.push_back (*a);
} }
_args = reconstructed; if (changes)
{
_args = reconstructed;
if (context.config.getInteger ("debug.parser") >= 3)
context.debug (context.cli.dump ("CLI::analyze insertIDExpr"));
}
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////