From 521b935aa8ef68ac3a8a1fe1a37eed39b41eec95 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 21 Jun 2009 18:07:27 +0100 Subject: Restored --percent option, added baseline test --- src/item.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/item.cc') diff --git a/src/item.cc b/src/item.cc index e54fa6be..9e297052 100644 --- a/src/item.cc +++ b/src/item.cc @@ -247,6 +247,10 @@ namespace { return 0L; } + value_t ignore(item_t&) { + return false; + } + template value_t get_wrapper(call_scope_t& scope) { return (*Func)(find_scope(scope)); @@ -330,6 +334,11 @@ expr_t::ptr_op_t item_t::lookup(const string& name) return WRAP_FUNCTOR(ledger::has_tag); break; + case 'i': + if (name == "is_account") + return WRAP_FUNCTOR(get_wrapper<&ignore>); + break; + case 'm': if (name == "meta") return WRAP_FUNCTOR(ledger::get_tag); @@ -343,6 +352,8 @@ expr_t::ptr_op_t item_t::lookup(const string& name) case 'p': if (name == "pending") return WRAP_FUNCTOR(get_wrapper<&get_pending>); + else if (name == "parent") + return WRAP_FUNCTOR(get_wrapper<&ignore>); break; case 's': -- cgit v1.2.3