14
14
15
15
import SwiftSyntax
16
16
17
- /// `AccessorDeclListSyntax` represents a collection of `AccessorDeclSyntax`
18
17
extension AccessorDeclListSyntax : ExpressibleByArrayLiteral {
19
18
public init ( arrayLiteral elements: Element ... ) {
20
19
self . init ( elements)
21
20
}
22
21
}
23
22
24
- /// `ArrayElementListSyntax` represents a collection of `ArrayElementSyntax`
25
23
extension ArrayElementListSyntax : ExpressibleByArrayLiteral {
26
24
public init ( arrayLiteral elements: Element ... ) {
27
25
self . init ( elements)
28
26
}
29
27
}
30
28
31
- /// A list of attributes that can be attached to a declaration.
32
- ///
33
- /// An element in this collection can either be an attribute itself or an ``IfConfigDeclSyntax``
34
- /// that contains attributes. This is because attributes can be added conditional on compilcation
35
- /// conditions, for example.
36
- ///
37
- /// ```swift
38
- /// #if !DISABLE_DEPRECATIONS
39
- /// @available(*, deprecated)
40
- /// #endif
41
- /// func myFunction() {}
42
- /// ```
43
29
extension AttributeListSyntax : ExpressibleByArrayLiteral {
44
30
public init ( arrayLiteral elements: Element ... ) {
45
31
self . init ( elements)
46
32
}
47
33
}
48
34
49
- /// `AvailabilityArgumentListSyntax` represents a collection of `AvailabilityArgumentSyntax`
50
35
extension AvailabilityArgumentListSyntax : ExpressibleByArrayLiteral {
51
36
public init ( arrayLiteral elements: Element ... ) {
52
37
self . init ( elements)
53
38
}
54
39
}
55
40
56
- /// `CatchClauseListSyntax` represents a collection of `CatchClauseSyntax`
57
41
extension CatchClauseListSyntax : ExpressibleByArrayLiteral {
58
42
public init ( arrayLiteral elements: Element ... ) {
59
43
self . init ( elements)
60
44
}
61
45
}
62
46
63
- /// `CatchItemListSyntax` represents a collection of `CatchItemSyntax`
64
47
extension CatchItemListSyntax : ExpressibleByArrayLiteral {
65
48
public init ( arrayLiteral elements: Element ... ) {
66
49
self . init ( elements)
67
50
}
68
51
}
69
52
70
- /// `ClosureCaptureListSyntax` represents a collection of `ClosureCaptureSyntax`
71
53
extension ClosureCaptureListSyntax : ExpressibleByArrayLiteral {
72
54
public init ( arrayLiteral elements: Element ... ) {
73
55
self . init ( elements)
74
56
}
75
57
}
76
58
77
- /// `ClosureParameterListSyntax` represents a collection of `ClosureParameterSyntax`
78
59
extension ClosureParameterListSyntax : ExpressibleByArrayLiteral {
79
60
public init ( arrayLiteral elements: Element ... ) {
80
61
self . init ( elements)
81
62
}
82
63
}
83
64
84
- /// `ClosureShorthandParameterListSyntax` represents a collection of `ClosureShorthandParameterSyntax`
85
65
extension ClosureShorthandParameterListSyntax : ExpressibleByArrayLiteral {
86
66
public init ( arrayLiteral elements: Element ... ) {
87
67
self . init ( elements)
88
68
}
89
69
}
90
70
91
- /// `CodeBlockItemListSyntax` represents a collection of `CodeBlockItemSyntax`
92
71
extension CodeBlockItemListSyntax : ExpressibleByArrayLiteral {
93
72
public init ( arrayLiteral elements: Element ... ) {
94
73
self . init ( elements)
95
74
}
96
75
}
97
76
98
- /// `CompositionTypeElementListSyntax` represents a collection of `CompositionTypeElementSyntax`
99
77
extension CompositionTypeElementListSyntax : ExpressibleByArrayLiteral {
100
78
public init ( arrayLiteral elements: Element ... ) {
101
79
self . init ( elements)
102
80
}
103
81
}
104
82
105
- /// `ConditionElementListSyntax` represents a collection of `ConditionElementSyntax`
106
83
extension ConditionElementListSyntax : ExpressibleByArrayLiteral {
107
84
public init ( arrayLiteral elements: Element ... ) {
108
85
self . init ( elements)
109
86
}
110
87
}
111
88
112
- /// `DeclModifierListSyntax` represents a collection of `DeclModifierSyntax`
113
89
extension DeclModifierListSyntax : ExpressibleByArrayLiteral {
114
90
public init ( arrayLiteral elements: Element ... ) {
115
91
self . init ( elements)
116
92
}
117
93
}
118
94
119
- /// `DeclNameArgumentListSyntax` represents a collection of `DeclNameArgumentSyntax`
120
95
extension DeclNameArgumentListSyntax : ExpressibleByArrayLiteral {
121
96
public init ( arrayLiteral elements: Element ... ) {
122
97
self . init ( elements)
123
98
}
124
99
}
125
100
126
- /// `DesignatedTypeListSyntax` represents a collection of `DesignatedTypeSyntax`
127
101
extension DesignatedTypeListSyntax : ExpressibleByArrayLiteral {
128
102
public init ( arrayLiteral elements: Element ... ) {
129
103
self . init ( elements)
130
104
}
131
105
}
132
106
133
- /// `DictionaryElementListSyntax` represents a collection of `DictionaryElementSyntax`
134
107
extension DictionaryElementListSyntax : ExpressibleByArrayLiteral {
135
108
public init ( arrayLiteral elements: Element ... ) {
136
109
self . init ( elements)
137
110
}
138
111
}
139
112
140
- /// `DifferentiabilityArgumentListSyntax` represents a collection of `DifferentiabilityArgumentSyntax`
141
113
extension DifferentiabilityArgumentListSyntax : ExpressibleByArrayLiteral {
142
114
public init ( arrayLiteral elements: Element ... ) {
143
115
self . init ( elements)
144
116
}
145
117
}
146
118
147
- /// The arguments of the '@_documentation' attribute
148
119
extension DocumentationAttributeArgumentListSyntax : ExpressibleByArrayLiteral {
149
120
public init ( arrayLiteral elements: Element ... ) {
150
121
self . init ( elements)
151
122
}
152
123
}
153
124
154
- /// The arguments of the '@_effects' attribute. These will be parsed during the SIL stage.
155
125
extension EffectsAttributeArgumentListSyntax : ExpressibleByArrayLiteral {
156
126
public init ( arrayLiteral elements: Element ... ) {
157
127
self . init ( elements)
158
128
}
159
129
}
160
130
161
- /// A collection of 0 or more `EnumCaseElement`s.
162
131
extension EnumCaseElementListSyntax : ExpressibleByArrayLiteral {
163
132
public init ( arrayLiteral elements: Element ... ) {
164
133
self . init ( elements)
165
134
}
166
135
}
167
136
168
- /// `EnumCaseParameterListSyntax` represents a collection of `EnumCaseParameterSyntax`
169
137
extension EnumCaseParameterListSyntax : ExpressibleByArrayLiteral {
170
138
public init ( arrayLiteral elements: Element ... ) {
171
139
self . init ( elements)
172
140
}
173
141
}
174
142
175
- /// A list of expressions connected by operators. This list is contained by a ``SequenceExprSyntax``.
176
143
extension ExprListSyntax : ExpressibleByArrayLiteral {
177
144
public init ( _ elements: [ ExprSyntaxProtocol ] ) {
178
145
self = ExprListSyntax ( elements. map {
@@ -185,168 +152,144 @@ extension ExprListSyntax: ExpressibleByArrayLiteral {
185
152
}
186
153
}
187
154
188
- /// `FunctionParameterListSyntax` represents a collection of `FunctionParameterSyntax`
189
155
extension FunctionParameterListSyntax : ExpressibleByArrayLiteral {
190
156
public init ( arrayLiteral elements: Element ... ) {
191
157
self . init ( elements)
192
158
}
193
159
}
194
160
195
- /// `GenericArgumentListSyntax` represents a collection of `GenericArgumentSyntax`
196
161
extension GenericArgumentListSyntax : ExpressibleByArrayLiteral {
197
162
public init ( arrayLiteral elements: Element ... ) {
198
163
self . init ( elements)
199
164
}
200
165
}
201
166
202
- /// `GenericParameterListSyntax` represents a collection of `GenericParameterSyntax`
203
167
extension GenericParameterListSyntax : ExpressibleByArrayLiteral {
204
168
public init ( arrayLiteral elements: Element ... ) {
205
169
self . init ( elements)
206
170
}
207
171
}
208
172
209
- /// `GenericRequirementListSyntax` represents a collection of `GenericRequirementSyntax`
210
173
extension GenericRequirementListSyntax : ExpressibleByArrayLiteral {
211
174
public init ( arrayLiteral elements: Element ... ) {
212
175
self . init ( elements)
213
176
}
214
177
}
215
178
216
- /// `IfConfigClauseListSyntax` represents a collection of `IfConfigClauseSyntax`
217
179
extension IfConfigClauseListSyntax : ExpressibleByArrayLiteral {
218
180
public init ( arrayLiteral elements: Element ... ) {
219
181
self . init ( elements)
220
182
}
221
183
}
222
184
223
- /// `ImportPathComponentListSyntax` represents a collection of `ImportPathComponentSyntax`
224
185
extension ImportPathComponentListSyntax : ExpressibleByArrayLiteral {
225
186
public init ( arrayLiteral elements: Element ... ) {
226
187
self . init ( elements)
227
188
}
228
189
}
229
190
230
- /// `InheritedTypeListSyntax` represents a collection of `InheritedTypeSyntax`
231
191
extension InheritedTypeListSyntax : ExpressibleByArrayLiteral {
232
192
public init ( arrayLiteral elements: Element ... ) {
233
193
self . init ( elements)
234
194
}
235
195
}
236
196
237
- /// `KeyPathComponentListSyntax` represents a collection of `KeyPathComponentSyntax`
238
197
extension KeyPathComponentListSyntax : ExpressibleByArrayLiteral {
239
198
public init ( arrayLiteral elements: Element ... ) {
240
199
self . init ( elements)
241
200
}
242
201
}
243
202
244
- /// `LabeledExprListSyntax` represents a collection of `LabeledExprSyntax`
245
203
extension LabeledExprListSyntax : ExpressibleByArrayLiteral {
246
204
public init ( arrayLiteral elements: Element ... ) {
247
205
self . init ( elements)
248
206
}
249
207
}
250
208
251
- /// `MemberBlockItemListSyntax` represents a collection of `MemberBlockItemSyntax`
252
209
extension MemberBlockItemListSyntax : ExpressibleByArrayLiteral {
253
210
public init ( arrayLiteral elements: Element ... ) {
254
211
self . init ( elements)
255
212
}
256
213
}
257
214
258
- /// `MultipleTrailingClosureElementListSyntax` represents a collection of `MultipleTrailingClosureElementSyntax`
259
215
extension MultipleTrailingClosureElementListSyntax : ExpressibleByArrayLiteral {
260
216
public init ( arrayLiteral elements: Element ... ) {
261
217
self . init ( elements)
262
218
}
263
219
}
264
220
265
- /// `ObjCSelectorPieceListSyntax` represents a collection of `ObjCSelectorPieceSyntax`
266
221
extension ObjCSelectorPieceListSyntax : ExpressibleByArrayLiteral {
267
222
public init ( arrayLiteral elements: Element ... ) {
268
223
self . init ( elements)
269
224
}
270
225
}
271
226
272
- /// `PatternBindingListSyntax` represents a collection of `PatternBindingSyntax`
273
227
extension PatternBindingListSyntax : ExpressibleByArrayLiteral {
274
228
public init ( arrayLiteral elements: Element ... ) {
275
229
self . init ( elements)
276
230
}
277
231
}
278
232
279
- /// `PlatformVersionItemListSyntax` represents a collection of `PlatformVersionItemSyntax`
280
233
extension PlatformVersionItemListSyntax : ExpressibleByArrayLiteral {
281
234
public init ( arrayLiteral elements: Element ... ) {
282
235
self . init ( elements)
283
236
}
284
237
}
285
238
286
- /// `PrecedenceGroupAttributeListSyntax` represents a collection of `Syntax`
287
239
extension PrecedenceGroupAttributeListSyntax : ExpressibleByArrayLiteral {
288
240
public init ( arrayLiteral elements: Element ... ) {
289
241
self . init ( elements)
290
242
}
291
243
}
292
244
293
- /// `PrecedenceGroupNameListSyntax` represents a collection of `PrecedenceGroupNameSyntax`
294
245
extension PrecedenceGroupNameListSyntax : ExpressibleByArrayLiteral {
295
246
public init ( arrayLiteral elements: Element ... ) {
296
247
self . init ( elements)
297
248
}
298
249
}
299
250
300
- /// `PrimaryAssociatedTypeListSyntax` represents a collection of `PrimaryAssociatedTypeSyntax`
301
251
extension PrimaryAssociatedTypeListSyntax : ExpressibleByArrayLiteral {
302
252
public init ( arrayLiteral elements: Element ... ) {
303
253
self . init ( elements)
304
254
}
305
255
}
306
256
307
- /// A collection of arguments for the `@_specialize` attribute
308
257
extension SpecializeAttributeArgumentListSyntax : ExpressibleByArrayLiteral {
309
258
public init ( arrayLiteral elements: Element ... ) {
310
259
self . init ( elements)
311
260
}
312
261
}
313
262
314
- /// `StringLiteralSegmentListSyntax` represents a collection of `Syntax`
315
263
extension StringLiteralSegmentListSyntax : ExpressibleByArrayLiteral {
316
264
public init ( arrayLiteral elements: Element ... ) {
317
265
self . init ( elements)
318
266
}
319
267
}
320
268
321
- /// `SwitchCaseItemListSyntax` represents a collection of `SwitchCaseItemSyntax`
322
269
extension SwitchCaseItemListSyntax : ExpressibleByArrayLiteral {
323
270
public init ( arrayLiteral elements: Element ... ) {
324
271
self . init ( elements)
325
272
}
326
273
}
327
274
328
- /// `SwitchCaseListSyntax` represents a collection of `Syntax`
329
275
extension SwitchCaseListSyntax : ExpressibleByArrayLiteral {
330
276
public init ( arrayLiteral elements: Element ... ) {
331
277
self . init ( elements)
332
278
}
333
279
}
334
280
335
- /// `TuplePatternElementListSyntax` represents a collection of `TuplePatternElementSyntax`
336
281
extension TuplePatternElementListSyntax : ExpressibleByArrayLiteral {
337
282
public init ( arrayLiteral elements: Element ... ) {
338
283
self . init ( elements)
339
284
}
340
285
}
341
286
342
- /// `TupleTypeElementListSyntax` represents a collection of `TupleTypeElementSyntax`
343
287
extension TupleTypeElementListSyntax : ExpressibleByArrayLiteral {
344
288
public init ( arrayLiteral elements: Element ... ) {
345
289
self . init ( elements)
346
290
}
347
291
}
348
292
349
- /// A collection of syntax nodes that occurred in the source code but could not be used to form a valid syntax tree.
350
293
extension UnexpectedNodesSyntax : ExpressibleByArrayLiteral {
351
294
public init ( _ elements: [ SyntaxProtocol ] ) {
352
295
self = UnexpectedNodesSyntax ( elements. map {
@@ -359,14 +302,12 @@ extension UnexpectedNodesSyntax: ExpressibleByArrayLiteral {
359
302
}
360
303
}
361
304
362
- /// `VersionComponentListSyntax` represents a collection of `VersionComponentSyntax`
363
305
extension VersionComponentListSyntax : ExpressibleByArrayLiteral {
364
306
public init ( arrayLiteral elements: Element ... ) {
365
307
self . init ( elements)
366
308
}
367
309
}
368
310
369
- /// `YieldedExpressionListSyntax` represents a collection of `YieldedExpressionSyntax`
370
311
extension YieldedExpressionListSyntax : ExpressibleByArrayLiteral {
371
312
public init ( arrayLiteral elements: Element ... ) {
372
313
self . init ( elements)
0 commit comments