mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 00:57:19 +02:00
Lexer: Implemented ::isOneOf using a std::map as input
This commit is contained in:
parent
58edbb9630
commit
52d2bbd11a
2 changed files with 12 additions and 0 deletions
|
@ -1127,6 +1127,16 @@ bool Lexer::isOneOf (const std::vector <std::string>& options, bool endBoundary)
|
|||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Lexer::isOneOf (const std::map <std::string, std::string>& options, bool endBoundary)
|
||||
{
|
||||
for (auto& item : options)
|
||||
if (isLiteral (item.first, endBoundary))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Static
|
||||
std::string Lexer::typeToString (Lexer::Type type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue