diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-22 14:31:09 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-23 14:53:55 +0100 |
| commit | e1f29d6cb9437a4afb2e4fc4ee10a5b8717ab9fa (patch) | |
| tree | 1ce5f2bd858f6665d3867a2939d4b474c1b70377 /src/eval/scope.rs | |
| parent | 2bf32c51bceb2f3a8b7ebea3d7c7d6d96757591b (diff) | |
Rework the core context
Diffstat (limited to 'src/eval/scope.rs')
| -rw-r--r-- | src/eval/scope.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/eval/scope.rs b/src/eval/scope.rs index 0df4c4df..e09d05c8 100644 --- a/src/eval/scope.rs +++ b/src/eval/scope.rs @@ -4,9 +4,10 @@ use std::hash::{Hash, Hasher}; use std::iter; use std::sync::{Arc, RwLock}; -use super::{Args, Class, Construct, Func, Set, Value, Vm}; +use super::{Args, Class, Construct, Func, Set, Value}; use crate::diag::TypResult; use crate::util::EcoString; +use crate::Context; /// A slot where a variable is stored. pub type Slot = Arc<RwLock<Value>>; @@ -86,7 +87,7 @@ impl Scope { pub fn def_func( &mut self, name: &'static str, - func: fn(&mut Vm, &mut Args) -> TypResult<Value>, + func: fn(&mut Context, &mut Args) -> TypResult<Value>, ) { self.def_const(name, Func::native(name, func)); } |
