visitFunctionalStmt method
Implementation
@override
void visitFunctionalStmt(Stmt.Functional stmt) {
LoxFunction function = LoxFunction(stmt, environment, false);
for (var key in function.declaration.namedParams.keys) {
if (function.declaration.namedParams[key] != null) {
function.declaration.namedParams[key] =
evaluate(function.declaration.namedParams[key] as Expr.Expr);
}
}
environment.define(stmt.name.lexeme, function);
return;
}