From 2018eae2955ab31737b2f4e16040d1d0dde16cbe Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 17 Aug 2014 13:06:50 -0400 Subject: [PATCH] Parser - Removed now-unused ::scan method, as this is no longer used. --- src/Parser.cpp | 31 ------------------------------- src/Parser.h | 1 - 2 files changed, 32 deletions(-) diff --git a/src/Parser.cpp b/src/Parser.cpp index 542752917..9196c6f81 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -307,37 +307,6 @@ void Parser::collect (std::vector & nodes, bool all, Tree* tree /* = NULL } } -//////////////////////////////////////////////////////////////////////////////// -// Recursively scan all nodes, depth first, skipping terminated nodes, and known -// nodes, and cal the callback function for each node. -void Parser::scan (void (Parser::*callback) (Tree*), Tree* tree /* = NULL */) -{ - if (tree == NULL) - tree = _tree; - - std::vector ::iterator i; - for (i = tree->_branches.begin (); i != tree->_branches.end (); ++i) - { - if ((*i)->_branches.size ()) - { - scan (callback, *i); - } - else - { - // Parser override operator. - if ((*i)->hasTag ("TERMINATOR") || - (*i)->hasTag ("TERMINATED")) - break; - - // Skip known args. - if (! (*i)->hasTag ("?")) - continue; - - (this->*callback) (*i); - } - } -} - //////////////////////////////////////////////////////////////////////////////// // Locate and tag the binary. It is assumed that the binary is the first // argument, which is valid. diff --git a/src/Parser.h b/src/Parser.h index 7328caf9e..8076ca849 100644 --- a/src/Parser.h +++ b/src/Parser.h @@ -70,7 +70,6 @@ public: std::string getCommand () const; private: - void scan (void (Parser::*callback)(Tree*), Tree* tree = NULL); void findTerminator (); void findPattern (); void findSubstitution ();