diff options
Diffstat (limited to 'src/com/craftinginterpreters/lox/Interpreter.java')
-rw-r--r-- | src/com/craftinginterpreters/lox/Interpreter.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/craftinginterpreters/lox/Interpreter.java b/src/com/craftinginterpreters/lox/Interpreter.java index 4549e11..3e3be86 100644 --- a/src/com/craftinginterpreters/lox/Interpreter.java +++ b/src/com/craftinginterpreters/lox/Interpreter.java @@ -153,7 +153,7 @@ class Interpreter implements Expr.Visitor<Object>, Stmt.Visitor<Void> { @Override public Void visitFunctionStmt(Stmt.Function stmt) { - LoxFunction function = new LoxFunction(stmt); + LoxFunction function = new LoxFunction(stmt, environment); environment.define(stmt.name.lexeme, function); return null; } |