Lexer: Fixed /pattern/ detection at EOS

This commit is contained in:
Paul Beckingham 2015-03-29 22:53:38 -04:00
parent 9630b76990
commit 8b863c9764

View file

@ -869,7 +869,8 @@ bool Lexer::isPattern (std::string& token, Lexer::Type& type)
std::string extractedToken;
Lexer::Type extractedType;
if (isString (extractedToken, extractedType, '/') &&
isWhitespace (_text[_cursor]))
(_text[_cursor] == '\0' ||
isWhitespace (_text[_cursor])))
{
token = _text.substr (marker, _cursor - marker);
type = Lexer::Type::pattern;