summaryrefslogtreecommitdiff
path: root/src/eval/scope.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-05-25 13:50:33 +0200
committerLaurenz <laurmaedje@gmail.com>2022-05-25 13:59:06 +0200
commitc010cbc17dcbb2f0d6005d21530143bf57cb5871 (patch)
tree937fe79f0c121bcc025480181287fd4a3d0c0f4f /src/eval/scope.rs
parent6935cf8dfefff3d6cf234f077a7d61661fd5ca57 (diff)
Move route from context to VM
Diffstat (limited to 'src/eval/scope.rs')
-rw-r--r--src/eval/scope.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/eval/scope.rs b/src/eval/scope.rs
index 8acaa431..8a0b8165 100644
--- a/src/eval/scope.rs
+++ b/src/eval/scope.rs
@@ -6,10 +6,9 @@ use std::sync::Arc;
use parking_lot::RwLock;
-use super::{Args, Func, Node, Value};
+use super::{Args, Func, Machine, Node, 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>>;
@@ -89,7 +88,7 @@ impl Scope {
pub fn def_fn(
&mut self,
name: &'static str,
- func: fn(&mut Context, &mut Args) -> TypResult<Value>,
+ func: fn(&mut Machine, &mut Args) -> TypResult<Value>,
) {
self.def_const(name, Func::from_fn(name, func));
}