Interpreter - Callables now receive the callee value as an argument
This commit is contained in:
parent
692531ca65
commit
85e9c7db38
4 changed files with 14 additions and 4 deletions
src/interpreter
|
@ -39,7 +39,12 @@ impl Callable for Function {
|
|||
self.params.len()
|
||||
}
|
||||
|
||||
fn call(&self, es: &mut InterpreterState, arguments: Vec<Value>) -> SloxResult<Value> {
|
||||
fn call(
|
||||
&self,
|
||||
_callee: &Value,
|
||||
es: &mut InterpreterState,
|
||||
arguments: Vec<Value>,
|
||||
) -> SloxResult<Value> {
|
||||
assert_eq!(arguments.len(), self.arity());
|
||||
let param_env = InterpreterState {
|
||||
environment: Environment::create_child(&self.env),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue