summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-09 00:29:51 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-09 00:29:51 -0400
commite777abe8547f8c1a9053dda981dd6a8302ffa640 (patch)
tree8c7c86681cd996b4235a0d9b91b3a2c298fd34c6
parent57b2fc463af385a1852af790a5763fc2066f9066 (diff)
downloadfork-ledger-e777abe8547f8c1a9053dda981dd6a8302ffa640.tar.gz
fork-ledger-e777abe8547f8c1a9053dda981dd6a8302ffa640.tar.bz2
fork-ledger-e777abe8547f8c1a9053dda981dd6a8302ffa640.zip
Revert "If a valexpr identifier is unknown at calc time, re-compile at that point."
This reverts commit 4a463aca3bece8f2beb68b0fc4d347a713ff07a6.
-rw-r--r--src/op.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/op.cc b/src/op.cc
index 6a48d528..902ed647 100644
--- a/src/op.cc
+++ b/src/op.cc
@@ -105,17 +105,14 @@ value_t expr_t::op_t::calc(scope_t& scope, ptr_op_t * locus)
break;
case IDENT: {
- ptr_op_t def = left();
- if (! def)
- def = compile(scope);
- if (! def)
+ if (! left())
throw_(calc_error, "Unknown identifier '" << as_ident() << "'");
// Evaluating an identifier is the same as calling its definition
// directly, so we create an empty call_scope_t to reflect the scope for
// this implicit call.
call_scope_t call_args(scope);
- result = def->calc(call_args, locus);
+ result = left()->calc(call_args, locus);
break;
}