From 096737bd02fe31d55a8541230dd1c42f0f814cca Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 11 Jul 2015 10:27:06 -0400 Subject: [PATCH] Lexer: Modified ::isPattern to use ::readWord --- src/Lexer.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Lexer.cpp b/src/Lexer.cpp index cb303f253..d80961d69 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -944,10 +944,9 @@ bool Lexer::isPattern (std::string& token, Lexer::Type& type) { std::size_t marker = _cursor; - std::string extractedToken; - Lexer::Type extractedType; - if (isString (extractedToken, extractedType, "/") && - (_text[_cursor] == '\0' || + std::string word; + if (readWord (_text, "/", _cursor, word) && + (isEOS () || isWhitespace (_text[_cursor]))) { token = _text.substr (marker, _cursor - marker);