mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Lexer: Modified ::isSubstitution to use ::readWord
This commit is contained in:
parent
096737bd02
commit
daba36860b
1 changed files with 4 additions and 5 deletions
|
@ -911,13 +911,12 @@ bool Lexer::isSubstitution (std::string& token, Lexer::Type& type)
|
|||
{
|
||||
std::size_t marker = _cursor;
|
||||
|
||||
std::string extractedToken;
|
||||
Lexer::Type extractedType;
|
||||
if (isString (extractedToken, extractedType, "/"))
|
||||
std::string word;
|
||||
if (readWord (_text, "/", _cursor, word))
|
||||
{
|
||||
--_cursor; // Step back over the '/'.
|
||||
--_cursor; // Step backwards over the '/'.
|
||||
|
||||
if (isString (extractedToken, extractedType, "/"))
|
||||
if (readWord (_text, "/", _cursor, word))
|
||||
{
|
||||
if (_text[_cursor] == 'g')
|
||||
++_cursor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue