- Renamed ::split to ::word_split, for clarity and because of the need for a
  full token split, coming next.
This commit is contained in:
Paul Beckingham
2014-05-31 13:48:52 -04:00
parent e753473dc4
commit 0af9bbdc03
5 changed files with 18 additions and 18 deletions

View File

@@ -92,7 +92,7 @@ void Alias::resolve (Tree* tree)
something = true;
std::vector <std::string> words;
Lexer::split (words, context.aliases[raw]);
Lexer::word_split (words, context.aliases[raw]);
std::vector <std::string>::iterator word;
for (word = words.begin (); word != words.end (); ++word)

View File

@@ -619,7 +619,7 @@ bool Lexer::is_ws (int c)
////////////////////////////////////////////////////////////////////////////////
// Split 'input' into 'words' on Lexer::is_ws boundaries, observing quotes.
void Lexer::split (std::vector <std::string>& words, const std::string& input)
void Lexer::word_split (std::vector <std::string>& words, const std::string& input)
{
words.clear ();

View File

@@ -65,7 +65,7 @@ public:
static const std::string type_name (const Type&);
static bool is_ws (int);
static void split (std::vector <std::string>&, const std::string&);
static void word_split (std::vector <std::string>&, const std::string&);
private:
bool is_punct (int) const;

View File

@@ -468,7 +468,7 @@ void Parser::injectDefaults ()
// because captureFirst inserts args immediately after the command, and
// so has the effect of reversing the list.
std::vector <std::string> args;
Lexer::split (args, defaultCommand);
Lexer::word_split (args, defaultCommand);
std::vector <std::string>::reverse_iterator r;
for (r = args.rbegin (); r != args.rend (); ++r)
{