Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Sources/SwiftSyntax/SyntaxCollections.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@ public protocol SyntaxCollection: SyntaxProtocol, Sequence {
% if node.collection_element:
% element_node = NODE_MAP.get(node.collection_element)

% if node.description:
% for line in dedented_lines(node.description):
/// ${line}
% end
% else:
/// `${node.name}` represents a collection of one or more
/// `${node.collection_element_type}` nodes. ${node.name} behaves
/// as a regular Swift collection, and has accessors that return new
/// versions of the collection with different children.
% end
public struct ${node.name}: SyntaxCollection, SyntaxHashable {
public let _syntaxNode: Syntax

Expand Down
20 changes: 8 additions & 12 deletions Sources/SwiftSyntax/gyb_generated/SyntaxCollections.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1488,10 +1488,10 @@ extension DeclNameArgumentListSyntax: BidirectionalCollection {
}
}

/// `ExprListSyntax` represents a collection of one or more
/// `ExprSyntax` nodes. ExprListSyntax behaves
/// as a regular Swift collection, and has accessors that return new
/// versions of the collection with different children.
///
/// A list of expressions connected by operators. This list is contained
/// by a `SequenceExprSyntax`.
///
public struct ExprListSyntax: SyntaxCollection, SyntaxHashable {
public let _syntaxNode: Syntax

Expand Down Expand Up @@ -4428,10 +4428,7 @@ extension PatternBindingListSyntax: BidirectionalCollection {
}
}

/// `EnumCaseElementListSyntax` represents a collection of one or more
/// `EnumCaseElementSyntax` nodes. EnumCaseElementListSyntax behaves
/// as a regular Swift collection, and has accessors that return new
/// versions of the collection with different children.
/// A collection of 0 or more `EnumCaseElement`s.
public struct EnumCaseElementListSyntax: SyntaxCollection, SyntaxHashable {
public let _syntaxNode: Syntax

Expand Down Expand Up @@ -6143,10 +6140,9 @@ extension AttributeListSyntax: BidirectionalCollection {
}
}

/// `SpecializeAttributeSpecListSyntax` represents a collection of one or more
/// `Syntax` nodes. SpecializeAttributeSpecListSyntax behaves
/// as a regular Swift collection, and has accessors that return new
/// versions of the collection with different children.
///
/// A collection of arguments for the `@_specialize` attribute
///
public struct SpecializeAttributeSpecListSyntax: SyntaxCollection, SyntaxHashable {
public let _syntaxNode: Syntax

Expand Down