Add Expr::DynamicConstant.

This commit is contained in:
Stephen Chung
2020-11-14 19:04:49 +08:00
parent c104afbdce
commit 28de155f08
3 changed files with 33 additions and 2 deletions

View File

@@ -1677,6 +1677,7 @@ impl Engine {
let result = match expr {
Expr::Expr(x) => self.eval_expr(scope, mods, state, lib, this_ptr, x, level),
Expr::DynamicConstant(x, _) => Ok(x.as_ref().clone()),
Expr::IntegerConstant(x, _) => Ok((*x).into()),
#[cfg(not(feature = "no_float"))]
Expr::FloatConstant(x, _) => Ok((*x).into()),