PartOfDirectiveImpl constructor

PartOfDirectiveImpl({
  1. required CommentImpl? comment,
  2. required List<AnnotationImpl>? metadata,
  3. required Token partKeyword,
  4. required Token ofKeyword,
  5. required StringLiteralImpl? uri,
  6. required LibraryIdentifierImpl? libraryName,
  7. required Token semicolon,
})

Initialize a newly created part-of directive. Either or both of the comment and metadata can be null if the directive does not have the corresponding attribute.

Implementation

PartOfDirectiveImpl({
  required super.comment,
  required super.metadata,
  required this.partKeyword,
  required this.ofKeyword,
  required StringLiteralImpl? uri,
  required LibraryIdentifierImpl? libraryName,
  required this.semicolon,
})  : _uri = uri,
      _libraryName = libraryName {
  _becomeParentOf(_uri);
  _becomeParentOf(_libraryName);
}