visitFunctionExpression method

  1. @override
Object? visitFunctionExpression(
  1. SFunctionExpression node
)
override

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;
}