SetOrMapLiteralImpl constructor

SetOrMapLiteralImpl({
  1. required Token? constKeyword,
  2. required TypeArgumentListImpl? typeArguments,
  3. required Token leftBracket,
  4. required List<CollectionElementImpl> elements,
  5. required Token rightBracket,
})

Initialize a newly created set or map literal. The constKeyword can be null if the literal is not a constant. The typeArguments can be null if no type arguments were declared. The elements can be null if the set is empty.

Implementation

SetOrMapLiteralImpl({
  required super.constKeyword,
  required super.typeArguments,
  required this.leftBracket,
  required List<CollectionElementImpl> elements,
  required this.rightBracket,
}) {
  _elements._initialize(this, elements);
}