diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-01 22:10:32 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-01 22:10:32 -0400 |
commit | fb5428ce85127413da6cba184dda178352a82b3c (patch) | |
tree | e72d931ec737a7442a61bdfc3a61379a3fa8de48 /src/op.h | |
parent | 7128fdb6373c901c9c68e2d8ddac911891466c40 (diff) | |
download | fork-ledger-fb5428ce85127413da6cba184dda178352a82b3c.tar.gz fork-ledger-fb5428ce85127413da6cba184dda178352a82b3c.tar.bz2 fork-ledger-fb5428ce85127413da6cba184dda178352a82b3c.zip |
Added support for metadata and tagging, and made regexs a first-class type.
Diffstat (limited to 'src/op.h')
-rw-r--r-- | src/op.h | 25 |
1 files changed, 1 insertions, 24 deletions
@@ -47,7 +47,6 @@ #define _OP_H #include "expr.h" -#include "mask.h" namespace ledger { @@ -71,7 +70,6 @@ private: variant<std::size_t, // used by constant INDEX value_t, // used by constant VALUE string, // used by constant IDENT - mask_t, // used by constant MASK function_t, // used by terminal FUNCTION ptr_op_t> // used by all binary operators data; @@ -81,7 +79,6 @@ public: // Constants VALUE, IDENT, - MASK, INDEX, CONSTANTS, @@ -115,6 +112,7 @@ public: O_COMMA, + O_LOOKUP, O_CALL, O_MATCH, @@ -193,27 +191,6 @@ public: data = val; } - bool is_mask() const { - if (kind == MASK) { - assert(data.type() == typeid(mask_t)); - return true; - } - return false; - } - mask_t& as_mask_lval() { - assert(is_mask()); - return boost::get<mask_t>(data); - } - const mask_t& as_mask() const { - return const_cast<op_t *>(this)->as_mask_lval(); - } - void set_mask(const mask_t& val) { - data = val; - } - void set_mask(const string& expr) { - data = mask_t(expr); - } - bool is_function() const { return kind == FUNCTION; } |