From daba36860bd7b5f05872867bdb10f9e7f6611913 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 11 Jul 2015 10:27:23 -0400 Subject: [PATCH] Lexer: Modified ::isSubstitution to use ::readWord --- src/Lexer.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Lexer.cpp b/src/Lexer.cpp index d80961d69..842952bca 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -911,13 +911,12 @@ bool Lexer::isSubstitution (std::string& token, Lexer::Type& type) { std::size_t marker = _cursor; - std::string extractedToken; - Lexer::Type extractedType; - if (isString (extractedToken, extractedType, "/")) + std::string word; + if (readWord (_text, "/", _cursor, word)) { - --_cursor; // Step back over the '/'. + --_cursor; // Step backwards over the '/'. - if (isString (extractedToken, extractedType, "/")) + if (readWord (_text, "/", _cursor, word)) { if (_text[_cursor] == 'g') ++_cursor;