1
+
2
+ //// Automatically Generated by SwiftSyntaxBuilderGeneration
3
+ //// Do Not Edit Directly!
4
+ //===----------------------------------------------------------------------===//
5
+ //
6
+ // This source file is part of the Swift.org open source project
7
+ //
8
+ // Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
9
+ // Licensed under Apache License v2.0 with Runtime Library Exception
10
+ //
11
+ // See https://swift.org/LICENSE.txt for license information
12
+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
13
+ //
14
+ //===----------------------------------------------------------------------===//
15
+
16
+ import SwiftSyntax
17
+ public protocol DeclListBuildable : SyntaxListBuildable {
18
+ /// Builds list of `DeclSyntax`s.
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 ]
22
+ }
23
+ public protocol DeclBuildable : ExpressibleAsDeclBuildable , DeclListBuildable , SyntaxBuildable {
24
+ /// Builds list of `DeclSyntax`s.
25
+ /// - 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
28
+ }
29
+ public extension DeclBuildable {
30
+ /// Satisfies conformance to `ExpressibleAsDeclBuildable`.
31
+ func createDeclBuildable( ) -> DeclBuildable {
32
+ return self
33
+ }
34
+ /// Builds list of `DeclSyntax`s.
35
+ /// - Parameter format: The `Format` to use.
36
+ /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
37
+ ///
38
+ /// Satisfies conformance to `DeclListBuildable`
39
+ func buildDeclList( format: Format , leadingTrivia: Trivia ? = nil ) -> [ DeclSyntax ] {
40
+ return [ buildDecl ( format: format, leadingTrivia: leadingTrivia) ]
41
+ }
42
+ /// Builds a `DeclSyntax`.
43
+ /// - Parameter format: The `Format` to use.
44
+ /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
45
+ /// - Returns: A new `Syntax` with the built `DeclSyntax`.
46
+ ///
47
+ /// Satisfies conformance to `SyntaxBuildable`.
48
+ func buildSyntax( format: Format , leadingTrivia: Trivia ? = nil ) -> Syntax {
49
+ return Syntax ( buildDecl ( format: format, leadingTrivia: leadingTrivia) )
50
+ }
51
+ }
52
+ public protocol ExprListBuildable : SyntaxListBuildable {
53
+ /// Builds list of `ExprSyntax`s.
54
+ /// - 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 ]
57
+ }
58
+ public protocol ExprBuildable : ExpressibleAsExprBuildable , ExprListBuildable , SyntaxBuildable {
59
+ /// Builds list of `ExprSyntax`s.
60
+ /// - 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
63
+ }
64
+ public extension ExprBuildable {
65
+ /// Satisfies conformance to `ExpressibleAsExprBuildable`.
66
+ func createExprBuildable( ) -> ExprBuildable {
67
+ return self
68
+ }
69
+ /// Builds list of `ExprSyntax`s.
70
+ /// - Parameter format: The `Format` to use.
71
+ /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
72
+ ///
73
+ /// Satisfies conformance to `ExprListBuildable`
74
+ func buildExprList( format: Format , leadingTrivia: Trivia ? = nil ) -> [ ExprSyntax ] {
75
+ return [ buildExpr ( format: format, leadingTrivia: leadingTrivia) ]
76
+ }
77
+ /// Builds a `ExprSyntax`.
78
+ /// - Parameter format: The `Format` to use.
79
+ /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
80
+ /// - Returns: A new `Syntax` with the built `ExprSyntax`.
81
+ ///
82
+ /// Satisfies conformance to `SyntaxBuildable`.
83
+ func buildSyntax( format: Format , leadingTrivia: Trivia ? = nil ) -> Syntax {
84
+ return Syntax ( buildExpr ( format: format, leadingTrivia: leadingTrivia) )
85
+ }
86
+ }
87
+ public protocol PatternListBuildable : SyntaxListBuildable {
88
+ /// Builds list of `PatternSyntax`s.
89
+ /// - 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 ]
92
+ }
93
+ public protocol PatternBuildable : ExpressibleAsPatternBuildable , PatternListBuildable , SyntaxBuildable {
94
+ /// Builds list of `PatternSyntax`s.
95
+ /// - 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
98
+ }
99
+ public extension PatternBuildable {
100
+ /// Satisfies conformance to `ExpressibleAsPatternBuildable`.
101
+ func createPatternBuildable( ) -> PatternBuildable {
102
+ return self
103
+ }
104
+ /// Builds list of `PatternSyntax`s.
105
+ /// - Parameter format: The `Format` to use.
106
+ /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
107
+ ///
108
+ /// Satisfies conformance to `PatternListBuildable`
109
+ func buildPatternList( format: Format , leadingTrivia: Trivia ? = nil ) -> [ PatternSyntax ] {
110
+ return [ buildPattern ( format: format, leadingTrivia: leadingTrivia) ]
111
+ }
112
+ /// Builds a `PatternSyntax`.
113
+ /// - Parameter format: The `Format` to use.
114
+ /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
115
+ /// - Returns: A new `Syntax` with the built `PatternSyntax`.
116
+ ///
117
+ /// Satisfies conformance to `SyntaxBuildable`.
118
+ func buildSyntax( format: Format , leadingTrivia: Trivia ? = nil ) -> Syntax {
119
+ return Syntax ( buildPattern ( format: format, leadingTrivia: leadingTrivia) )
120
+ }
121
+ }
122
+ public protocol StmtListBuildable : SyntaxListBuildable {
123
+ /// Builds list of `StmtSyntax`s.
124
+ /// - 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 ]
127
+ }
128
+ public protocol StmtBuildable : ExpressibleAsStmtBuildable , StmtListBuildable , SyntaxBuildable {
129
+ /// Builds list of `StmtSyntax`s.
130
+ /// - 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
133
+ }
134
+ public extension StmtBuildable {
135
+ /// Satisfies conformance to `ExpressibleAsStmtBuildable`.
136
+ func createStmtBuildable( ) -> StmtBuildable {
137
+ return self
138
+ }
139
+ /// Builds list of `StmtSyntax`s.
140
+ /// - Parameter format: The `Format` to use.
141
+ /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
142
+ ///
143
+ /// Satisfies conformance to `StmtListBuildable`
144
+ func buildStmtList( format: Format , leadingTrivia: Trivia ? = nil ) -> [ StmtSyntax ] {
145
+ return [ buildStmt ( format: format, leadingTrivia: leadingTrivia) ]
146
+ }
147
+ /// Builds a `StmtSyntax`.
148
+ /// - Parameter format: The `Format` to use.
149
+ /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
150
+ /// - Returns: A new `Syntax` with the built `StmtSyntax`.
151
+ ///
152
+ /// Satisfies conformance to `SyntaxBuildable`.
153
+ func buildSyntax( format: Format , leadingTrivia: Trivia ? = nil ) -> Syntax {
154
+ return Syntax ( buildStmt ( format: format, leadingTrivia: leadingTrivia) )
155
+ }
156
+ }
157
+ public protocol SyntaxListBuildable {
158
+ /// Builds list of `Syntax`s.
159
+ /// - 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 ]
162
+ }
163
+ public protocol SyntaxBuildable : ExpressibleAsSyntaxBuildable , SyntaxListBuildable {
164
+ /// Builds list of `Syntax`s.
165
+ /// - 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
168
+ }
169
+ public extension SyntaxBuildable {
170
+ /// Satisfies conformance to `ExpressibleAsSyntaxBuildable`.
171
+ func createSyntaxBuildable( ) -> SyntaxBuildable {
172
+ return self
173
+ }
174
+ /// Builds list of `Syntax`s.
175
+ /// - Parameter format: The `Format` to use.
176
+ /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
177
+ ///
178
+ /// Satisfies conformance to `SyntaxListBuildable`
179
+ func buildSyntaxList( format: Format , leadingTrivia: Trivia ? = nil ) -> [ Syntax ] {
180
+ return [ buildSyntax ( format: format, leadingTrivia: leadingTrivia) ]
181
+ }
182
+ }
183
+ public protocol TypeListBuildable : SyntaxListBuildable {
184
+ /// Builds list of `TypeSyntax`s.
185
+ /// - 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 ]
188
+ }
189
+ public protocol TypeBuildable : ExpressibleAsTypeBuildable , TypeListBuildable , SyntaxBuildable {
190
+ /// Builds list of `TypeSyntax`s.
191
+ /// - 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
194
+ }
195
+ public extension TypeBuildable {
196
+ /// Satisfies conformance to `ExpressibleAsTypeBuildable`.
197
+ func createTypeBuildable( ) -> TypeBuildable {
198
+ return self
199
+ }
200
+ /// Builds list of `TypeSyntax`s.
201
+ /// - Parameter format: The `Format` to use.
202
+ /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
203
+ ///
204
+ /// Satisfies conformance to `TypeListBuildable`
205
+ func buildTypeList( format: Format , leadingTrivia: Trivia ? = nil ) -> [ TypeSyntax ] {
206
+ return [ buildType ( format: format, leadingTrivia: leadingTrivia) ]
207
+ }
208
+ /// Builds a `TypeSyntax`.
209
+ /// - Parameter format: The `Format` to use.
210
+ /// - Parameter leadingTrivia: Replaces the last leading trivia if not nil.
211
+ /// - Returns: A new `Syntax` with the built `TypeSyntax`.
212
+ ///
213
+ /// Satisfies conformance to `SyntaxBuildable`.
214
+ func buildSyntax( format: Format , leadingTrivia: Trivia ? = nil ) -> Syntax {
215
+ return Syntax ( buildType ( format: format, leadingTrivia: leadingTrivia) )
216
+ }
217
+ }
0 commit comments