Expressions

- Eliminated the . prefix for DOM references to the current task - it is
  unnatural to state ".due < today".
- Prioritized parsing dates ahead of integers, which were masking all
  dates.
This commit is contained in:
Paul Beckingham 2011-07-19 00:25:26 -04:00
parent e564827be7
commit 09d94a0712
7 changed files with 27 additions and 25 deletions

View file

@ -933,18 +933,6 @@ bool Nibbler::getDOM (std::string& result)
std::string right;
int number;
if (skip ('.') &&
getWord (right))
{
while (skip ('.') &&
getWord (right))
;
result = mInput.substr (i, mCursor - i);
return true;
}
restore ();
if (getWord (left) &&
skip ('.') &&
getWord (right))
@ -982,6 +970,18 @@ bool Nibbler::getDOM (std::string& result)
result = mInput.substr (i, mCursor - i);
return true;
}
restore ();
if (getWord (right))
{
while (skip ('.') &&
getWord (right))
;
result = mInput.substr (i, mCursor - i);
return true;
}
}
return false;