diff --git a/src/xact.cc b/src/xact.cc index 83e36078..883c320d 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -204,6 +204,10 @@ namespace { return string_value(xact.reported_account()->name); } + value_t get_account_depth(xact_t& xact) { + return long(xact.reported_account()->depth); + } + template value_t get_wrapper(call_scope_t& scope) { return (*Func)(find_scope(scope)); @@ -235,6 +239,11 @@ expr_t::ptr_op_t xact_t::lookup(const string& name) return WRAP_FUNCTOR(get_wrapper<&get_is_calculated>); break; + case 'd': + if (name == "depth") + return WRAP_FUNCTOR(get_wrapper<&get_account_depth>); + break; + case 'e': if (name == "entry") return WRAP_FUNCTOR(get_wrapper<&get_entry>);