diff options
Diffstat (limited to 'src/expr.cc')
-rw-r--r-- | src/expr.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/expr.cc b/src/expr.cc index 14fb2be8..b0262f17 100644 --- a/src/expr.cc +++ b/src/expr.cc @@ -107,15 +107,21 @@ void expr_t::parse(std::istream& in, const uint32_t flags, compiled = false; } -void expr_t::compile(scope_t& scope) +void expr_t::recompile(scope_t& scope) { - if (ptr.get() && ! compiled) { + if (ptr.get()) { ptr = ptr->compile(scope); context = &scope; compiled = true; } } +void expr_t::compile(scope_t& scope) +{ + if (! compiled) + recompile(scope); +} + value_t expr_t::calc(scope_t& scope) { if (ptr.get()) { |