mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 00:57:19 +02:00
Lexer: Fixed /pattern/ detection at EOS
This commit is contained in:
parent
9630b76990
commit
8b863c9764
1 changed files with 2 additions and 1 deletions
|
@ -869,7 +869,8 @@ bool Lexer::isPattern (std::string& token, Lexer::Type& type)
|
||||||
std::string extractedToken;
|
std::string extractedToken;
|
||||||
Lexer::Type extractedType;
|
Lexer::Type extractedType;
|
||||||
if (isString (extractedToken, extractedType, '/') &&
|
if (isString (extractedToken, extractedType, '/') &&
|
||||||
isWhitespace (_text[_cursor]))
|
(_text[_cursor] == '\0' ||
|
||||||
|
isWhitespace (_text[_cursor])))
|
||||||
{
|
{
|
||||||
token = _text.substr (marker, _cursor - marker);
|
token = _text.substr (marker, _cursor - marker);
|
||||||
type = Lexer::Type::pattern;
|
type = Lexer::Type::pattern;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue