Expressions

- Added Expression::eval short-circuit.
- Added int/number exlclusions for Nibbler::getDOM.
- Added Variant::boolean for exatracting filter results.
This commit is contained in:
Paul Beckingham 2011-06-16 20:30:48 -04:00
parent 6a48d86f2c
commit 4fca40fc69
4 changed files with 63 additions and 9 deletions

View file

@ -927,6 +927,17 @@ bool Nibbler::getDOM (std::string& found)
if (i > mCursor)
{
found = mInput.substr (start, i - start);
// If found is simple a number, then it is not a DOM reference.
double d;
Nibbler exclusion (found);
if (exclusion.getNumber (d) && exclusion.depleted ())
return false;
int in;
if (exclusion.getInt (in) && exclusion.depleted ())
return false;
mCursor = i;
return true;
}