/////////////////////////////////////////////////////////////////////////// Lexer::Type::identifier [ ]
| 1045 | // Lexer::Type::identifier |
| 1046 | // <isIdentifierStart> [ <isIdentifierNext> ]* |
| 1047 | bool Lexer::isIdentifier(std::string& token, Lexer::Type& type) { |
| 1048 | std::size_t marker = _cursor; |
| 1049 | |
| 1050 | if (isIdentifierStart(_text[marker])) { |
| 1051 | utf8_next_char(_text, marker); |
| 1052 | |
| 1053 | while (isIdentifierNext(_text[marker])) utf8_next_char(_text, marker); |
| 1054 | |
| 1055 | token = _text.substr(_cursor, marker - _cursor); |
| 1056 | type = Lexer::Type::identifier; |
| 1057 | _cursor = marker; |
| 1058 | return true; |
| 1059 | } |
| 1060 | |
| 1061 | return false; |
| 1062 | } |
| 1063 | |
| 1064 | //////////////////////////////////////////////////////////////////////////////// |
| 1065 | // Lexer::Type::word |
nothing calls this directly
no outgoing calls
no test coverage detected