From 53e9bd0cbd9bc8255b726f4aa0275c557b56b82f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 2 Mar 2015 00:03:01 -0500 Subject: [PATCH] Lexer - Words cannot contain single-char operators. --- src/Lexer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Lexer.cpp b/src/Lexer.cpp index f929fe4b1..d8256eeb1 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -1047,7 +1047,9 @@ bool Lexer::isWord (std::string& token, Lexer::Type& type) { std::size_t marker = _cursor; - while (_text[marker] && ! isWhitespace (_text[marker])) + while (_text[marker] && + ! isWhitespace (_text[marker]) && + ! isSingleCharOperator (_text[marker])) utf8_next_char (_text, marker); if (marker > _cursor)