diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-14 03:11:48 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-14 03:11:48 -0500 |
commit | a461e17eee16ec51d2f074a0f46cb552edaa3ffd (patch) | |
tree | 6d9bbf95b19108ee0672812ec1373889c5646262 /src/post.cc | |
parent | 7a447912216e467a402e48be49f143f1b4be8261 (diff) | |
download | fork-ledger-a461e17eee16ec51d2f074a0f46cb552edaa3ffd.tar.gz fork-ledger-a461e17eee16ec51d2f074a0f46cb552edaa3ffd.tar.bz2 fork-ledger-a461e17eee16ec51d2f074a0f46cb552edaa3ffd.zip |
Added historical support for single-letter valexprs
Diffstat (limited to 'src/post.cc')
-rw-r--r-- | src/post.cc | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/post.cc b/src/post.cc index 7c27b6c4..34284e1b 100644 --- a/src/post.cc +++ b/src/post.cc @@ -297,6 +297,11 @@ expr_t::ptr_op_t post_t::lookup(const symbol_t::kind_t kind, return WRAP_FUNCTOR(get_wrapper<&get_account_base>); break; + case 'b': + if (name[1] == '\0') + return WRAP_FUNCTOR(get_wrapper<&get_cost>); + break; + case 'c': if (name == "code") return WRAP_FUNCTOR(get_wrapper<&get_code>); @@ -325,7 +330,9 @@ expr_t::ptr_op_t post_t::lookup(const symbol_t::kind_t kind, break; case 'i': - if (name == "id") + if (name == "index") + return WRAP_FUNCTOR(get_wrapper<&get_count>); + else if (name == "id") return WRAP_FUNCTOR(get_wrapper<&get_id>); else if (name == "idstring") return WRAP_FUNCTOR(get_wrapper<&get_idstring>); @@ -339,6 +346,8 @@ expr_t::ptr_op_t post_t::lookup(const symbol_t::kind_t kind, case 'n': if (name == "note") return WRAP_FUNCTOR(get_wrapper<&get_note>); + else if (name[1] == '\0') + return WRAP_FUNCTOR(get_wrapper<&get_count>); break; case 'p': @@ -358,7 +367,7 @@ expr_t::ptr_op_t post_t::lookup(const symbol_t::kind_t kind, break; case 't': - if (name[1] == '\0' || name == "total") + if (name == "total") return WRAP_FUNCTOR(get_wrapper<&get_total>); break; @@ -376,6 +385,21 @@ expr_t::ptr_op_t post_t::lookup(const symbol_t::kind_t kind, if (name == "xact") return WRAP_FUNCTOR(get_wrapper<&get_xact>); break; + + case 'N': + if (name[1] == '\0') + return WRAP_FUNCTOR(get_wrapper<&get_count>); + break; + + case 'O': + if (name[1] == '\0') + return WRAP_FUNCTOR(get_wrapper<&get_total>); + break; + + case 'R': + if (name[1] == '\0') + return WRAP_FUNCTOR(get_wrapper<&get_real>); + break; } return item_t::lookup(kind, name); |