@@ -17,14 +17,12 @@ import SwiftSyntax
17
17
public protocol DeclListBuildable : SyntaxListBuildable {
18
18
/// Builds list of `DeclSyntax`s.
19
19
/// - Parameter format: The `Format` to use.
20
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
21
- func buildDeclList( format: Format , leadingTrivia: Trivia ? ) -> [ DeclSyntax ]
20
+ func buildDeclList( format: Format ) -> [ DeclSyntax ]
22
21
}
23
22
public protocol DeclBuildable : ExpressibleAsDeclBuildable , DeclListBuildable , SyntaxBuildable {
24
23
/// Builds list of `DeclSyntax`s.
25
24
/// - Parameter format: The `Format` to use.
26
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
27
- func buildDecl( format: Format , leadingTrivia: Trivia ? ) -> DeclSyntax
25
+ func buildDecl( format: Format ) -> DeclSyntax
28
26
}
29
27
public extension DeclBuildable {
30
28
/// Satisfies conformance to `ExpressibleAsDeclBuildable`.
@@ -33,33 +31,29 @@ public extension DeclBuildable {
33
31
}
34
32
/// Builds list of `DeclSyntax`s.
35
33
/// - Parameter format: The `Format` to use.
36
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
37
34
///
38
35
/// Satisfies conformance to `DeclListBuildable`
39
- func buildDeclList( format: Format , leadingTrivia : Trivia ? = nil ) -> [ DeclSyntax ] {
40
- return [ buildDecl ( format: format, leadingTrivia : leadingTrivia ) ]
36
+ func buildDeclList( format: Format ) -> [ DeclSyntax ] {
37
+ return [ buildDecl ( format: format) ]
41
38
}
42
39
/// Builds a `DeclSyntax`.
43
40
/// - Parameter format: The `Format` to use.
44
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
45
41
/// - Returns: A new `Syntax` with the built `DeclSyntax`.
46
42
///
47
43
/// Satisfies conformance to `SyntaxBuildable`.
48
- func buildSyntax( format: Format , leadingTrivia : Trivia ? = nil ) -> Syntax {
49
- return Syntax ( buildDecl ( format: format, leadingTrivia : leadingTrivia ) )
44
+ func buildSyntax( format: Format ) -> Syntax {
45
+ return Syntax ( buildDecl ( format: format) )
50
46
}
51
47
}
52
48
public protocol ExprListBuildable : SyntaxListBuildable {
53
49
/// Builds list of `ExprSyntax`s.
54
50
/// - Parameter format: The `Format` to use.
55
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
56
- func buildExprList( format: Format , leadingTrivia: Trivia ? ) -> [ ExprSyntax ]
51
+ func buildExprList( format: Format ) -> [ ExprSyntax ]
57
52
}
58
53
public protocol ExprBuildable : ExpressibleAsExprBuildable , ExprListBuildable , SyntaxBuildable {
59
54
/// Builds list of `ExprSyntax`s.
60
55
/// - Parameter format: The `Format` to use.
61
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
62
- func buildExpr( format: Format , leadingTrivia: Trivia ? ) -> ExprSyntax
56
+ func buildExpr( format: Format ) -> ExprSyntax
63
57
}
64
58
public extension ExprBuildable {
65
59
/// Satisfies conformance to `ExpressibleAsExprBuildable`.
@@ -68,33 +62,29 @@ public extension ExprBuildable {
68
62
}
69
63
/// Builds list of `ExprSyntax`s.
70
64
/// - Parameter format: The `Format` to use.
71
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
72
65
///
73
66
/// Satisfies conformance to `ExprListBuildable`
74
- func buildExprList( format: Format , leadingTrivia : Trivia ? = nil ) -> [ ExprSyntax ] {
75
- return [ buildExpr ( format: format, leadingTrivia : leadingTrivia ) ]
67
+ func buildExprList( format: Format ) -> [ ExprSyntax ] {
68
+ return [ buildExpr ( format: format) ]
76
69
}
77
70
/// Builds a `ExprSyntax`.
78
71
/// - Parameter format: The `Format` to use.
79
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
80
72
/// - Returns: A new `Syntax` with the built `ExprSyntax`.
81
73
///
82
74
/// Satisfies conformance to `SyntaxBuildable`.
83
- func buildSyntax( format: Format , leadingTrivia : Trivia ? = nil ) -> Syntax {
84
- return Syntax ( buildExpr ( format: format, leadingTrivia : leadingTrivia ) )
75
+ func buildSyntax( format: Format ) -> Syntax {
76
+ return Syntax ( buildExpr ( format: format) )
85
77
}
86
78
}
87
79
public protocol PatternListBuildable : SyntaxListBuildable {
88
80
/// Builds list of `PatternSyntax`s.
89
81
/// - Parameter format: The `Format` to use.
90
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
91
- func buildPatternList( format: Format , leadingTrivia: Trivia ? ) -> [ PatternSyntax ]
82
+ func buildPatternList( format: Format ) -> [ PatternSyntax ]
92
83
}
93
84
public protocol PatternBuildable : ExpressibleAsPatternBuildable , PatternListBuildable , SyntaxBuildable {
94
85
/// Builds list of `PatternSyntax`s.
95
86
/// - Parameter format: The `Format` to use.
96
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
97
- func buildPattern( format: Format , leadingTrivia: Trivia ? ) -> PatternSyntax
87
+ func buildPattern( format: Format ) -> PatternSyntax
98
88
}
99
89
public extension PatternBuildable {
100
90
/// Satisfies conformance to `ExpressibleAsPatternBuildable`.
@@ -103,33 +93,29 @@ public extension PatternBuildable {
103
93
}
104
94
/// Builds list of `PatternSyntax`s.
105
95
/// - Parameter format: The `Format` to use.
106
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
107
96
///
108
97
/// Satisfies conformance to `PatternListBuildable`
109
- func buildPatternList( format: Format , leadingTrivia : Trivia ? = nil ) -> [ PatternSyntax ] {
110
- return [ buildPattern ( format: format, leadingTrivia : leadingTrivia ) ]
98
+ func buildPatternList( format: Format ) -> [ PatternSyntax ] {
99
+ return [ buildPattern ( format: format) ]
111
100
}
112
101
/// Builds a `PatternSyntax`.
113
102
/// - Parameter format: The `Format` to use.
114
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
115
103
/// - Returns: A new `Syntax` with the built `PatternSyntax`.
116
104
///
117
105
/// Satisfies conformance to `SyntaxBuildable`.
118
- func buildSyntax( format: Format , leadingTrivia : Trivia ? = nil ) -> Syntax {
119
- return Syntax ( buildPattern ( format: format, leadingTrivia : leadingTrivia ) )
106
+ func buildSyntax( format: Format ) -> Syntax {
107
+ return Syntax ( buildPattern ( format: format) )
120
108
}
121
109
}
122
110
public protocol StmtListBuildable : SyntaxListBuildable {
123
111
/// Builds list of `StmtSyntax`s.
124
112
/// - Parameter format: The `Format` to use.
125
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
126
- func buildStmtList( format: Format , leadingTrivia: Trivia ? ) -> [ StmtSyntax ]
113
+ func buildStmtList( format: Format ) -> [ StmtSyntax ]
127
114
}
128
115
public protocol StmtBuildable : ExpressibleAsStmtBuildable , StmtListBuildable , SyntaxBuildable {
129
116
/// Builds list of `StmtSyntax`s.
130
117
/// - Parameter format: The `Format` to use.
131
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
132
- func buildStmt( format: Format , leadingTrivia: Trivia ? ) -> StmtSyntax
118
+ func buildStmt( format: Format ) -> StmtSyntax
133
119
}
134
120
public extension StmtBuildable {
135
121
/// Satisfies conformance to `ExpressibleAsStmtBuildable`.
@@ -138,33 +124,29 @@ public extension StmtBuildable {
138
124
}
139
125
/// Builds list of `StmtSyntax`s.
140
126
/// - Parameter format: The `Format` to use.
141
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
142
127
///
143
128
/// Satisfies conformance to `StmtListBuildable`
144
- func buildStmtList( format: Format , leadingTrivia : Trivia ? = nil ) -> [ StmtSyntax ] {
145
- return [ buildStmt ( format: format, leadingTrivia : leadingTrivia ) ]
129
+ func buildStmtList( format: Format ) -> [ StmtSyntax ] {
130
+ return [ buildStmt ( format: format) ]
146
131
}
147
132
/// Builds a `StmtSyntax`.
148
133
/// - Parameter format: The `Format` to use.
149
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
150
134
/// - Returns: A new `Syntax` with the built `StmtSyntax`.
151
135
///
152
136
/// Satisfies conformance to `SyntaxBuildable`.
153
- func buildSyntax( format: Format , leadingTrivia : Trivia ? = nil ) -> Syntax {
154
- return Syntax ( buildStmt ( format: format, leadingTrivia : leadingTrivia ) )
137
+ func buildSyntax( format: Format ) -> Syntax {
138
+ return Syntax ( buildStmt ( format: format) )
155
139
}
156
140
}
157
141
public protocol SyntaxListBuildable {
158
142
/// Builds list of `Syntax`s.
159
143
/// - Parameter format: The `Format` to use.
160
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
161
- func buildSyntaxList( format: Format , leadingTrivia: Trivia ? ) -> [ Syntax ]
144
+ func buildSyntaxList( format: Format ) -> [ Syntax ]
162
145
}
163
146
public protocol SyntaxBuildable : ExpressibleAsSyntaxBuildable , SyntaxListBuildable {
164
147
/// Builds list of `Syntax`s.
165
148
/// - Parameter format: The `Format` to use.
166
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
167
- func buildSyntax( format: Format , leadingTrivia: Trivia ? ) -> Syntax
149
+ func buildSyntax( format: Format ) -> Syntax
168
150
}
169
151
public extension SyntaxBuildable {
170
152
/// Satisfies conformance to `ExpressibleAsSyntaxBuildable`.
@@ -173,24 +155,21 @@ public extension SyntaxBuildable {
173
155
}
174
156
/// Builds list of `Syntax`s.
175
157
/// - Parameter format: The `Format` to use.
176
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
177
158
///
178
159
/// Satisfies conformance to `SyntaxListBuildable`
179
- func buildSyntaxList( format: Format , leadingTrivia : Trivia ? = nil ) -> [ Syntax ] {
180
- return [ buildSyntax ( format: format, leadingTrivia : leadingTrivia ) ]
160
+ func buildSyntaxList( format: Format ) -> [ Syntax ] {
161
+ return [ buildSyntax ( format: format) ]
181
162
}
182
163
}
183
164
public protocol TypeListBuildable : SyntaxListBuildable {
184
165
/// Builds list of `TypeSyntax`s.
185
166
/// - Parameter format: The `Format` to use.
186
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
187
- func buildTypeList( format: Format , leadingTrivia: Trivia ? ) -> [ TypeSyntax ]
167
+ func buildTypeList( format: Format ) -> [ TypeSyntax ]
188
168
}
189
169
public protocol TypeBuildable : ExpressibleAsTypeBuildable , TypeListBuildable , SyntaxBuildable {
190
170
/// Builds list of `TypeSyntax`s.
191
171
/// - Parameter format: The `Format` to use.
192
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
193
- func buildType( format: Format , leadingTrivia: Trivia ? ) -> TypeSyntax
172
+ func buildType( format: Format ) -> TypeSyntax
194
173
}
195
174
public extension TypeBuildable {
196
175
/// Satisfies conformance to `ExpressibleAsTypeBuildable`.
@@ -199,19 +178,17 @@ public extension TypeBuildable {
199
178
}
200
179
/// Builds list of `TypeSyntax`s.
201
180
/// - Parameter format: The `Format` to use.
202
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
203
181
///
204
182
/// Satisfies conformance to `TypeListBuildable`
205
- func buildTypeList( format: Format , leadingTrivia : Trivia ? = nil ) -> [ TypeSyntax ] {
206
- return [ buildType ( format: format, leadingTrivia : leadingTrivia ) ]
183
+ func buildTypeList( format: Format ) -> [ TypeSyntax ] {
184
+ return [ buildType ( format: format) ]
207
185
}
208
186
/// Builds a `TypeSyntax`.
209
187
/// - Parameter format: The `Format` to use.
210
- /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
211
188
/// - Returns: A new `Syntax` with the built `TypeSyntax`.
212
189
///
213
190
/// Satisfies conformance to `SyntaxBuildable`.
214
- func buildSyntax( format: Format , leadingTrivia : Trivia ? = nil ) -> Syntax {
215
- return Syntax ( buildType ( format: format, leadingTrivia : leadingTrivia ) )
191
+ func buildSyntax( format: Format ) -> Syntax {
192
+ return Syntax ( buildType ( format: format) )
216
193
}
217
194
}
0 commit comments