Expressions

- Filter processing short-circuits if there is no filter.
- Variant code was not only incomplete, but very broken.  It should not have
  been used.  It still doesn't handle dates and durations.
- Converted all logical and relational Variant operators to return Boolean
  values.
- Stack size is now checked for every operator.
- All operators implemented (without any advanced special case handling) except
  %, ~ and !~.
- Added lazy DOM expansion at the last possible moment.
- Implemented Expression::create_variant to create appropriate Variant instances
  based on categorized and inferred type.
- Removed Variant math functions.  No point.
- Debug code left in place for now.
This commit is contained in:
Paul Beckingham
2011-06-19 09:49:43 -04:00
parent c57f880be7
commit db17536266
4 changed files with 363 additions and 270 deletions

View File

@@ -32,6 +32,7 @@
#include <stack>
#include <Arguments.h>
#include <Task.h>
#include <Variant.h>
class Expression
{
@@ -51,6 +52,7 @@ private:
void expand_tokens ();
void postfix ();
void create_variant (Variant&, const std::string&, const std::string&);
bool is_new_style ();
private: