Lexer
- Words cannot contain single-char operators.
This commit is contained in:
@@ -1047,7 +1047,9 @@ bool Lexer::isWord (std::string& token, Lexer::Type& type)
|
|||||||
{
|
{
|
||||||
std::size_t marker = _cursor;
|
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);
|
utf8_next_char (_text, marker);
|
||||||
|
|
||||||
if (marker > _cursor)
|
if (marker > _cursor)
|
||||||
|
|||||||
Reference in New Issue
Block a user