FunctionDeclarationImpl constructor
FunctionDeclarationImpl({
- required CommentImpl? comment,
- required List<
AnnotationImpl> ? metadata, - required Token? augmentKeyword,
- required Token? externalKeyword,
- required TypeAnnotationImpl? returnType,
- required Token? propertyKeyword,
- required Token name,
- required FunctionExpressionImpl functionExpression,
Initialize a newly created function declaration. Either or both of the
comment
and metadata
can be null
if the function does not have the
corresponding attribute. The externalKeyword
can be null
if the
function is not an external function. The returnType
can be null
if no
return type was specified. The propertyKeyword
can be null
if the
function is neither a getter or a setter.
Implementation
FunctionDeclarationImpl({
required super.comment,
required super.metadata,
required this.augmentKeyword,
required this.externalKeyword,
required TypeAnnotationImpl? returnType,
required this.propertyKeyword,
required super.name,
required FunctionExpressionImpl functionExpression,
}) : _returnType = returnType,
_functionExpression = functionExpression {
_becomeParentOf(_returnType);
_becomeParentOf(_functionExpression);
}