/////////////////////////////////////////////////////////////////////////// Lexer::Type::word [^\s]+
| 1065 | // Lexer::Type::word |
| 1066 | // [^\s]+ |
| 1067 | bool Lexer::isWord(std::string& token, Lexer::Type& type) { |
| 1068 | std::size_t marker = _cursor; |
| 1069 | |
| 1070 | while (_text[marker] && !unicodeWhitespace(_text[marker]) && !isSingleCharOperator(_text[marker])) |
| 1071 | utf8_next_char(_text, marker); |
| 1072 | |
| 1073 | if (marker > _cursor) { |
| 1074 | token = _text.substr(_cursor, marker - _cursor); |
| 1075 | type = Lexer::Type::word; |
| 1076 | _cursor = marker; |
| 1077 | return true; |
| 1078 | } |
| 1079 | |
| 1080 | return false; |
| 1081 | } |
| 1082 | |
| 1083 | //////////////////////////////////////////////////////////////////////////////// |
| 1084 | bool Lexer::isLiteral(const std::string& literal, bool allowAbbreviations, bool endBoundary) { |
nothing calls this directly
no outgoing calls
no test coverage detected