Skip to content

Commit 0e21bb7

Browse files
committed
Make layoutView in syntax collections private
1 parent e10d848 commit 0e21bb7

File tree

2 files changed

+92
-138
lines changed

2 files changed

+92
-138
lines changed

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxCollectionsFile.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ let syntaxCollectionsFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
136136

137137
DeclSyntax(
138138
"""
139-
@_spi(RawSyntax)
140-
public var layoutView: RawSyntaxLayoutView {
139+
private var layoutView: RawSyntaxLayoutView {
141140
data.raw.layoutView!
142141
}
143142
"""
@@ -180,7 +179,7 @@ let syntaxCollectionsFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
180179
DeclSyntax(
181180
"""
182181
/// The number of elements, `present` or `missing`, in this collection.
183-
public var count: Int { return raw.layoutView!.children.count }
182+
public var count: Int { return layoutView.children.count }
184183
"""
185184
)
186185

0 commit comments

Comments
 (0)