mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Expressions
- Reordered operator table so that longer operators match first, thus disambiguating between ! and !=. - Eliminated Expression::expand_expression. - Modified Nibbler to know what a DOM reference looks like. - Removed alpha equivalent operators (lt, le, gt, ge, not, eq, ne) because these are common in descriptions (French: le, ne). - Modified Arguments and Nibbler unit tests.
This commit is contained in:
parent
a749f83da3
commit
d6670ba198
7 changed files with 140 additions and 185 deletions
|
@ -908,6 +908,32 @@ bool Nibbler::getOneOf (
|
|||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Nibbler::getDOM (std::string& found)
|
||||
{
|
||||
std::string::size_type i = mCursor;
|
||||
std::string::size_type start = mCursor;
|
||||
|
||||
while ( isdigit (mInput[i]) ||
|
||||
mInput[i] == '.' ||
|
||||
mInput[i] == '-' ||
|
||||
mInput[i] == '_' ||
|
||||
(! ispunct (mInput[i]) &&
|
||||
! isspace (mInput[i])))
|
||||
{
|
||||
++i;
|
||||
}
|
||||
|
||||
if (i > mCursor)
|
||||
{
|
||||
found = mInput.substr (start, i - start);
|
||||
mCursor = i;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Nibbler::skipN (const int quantity /* = 1 */)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue