summaryrefslogtreecommitdiff
path: root/src/op.cc
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2011-10-06 22:07:01 -0700
committerCraig Earls <enderw88@gmail.com>2011-10-06 22:07:01 -0700
commitb400d65be082165f44e769605aa6a78133cf6d9a (patch)
tree27b18ee35a5c4f60a10cf4f626e15ac30276040b /src/op.cc
parente9ccb012c2c5ffe0e9f4916ee859bda95d9d4248 (diff)
parentf0791bbd7297e737d9e13d0b0bb21473b173b2a7 (diff)
downloadfork-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.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/op.cc b/src/op.cc
index f4bc28fc..893cd834 100644
--- a/src/op.cc
+++ b/src/op.cc
@@ -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;