File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Sources/SwiftSyntaxBuilderGeneration Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,12 @@ extension Node {
24
24
}
25
25
26
26
/// If documentation exists for this node, return it as a single-line string.
27
- /// Otherwise return an empty string.
27
+ /// Otherwise return an empty string or a description of collection if this
28
+ /// node is a syntax collection.
28
29
var documentation : String {
29
- guard let description = description,
30
- !description. isEmpty else {
31
- return " "
32
- }
33
- if isSyntaxCollection {
34
- return " ` \( syntaxKind) ` represents a collection of ` \( description) ` "
30
+ let description = self . description ?? " "
31
+ if description. isEmpty && isSyntaxCollection {
32
+ return " ` \( syntaxKind) ` represents a collection of ` \( collectionElementType. buildableBaseName) ` "
35
33
} else {
36
34
return flattened ( indentedDocumentation: description)
37
35
}
You can’t perform that action at this time.
0 commit comments