mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CLI2: Expand DOM references in single-token values
This commit is contained in:
parent
557a8d357c
commit
e4132f6a02
4 changed files with 25 additions and 1 deletions
|
@ -1323,6 +1323,20 @@ bool Lexer::isAllDigits (const std::string& text)
|
|||
return text.find_first_not_of ("0123456789") == std::string::npos;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Lexer::isDOM (const std::string& text)
|
||||
{
|
||||
Lexer lex (text);
|
||||
int count = 0;
|
||||
std::string token;
|
||||
Lexer::Type type;
|
||||
while (lex.token (token, type))
|
||||
++count;
|
||||
|
||||
return count == 1 &&
|
||||
type == Lexer::Type::dom;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Full implementation of a quoted word. Includes:
|
||||
// '\''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue