Revert "If a valexpr identifier is unknown at calc time, re-compile at that point."
This reverts commit 4a463aca3b.
This commit is contained in:
parent
57b2fc463a
commit
e777abe854
1 changed files with 2 additions and 5 deletions
|
|
@ -105,17 +105,14 @@ value_t expr_t::op_t::calc(scope_t& scope, ptr_op_t * locus)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDENT: {
|
case IDENT: {
|
||||||
ptr_op_t def = left();
|
if (! left())
|
||||||
if (! def)
|
|
||||||
def = compile(scope);
|
|
||||||
if (! def)
|
|
||||||
throw_(calc_error, "Unknown identifier '" << as_ident() << "'");
|
throw_(calc_error, "Unknown identifier '" << as_ident() << "'");
|
||||||
|
|
||||||
// Evaluating an identifier is the same as calling its definition
|
// Evaluating an identifier is the same as calling its definition
|
||||||
// directly, so we create an empty call_scope_t to reflect the scope for
|
// directly, so we create an empty call_scope_t to reflect the scope for
|
||||||
// this implicit call.
|
// this implicit call.
|
||||||
call_scope_t call_args(scope);
|
call_scope_t call_args(scope);
|
||||||
result = def->calc(call_args, locus);
|
result = left()->calc(call_args, locus);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue