diff options
author | Craig Earls <enderw88@gmail.com> | 2011-10-06 22:07:01 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2011-10-06 22:07:01 -0700 |
commit | b400d65be082165f44e769605aa6a78133cf6d9a (patch) | |
tree | 27b18ee35a5c4f60a10cf4f626e15ac30276040b /src/op.cc | |
parent | e9ccb012c2c5ffe0e9f4916ee859bda95d9d4248 (diff) | |
parent | f0791bbd7297e737d9e13d0b0bb21473b173b2a7 (diff) | |
download | fork-ledger-b400d65be082165f44e769605aa6a78133cf6d9a.tar.gz fork-ledger-b400d65be082165f44e769605aa6a78133cf6d9a.tar.bz2 fork-ledger-b400d65be082165f44e769605aa6a78133cf6d9a.zip |
Merge remote branch 'upstream/next' into next
Diffstat (limited to 'src/op.cc')
-rw-r--r-- | src/op.cc | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -164,6 +164,11 @@ value_t expr_t::op_t::calc(scope_t& scope, ptr_op_t * locus, const int depth) result = as_value(); break; + case O_DEFINE: + //result = left()->calc(scope, locus, depth + 1); + result = NULL_VALUE; + break; + case IDENT: { ptr_op_t definition = left(); if (! definition) { @@ -416,10 +421,8 @@ value_t expr_t::op_t::calc(scope_t& scope, ptr_op_t * locus, const int depth) break; } - case LAST: default: - assert(false); - break; + throw_(calc_error, _("Unexpected expr node '%1'") << op_context(this)); } #if defined(DEBUG_ON) @@ -435,7 +438,7 @@ value_t expr_t::op_t::calc(scope_t& scope, ptr_op_t * locus, const int depth) return result; } - catch (const std::exception&) { + catch (const std::exception&) { if (locus && ! *locus) *locus = this; throw; |