From b953a372c2bee0a6006cc5155481dbe1fa1b720b Mon Sep 17 00:00:00 2001 From: minneelyyyy Date: Wed, 27 Nov 2024 01:41:11 -0500 Subject: [PATCH] lol, fix error --- src/executor.rs | 7 ------- src/function.rs | 6 ------ src/parser.rs | 1 - 3 files changed, 14 deletions(-) diff --git a/src/executor.rs b/src/executor.rs index f77a441..835d1e4 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -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()))), } diff --git a/src/function.rs b/src/function.rs index 60792df..dfc6bcd 100644 --- a/src/function.rs +++ b/src/function.rs @@ -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!(), } } diff --git a/src/parser.rs b/src/parser.rs index 63cd4fd..47f6c36 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -29,7 +29,6 @@ pub(crate) enum ParseTree { GeneratedFunction(Function), Nop, - NonCall(String), Export(Vec), }