TopLevelVariableDeclarationImpl constructor

TopLevelVariableDeclarationImpl({
  1. required CommentImpl? comment,
  2. required List<AnnotationImpl>? metadata,
  3. required Token? externalKeyword,
  4. required VariableDeclarationListImpl variableList,
  5. required Token semicolon,
})

Initialize a newly created top-level variable declaration. Either or both of the comment and metadata can be null if the variable does not have the corresponding attribute.

Implementation

TopLevelVariableDeclarationImpl({
  required super.comment,
  required super.metadata,
  required this.externalKeyword,
  required VariableDeclarationListImpl variableList,
  required this.semicolon,
}) : _variableList = variableList {
  _becomeParentOf(_variableList);
}