diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-07-10 20:01:18 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-07-10 23:10:17 +0200 |
| commit | 6a4823461f491aef63451f097ddfe5602e0b2157 (patch) | |
| tree | ad11b0ad169d030942d950573c729d50f7b3291b /src/eval/scope.rs | |
| parent | 36b3067c19c8743032a44f888ee48702b88d135b (diff) | |
Reference-count complex values
Rename some nodes types
Diffstat (limited to 'src/eval/scope.rs')
| -rw-r--r-- | src/eval/scope.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eval/scope.rs b/src/eval/scope.rs index 05bbeda2..4a9d5970 100644 --- a/src/eval/scope.rs +++ b/src/eval/scope.rs @@ -4,7 +4,7 @@ use std::fmt::{self, Debug, Display, Formatter}; use std::iter; use std::rc::Rc; -use super::{AnyValue, EcoString, EvalContext, FuncArgs, FuncValue, Type, Value}; +use super::{AnyValue, EcoString, EvalContext, FuncArgs, Function, Type, Value}; /// A slot where a variable is stored. pub type Slot = Rc<RefCell<Value>>; @@ -92,7 +92,7 @@ impl Scope { F: Fn(&mut EvalContext, &mut FuncArgs) -> Value + 'static, { let name = name.into(); - self.def_const(name.clone(), FuncValue::new(Some(name), f)); + self.def_const(name.clone(), Function::new(Some(name), f)); } /// Define a constant variable with a value of variant `Value::Any`. |
