lol, fix error
This commit is contained in:
@@ -410,13 +410,6 @@ impl Executor {
|
||||
|
||||
Ok(Value::Nil)
|
||||
}
|
||||
ParseTree::NonCall(name) => {
|
||||
let obj = self.get_object_mut(&name)?;
|
||||
|
||||
let v = obj.lock().unwrap().eval()?;
|
||||
|
||||
Ok(v)
|
||||
}
|
||||
ParseTree::_Local(_idx) => todo!(),
|
||||
ParseTree::GeneratedFunction(function) => Ok(Value::Function(function.globals(self.globals.clone()).locals(self.locals.clone()))),
|
||||
}
|
||||
|
||||
@@ -119,12 +119,6 @@ impl Function {
|
||||
ParseTree::Value(_) => body,
|
||||
ParseTree::Nop => body,
|
||||
ParseTree::Export(_) => body,
|
||||
ParseTree::NonCall(ref var) => if let Some(idx) =
|
||||
args.into_iter().position(|r| *r == *var) {
|
||||
Box::new(ParseTree::_Local(idx))
|
||||
} else {
|
||||
body
|
||||
}
|
||||
ParseTree::GeneratedFunction(_) => todo!(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ pub(crate) enum ParseTree {
|
||||
GeneratedFunction(Function),
|
||||
|
||||
Nop,
|
||||
NonCall(String),
|
||||
Export(Vec<String>),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user