diff options
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; |