CLI2: Eliminated unnecessary ::findTerminator

This commit is contained in:
Paul Beckingham 2015-07-01 21:47:19 -04:00
parent 36f03a9f35
commit bce24da6a5
2 changed files with 0 additions and 34 deletions

View file

@ -468,38 +468,6 @@ void CLI2::demoteDOM ()
context.debug (dump ("CLI2::analyze demoteDOM"));
}
////////////////////////////////////////////////////////////////////////////////
void CLI2::handleTerminator ()
{
bool changes = false;
bool terminated = false;
std::vector <A2> reconstructed;
for (auto& a : _args)
{
if (a._lextype == Lexer::Type::separator &&
! terminated)
{
terminated = true;
changes = true;
}
else
{
if (terminated)
a._lextype = Lexer::Type::word;
reconstructed.push_back (a);
}
}
if (changes)
{
_args = reconstructed;
if (context.config.getInteger ("debug.parser") >= 3)
context.debug (dump ("CLI2::analyze handleTerminator"));
}
}
////////////////////////////////////////////////////////////////////////////////
// Intended to be called after ::add() to perform the final analysis.
void CLI2::analyze ()
@ -512,7 +480,6 @@ void CLI2::analyze ()
handleArg0 ();
lexArguments ();
demoteDOM ();
handleTerminator ();
// Process _args.
aliasExpansion ();

View file

@ -87,7 +87,6 @@ private:
void handleArg0 ();
void lexArguments ();
void demoteDOM ();
void handleTerminator ();
void aliasExpansion ();
void findOverrides ();
bool findCommand ();