From e14d7b6e543850bae6c46f01a80b11c41ea383cf Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 27 Jul 2008 20:37:21 -0400 Subject: Cleaned up the value expression code a bit before undertaking the real work of getting everything back up to what it was (plus the new code written for 3.0). --- valexpr.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'valexpr.h') diff --git a/valexpr.h b/valexpr.h index 0996e921..7c2a63a1 100644 --- a/valexpr.h +++ b/valexpr.h @@ -449,6 +449,7 @@ public: O_DEF, O_REF, O_ARG, + O_LOOKUP, LAST }; @@ -902,6 +903,37 @@ public: return temp; } +#if 0 + void compile(scope_t& scope) { + if (ptr.get()) + ptr = ptr->compile(scope); + } + + value_t calc(scope_t& scope) const { + if (ptr.get()) + return ptr->calc(scope); + return NULL_VALUE; + } + + static value_t eval(const string& _expr, scope_t& scope) { + return xpath_t(_expr).calc(scope); + } + + path_iterator_t find_all(scope_t& scope) { + return path_iterator_t(*this, scope); + } + + void print(std::ostream& out, scope_t& scope) const { + op_t::print_context_t context(scope); + print(out, context); + } + + void dump(std::ostream& out) const { + if (ptr) + ptr->dump(out, 0); + } +#endif + friend bool print_value_expr(std::ostream& out, const expr::ptr_op_t node, const expr::ptr_op_t node_to_find, -- cgit v1.2.3