MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / isIdentifier

Method isIdentifier

src/Lexer.cpp:1047–1062  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Lexer::Type::identifier [ ]

Source from the content-addressed store, hash-verified

1045// Lexer::Type::identifier
1046// <isIdentifierStart> [ <isIdentifierNext> ]*
1047bool 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected