1414
1515import SwiftSyntax
1616
17- /// `AccessorDeclListSyntax` represents a collection of `AccessorDeclSyntax`
1817extension AccessorDeclListSyntax : ExpressibleByArrayLiteral {
1918 public init ( arrayLiteral elements: Element ... ) {
2019 self . init ( elements)
2120 }
2221}
2322
24- /// `ArrayElementListSyntax` represents a collection of `ArrayElementSyntax`
2523extension ArrayElementListSyntax : ExpressibleByArrayLiteral {
2624 public init ( arrayLiteral elements: Element ... ) {
2725 self . init ( elements)
2826 }
2927}
3028
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- /// ```
4329extension AttributeListSyntax : ExpressibleByArrayLiteral {
4430 public init ( arrayLiteral elements: Element ... ) {
4531 self . init ( elements)
4632 }
4733}
4834
49- /// `AvailabilityArgumentListSyntax` represents a collection of `AvailabilityArgumentSyntax`
5035extension AvailabilityArgumentListSyntax : ExpressibleByArrayLiteral {
5136 public init ( arrayLiteral elements: Element ... ) {
5237 self . init ( elements)
5338 }
5439}
5540
56- /// `CatchClauseListSyntax` represents a collection of `CatchClauseSyntax`
5741extension CatchClauseListSyntax : ExpressibleByArrayLiteral {
5842 public init ( arrayLiteral elements: Element ... ) {
5943 self . init ( elements)
6044 }
6145}
6246
63- /// `CatchItemListSyntax` represents a collection of `CatchItemSyntax`
6447extension CatchItemListSyntax : ExpressibleByArrayLiteral {
6548 public init ( arrayLiteral elements: Element ... ) {
6649 self . init ( elements)
6750 }
6851}
6952
70- /// `ClosureCaptureListSyntax` represents a collection of `ClosureCaptureSyntax`
7153extension ClosureCaptureListSyntax : ExpressibleByArrayLiteral {
7254 public init ( arrayLiteral elements: Element ... ) {
7355 self . init ( elements)
7456 }
7557}
7658
77- /// `ClosureParameterListSyntax` represents a collection of `ClosureParameterSyntax`
7859extension ClosureParameterListSyntax : ExpressibleByArrayLiteral {
7960 public init ( arrayLiteral elements: Element ... ) {
8061 self . init ( elements)
8162 }
8263}
8364
84- /// `ClosureShorthandParameterListSyntax` represents a collection of `ClosureShorthandParameterSyntax`
8565extension ClosureShorthandParameterListSyntax : ExpressibleByArrayLiteral {
8666 public init ( arrayLiteral elements: Element ... ) {
8767 self . init ( elements)
8868 }
8969}
9070
91- /// `CodeBlockItemListSyntax` represents a collection of `CodeBlockItemSyntax`
9271extension CodeBlockItemListSyntax : ExpressibleByArrayLiteral {
9372 public init ( arrayLiteral elements: Element ... ) {
9473 self . init ( elements)
9574 }
9675}
9776
98- /// `CompositionTypeElementListSyntax` represents a collection of `CompositionTypeElementSyntax`
9977extension CompositionTypeElementListSyntax : ExpressibleByArrayLiteral {
10078 public init ( arrayLiteral elements: Element ... ) {
10179 self . init ( elements)
10280 }
10381}
10482
105- /// `ConditionElementListSyntax` represents a collection of `ConditionElementSyntax`
10683extension ConditionElementListSyntax : ExpressibleByArrayLiteral {
10784 public init ( arrayLiteral elements: Element ... ) {
10885 self . init ( elements)
10986 }
11087}
11188
112- /// `DeclModifierListSyntax` represents a collection of `DeclModifierSyntax`
11389extension DeclModifierListSyntax : ExpressibleByArrayLiteral {
11490 public init ( arrayLiteral elements: Element ... ) {
11591 self . init ( elements)
11692 }
11793}
11894
119- /// `DeclNameArgumentListSyntax` represents a collection of `DeclNameArgumentSyntax`
12095extension DeclNameArgumentListSyntax : ExpressibleByArrayLiteral {
12196 public init ( arrayLiteral elements: Element ... ) {
12297 self . init ( elements)
12398 }
12499}
125100
126- /// `DesignatedTypeListSyntax` represents a collection of `DesignatedTypeSyntax`
127101extension DesignatedTypeListSyntax : ExpressibleByArrayLiteral {
128102 public init ( arrayLiteral elements: Element ... ) {
129103 self . init ( elements)
130104 }
131105}
132106
133- /// `DictionaryElementListSyntax` represents a collection of `DictionaryElementSyntax`
134107extension DictionaryElementListSyntax : ExpressibleByArrayLiteral {
135108 public init ( arrayLiteral elements: Element ... ) {
136109 self . init ( elements)
137110 }
138111}
139112
140- /// `DifferentiabilityArgumentListSyntax` represents a collection of `DifferentiabilityArgumentSyntax`
141113extension DifferentiabilityArgumentListSyntax : ExpressibleByArrayLiteral {
142114 public init ( arrayLiteral elements: Element ... ) {
143115 self . init ( elements)
144116 }
145117}
146118
147- /// The arguments of the '@_documentation' attribute
148119extension DocumentationAttributeArgumentListSyntax : ExpressibleByArrayLiteral {
149120 public init ( arrayLiteral elements: Element ... ) {
150121 self . init ( elements)
151122 }
152123}
153124
154- /// The arguments of the '@_effects' attribute. These will be parsed during the SIL stage.
155125extension EffectsAttributeArgumentListSyntax : ExpressibleByArrayLiteral {
156126 public init ( arrayLiteral elements: Element ... ) {
157127 self . init ( elements)
158128 }
159129}
160130
161- /// A collection of 0 or more `EnumCaseElement`s.
162131extension EnumCaseElementListSyntax : ExpressibleByArrayLiteral {
163132 public init ( arrayLiteral elements: Element ... ) {
164133 self . init ( elements)
165134 }
166135}
167136
168- /// `EnumCaseParameterListSyntax` represents a collection of `EnumCaseParameterSyntax`
169137extension EnumCaseParameterListSyntax : ExpressibleByArrayLiteral {
170138 public init ( arrayLiteral elements: Element ... ) {
171139 self . init ( elements)
172140 }
173141}
174142
175- /// A list of expressions connected by operators. This list is contained by a ``SequenceExprSyntax``.
176143extension ExprListSyntax : ExpressibleByArrayLiteral {
177144 public init ( _ elements: [ ExprSyntaxProtocol ] ) {
178145 self = ExprListSyntax ( elements. map {
@@ -185,168 +152,144 @@ extension ExprListSyntax: ExpressibleByArrayLiteral {
185152 }
186153}
187154
188- /// `FunctionParameterListSyntax` represents a collection of `FunctionParameterSyntax`
189155extension FunctionParameterListSyntax : ExpressibleByArrayLiteral {
190156 public init ( arrayLiteral elements: Element ... ) {
191157 self . init ( elements)
192158 }
193159}
194160
195- /// `GenericArgumentListSyntax` represents a collection of `GenericArgumentSyntax`
196161extension GenericArgumentListSyntax : ExpressibleByArrayLiteral {
197162 public init ( arrayLiteral elements: Element ... ) {
198163 self . init ( elements)
199164 }
200165}
201166
202- /// `GenericParameterListSyntax` represents a collection of `GenericParameterSyntax`
203167extension GenericParameterListSyntax : ExpressibleByArrayLiteral {
204168 public init ( arrayLiteral elements: Element ... ) {
205169 self . init ( elements)
206170 }
207171}
208172
209- /// `GenericRequirementListSyntax` represents a collection of `GenericRequirementSyntax`
210173extension GenericRequirementListSyntax : ExpressibleByArrayLiteral {
211174 public init ( arrayLiteral elements: Element ... ) {
212175 self . init ( elements)
213176 }
214177}
215178
216- /// `IfConfigClauseListSyntax` represents a collection of `IfConfigClauseSyntax`
217179extension IfConfigClauseListSyntax : ExpressibleByArrayLiteral {
218180 public init ( arrayLiteral elements: Element ... ) {
219181 self . init ( elements)
220182 }
221183}
222184
223- /// `ImportPathComponentListSyntax` represents a collection of `ImportPathComponentSyntax`
224185extension ImportPathComponentListSyntax : ExpressibleByArrayLiteral {
225186 public init ( arrayLiteral elements: Element ... ) {
226187 self . init ( elements)
227188 }
228189}
229190
230- /// `InheritedTypeListSyntax` represents a collection of `InheritedTypeSyntax`
231191extension InheritedTypeListSyntax : ExpressibleByArrayLiteral {
232192 public init ( arrayLiteral elements: Element ... ) {
233193 self . init ( elements)
234194 }
235195}
236196
237- /// `KeyPathComponentListSyntax` represents a collection of `KeyPathComponentSyntax`
238197extension KeyPathComponentListSyntax : ExpressibleByArrayLiteral {
239198 public init ( arrayLiteral elements: Element ... ) {
240199 self . init ( elements)
241200 }
242201}
243202
244- /// `LabeledExprListSyntax` represents a collection of `LabeledExprSyntax`
245203extension LabeledExprListSyntax : ExpressibleByArrayLiteral {
246204 public init ( arrayLiteral elements: Element ... ) {
247205 self . init ( elements)
248206 }
249207}
250208
251- /// `MemberBlockItemListSyntax` represents a collection of `MemberBlockItemSyntax`
252209extension MemberBlockItemListSyntax : ExpressibleByArrayLiteral {
253210 public init ( arrayLiteral elements: Element ... ) {
254211 self . init ( elements)
255212 }
256213}
257214
258- /// `MultipleTrailingClosureElementListSyntax` represents a collection of `MultipleTrailingClosureElementSyntax`
259215extension MultipleTrailingClosureElementListSyntax : ExpressibleByArrayLiteral {
260216 public init ( arrayLiteral elements: Element ... ) {
261217 self . init ( elements)
262218 }
263219}
264220
265- /// `ObjCSelectorPieceListSyntax` represents a collection of `ObjCSelectorPieceSyntax`
266221extension ObjCSelectorPieceListSyntax : ExpressibleByArrayLiteral {
267222 public init ( arrayLiteral elements: Element ... ) {
268223 self . init ( elements)
269224 }
270225}
271226
272- /// `PatternBindingListSyntax` represents a collection of `PatternBindingSyntax`
273227extension PatternBindingListSyntax : ExpressibleByArrayLiteral {
274228 public init ( arrayLiteral elements: Element ... ) {
275229 self . init ( elements)
276230 }
277231}
278232
279- /// `PlatformVersionItemListSyntax` represents a collection of `PlatformVersionItemSyntax`
280233extension PlatformVersionItemListSyntax : ExpressibleByArrayLiteral {
281234 public init ( arrayLiteral elements: Element ... ) {
282235 self . init ( elements)
283236 }
284237}
285238
286- /// `PrecedenceGroupAttributeListSyntax` represents a collection of `Syntax`
287239extension PrecedenceGroupAttributeListSyntax : ExpressibleByArrayLiteral {
288240 public init ( arrayLiteral elements: Element ... ) {
289241 self . init ( elements)
290242 }
291243}
292244
293- /// `PrecedenceGroupNameListSyntax` represents a collection of `PrecedenceGroupNameSyntax`
294245extension PrecedenceGroupNameListSyntax : ExpressibleByArrayLiteral {
295246 public init ( arrayLiteral elements: Element ... ) {
296247 self . init ( elements)
297248 }
298249}
299250
300- /// `PrimaryAssociatedTypeListSyntax` represents a collection of `PrimaryAssociatedTypeSyntax`
301251extension PrimaryAssociatedTypeListSyntax : ExpressibleByArrayLiteral {
302252 public init ( arrayLiteral elements: Element ... ) {
303253 self . init ( elements)
304254 }
305255}
306256
307- /// A collection of arguments for the `@_specialize` attribute
308257extension SpecializeAttributeArgumentListSyntax : ExpressibleByArrayLiteral {
309258 public init ( arrayLiteral elements: Element ... ) {
310259 self . init ( elements)
311260 }
312261}
313262
314- /// `StringLiteralSegmentListSyntax` represents a collection of `Syntax`
315263extension StringLiteralSegmentListSyntax : ExpressibleByArrayLiteral {
316264 public init ( arrayLiteral elements: Element ... ) {
317265 self . init ( elements)
318266 }
319267}
320268
321- /// `SwitchCaseItemListSyntax` represents a collection of `SwitchCaseItemSyntax`
322269extension SwitchCaseItemListSyntax : ExpressibleByArrayLiteral {
323270 public init ( arrayLiteral elements: Element ... ) {
324271 self . init ( elements)
325272 }
326273}
327274
328- /// `SwitchCaseListSyntax` represents a collection of `Syntax`
329275extension SwitchCaseListSyntax : ExpressibleByArrayLiteral {
330276 public init ( arrayLiteral elements: Element ... ) {
331277 self . init ( elements)
332278 }
333279}
334280
335- /// `TuplePatternElementListSyntax` represents a collection of `TuplePatternElementSyntax`
336281extension TuplePatternElementListSyntax : ExpressibleByArrayLiteral {
337282 public init ( arrayLiteral elements: Element ... ) {
338283 self . init ( elements)
339284 }
340285}
341286
342- /// `TupleTypeElementListSyntax` represents a collection of `TupleTypeElementSyntax`
343287extension TupleTypeElementListSyntax : ExpressibleByArrayLiteral {
344288 public init ( arrayLiteral elements: Element ... ) {
345289 self . init ( elements)
346290 }
347291}
348292
349- /// A collection of syntax nodes that occurred in the source code but could not be used to form a valid syntax tree.
350293extension UnexpectedNodesSyntax : ExpressibleByArrayLiteral {
351294 public init ( _ elements: [ SyntaxProtocol ] ) {
352295 self = UnexpectedNodesSyntax ( elements. map {
@@ -359,14 +302,12 @@ extension UnexpectedNodesSyntax: ExpressibleByArrayLiteral {
359302 }
360303}
361304
362- /// `VersionComponentListSyntax` represents a collection of `VersionComponentSyntax`
363305extension VersionComponentListSyntax : ExpressibleByArrayLiteral {
364306 public init ( arrayLiteral elements: Element ... ) {
365307 self . init ( elements)
366308 }
367309}
368310
369- /// `YieldedExpressionListSyntax` represents a collection of `YieldedExpressionSyntax`
370311extension YieldedExpressionListSyntax : ExpressibleByArrayLiteral {
371312 public init ( arrayLiteral elements: Element ... ) {
372313 self . init ( elements)
0 commit comments