From 5ac3db3168c8f243fc22be0c5dfd8945a83c4670 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 31 May 2014 13:54:56 -0400 Subject: [PATCH] Parser - Modified ::injectDefault to use Lexer::token_split instead of Lexer::word_split which allows stranger default commands. Not sure if this is necessary, but it seems like the right thing. --- src/Parser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Parser.cpp b/src/Parser.cpp index 8ace3463c..6b64cb95e 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -313,6 +313,7 @@ void Parser::findCommand () else if (exactMatch ("readcmd", command)) (*i)->tag ("READCMD"); else if (exactMatch ("helper", command)) (*i)->tag ("HELPER"); + // Stop at the first command found. return; } } @@ -468,7 +469,7 @@ void Parser::injectDefaults () // because captureFirst inserts args immediately after the command, and // so has the effect of reversing the list. std::vector args; - Lexer::word_split (args, defaultCommand); + Lexer::token_split (args, defaultCommand); std::vector ::reverse_iterator r; for (r = args.rbegin (); r != args.rend (); ++r) {