DeclaredIdentifierImpl constructor

DeclaredIdentifierImpl({
  1. required CommentImpl? comment,
  2. required List<AnnotationImpl>? metadata,
  3. required Token? keyword,
  4. required TypeAnnotationImpl? type,
  5. required Token name,
})

Initialize a newly created formal parameter. Either or both of the comment and metadata can be null if the declaration does not have the corresponding attribute. The keyword can be null if a type name is given. The type must be null if the keyword is 'var'.

Implementation

DeclaredIdentifierImpl({
  required super.comment,
  required super.metadata,
  required this.keyword,
  required TypeAnnotationImpl? type,
  required this.name,
}) : _type = type {
  _becomeParentOf(_type);
}