visitFunctionExpression method
Visit a SFunctionExpression.
Implementation
@override
Object? visitFunctionExpression(SFunctionExpression node) {
// Create a function object capturing the current environment (closure)
// Use the .expression constructor since it might be anonymous
final function = InterpretedFunction.expression(node, environment);
// Return the function object itself as the value of the expression
return function;
}