summaryrefslogtreecommitdiff
path: root/src/xpath.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-16 05:37:46 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:52 -0400
commit8a2b87e6e1f5cd8784130f3cfcd1911b214c55cc (patch)
treeb34a2bee1fa2772050ace252a4c691ffcf927c68 /src/xpath.h
parent023f28630f7ed8f845eab00b137d58cc79b4445b (diff)
downloadledger-8a2b87e6e1f5cd8784130f3cfcd1911b214c55cc.tar.gz
ledger-8a2b87e6e1f5cd8784130f3cfcd1911b214c55cc.tar.bz2
ledger-8a2b87e6e1f5cd8784130f3cfcd1911b214c55cc.zip
Changed scope resolution to use the new value_t.
Diffstat (limited to 'src/xpath.h')
-rw-r--r--src/xpath.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/xpath.h b/src/xpath.h
index 5433223d..0bb234a5 100644
--- a/src/xpath.h
+++ b/src/xpath.h
@@ -84,12 +84,11 @@ public:
public:
virtual void define(const string& name, ptr_op_t def);
- // jww (2007-05-15): ??
- virtual bool resolve(const string& name, value_t& result,
- scope_t * locals = NULL) {
+ virtual optional<value_t> resolve(const string& name,
+ scope_t * locals = NULL) {
if (parent)
- return parent->resolve(name, result, locals);
- return false;
+ return parent->resolve(name, locals);
+ return none;
}
virtual ptr_op_t lookup(const string& name);
@@ -116,8 +115,8 @@ public:
: scope_t(_parent, STATIC), node(_node), index(_index),
size(_size) {}
- virtual bool resolve(const string& name, value_t& result,
- scope_t * locals = NULL);
+ virtual optional<value_t> resolve(const string& name,
+ scope_t * locals = NULL);
};
#define XPATH_PARSE_NORMAL 0x00