InterpretedFunction.expression constructor

InterpretedFunction.expression(
  1. SFunctionExpression expression,
  2. Environment closure
)

Implementation

InterpretedFunction.expression(
    SFunctionExpression expression, Environment closure)
    : this._internal(
        expression.parameters, expression.body!, closure, null,
        ownerType: null, // Not defined within a class/enum
        isAbstract: false, // Anonymous functions cannot be abstract
        isAsync: _isBodyAsync(expression.body), // Pass async flag
        isGenerator: _isBodyGenerator(expression.body), // Pass generator flag
        isAsyncGenerator: _isBodyAsync(expression.body) &&
            _isBodyGenerator(expression.body), // Pass async generator flag
        typeParameterNames:
            _extractTypeParameterNames(expression.typeParameters),
        typeParameterBounds:
            _extractTypeParameterBounds(expression.typeParameters, closure),
      );