From bce24da6a5f2fa40ed24d229cb41f6b18db9370f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 1 Jul 2015 21:47:19 -0400 Subject: [PATCH] CLI2: Eliminated unnecessary ::findTerminator --- src/CLI2.cpp | 33 --------------------------------- src/CLI2.h | 1 - 2 files changed, 34 deletions(-) diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 6e79fcf1b..37209280c 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -468,38 +468,6 @@ void CLI2::demoteDOM () context.debug (dump ("CLI2::analyze demoteDOM")); } -//////////////////////////////////////////////////////////////////////////////// -void CLI2::handleTerminator () -{ - bool changes = false; - bool terminated = false; - std::vector 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 (); diff --git a/src/CLI2.h b/src/CLI2.h index 85a982e9a..6fe41d5fb 100644 --- a/src/CLI2.h +++ b/src/CLI2.h @@ -87,7 +87,6 @@ private: void handleArg0 (); void lexArguments (); void demoteDOM (); - void handleTerminator (); void aliasExpansion (); void findOverrides (); bool findCommand ();