mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 00:57:19 +02:00
Lexer: Modified ::isPattern to use ::readWord
This commit is contained in:
parent
b4b8edcebe
commit
096737bd02
1 changed files with 3 additions and 4 deletions
|
@ -944,10 +944,9 @@ bool Lexer::isPattern (std::string& token, Lexer::Type& type)
|
||||||
{
|
{
|
||||||
std::size_t marker = _cursor;
|
std::size_t marker = _cursor;
|
||||||
|
|
||||||
std::string extractedToken;
|
std::string word;
|
||||||
Lexer::Type extractedType;
|
if (readWord (_text, "/", _cursor, word) &&
|
||||||
if (isString (extractedToken, extractedType, "/") &&
|
(isEOS () ||
|
||||||
(_text[_cursor] == '\0' ||
|
|
||||||
isWhitespace (_text[_cursor])))
|
isWhitespace (_text[_cursor])))
|
||||||
{
|
{
|
||||||
token = _text.substr (marker, _cursor - marker);
|
token = _text.substr (marker, _cursor - marker);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue