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

Method isPattern

src/Lexer.cpp:799–811  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Lexer::Type::pattern / / |

Source from the content-addressed store, hash-verified

797// Lexer::Type::pattern
798// / <unquoted-string> / <EOS> | <unicodeWhitespace>
799bool Lexer::isPattern(std::string& token, Lexer::Type& type) {
800 std::size_t marker = _cursor;
801
802 std::string word;
803 if (readWord(_text, "/", _cursor, word) && (isEOS() || unicodeWhitespace(_text[_cursor]))) {
804 token = _text.substr(marker, _cursor - marker);
805 type = Lexer::Type::pattern;
806 return true;
807 }
808
809 _cursor = marker;
810 return false;
811}
812
813////////////////////////////////////////////////////////////////////////////////
814// Lexer::Type::op

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected