11
11
//===----------------------------------------------------------------------===//
12
12
13
13
public let ATTRIBUTE_NODES : [ Node ] = [
14
- // attribute-list -> attribute attribute-list?
15
14
Node (
16
15
kind: . attributeList,
17
16
base: . syntaxCollection,
@@ -33,16 +32,6 @@ public let ATTRIBUTE_NODES: [Node] = [
33
32
elementChoices: [ . attribute, . ifConfigDecl]
34
33
) ,
35
34
36
- // attribute -> '@' identifier '('?
37
- // ( identifier
38
- // | string-literal
39
- // | integer-literal
40
- // | availability-spec-list
41
- // | specialize-attr-spec-list
42
- // | implements-attr-arguments
43
- // | named-attribute-string-argument
44
- // | back-deploy-attr-spec-list
45
- // )? ')'?
46
35
Node (
47
36
kind: . attribute,
48
37
base: . syntax,
@@ -200,7 +189,6 @@ public let ATTRIBUTE_NODES: [Node] = [
200
189
]
201
190
) ,
202
191
203
- // back-deploy-version-entry -> availability-version-restriction ','?
204
192
Node (
205
193
kind: . platformVersionItem,
206
194
base: . syntax,
@@ -222,17 +210,13 @@ public let ATTRIBUTE_NODES: [Node] = [
222
210
]
223
211
) ,
224
212
225
- // back-deploy-version-list ->
226
- // back-deploy-version-entry back-deploy-version-list?
227
213
Node (
228
214
kind: . platformVersionItemList,
229
215
base: . syntaxCollection,
230
216
nameForDiagnostics: " version list " ,
231
217
elementChoices: [ . platformVersionItem]
232
218
) ,
233
219
234
- // The arguments of '@backDeployed(...)'
235
- // back-deployed-attr-spec-list -> 'before' ':' back-deployed-version-list
236
220
Node (
237
221
kind: . backDeployedAttributeArguments,
238
222
base: . syntax,
@@ -258,7 +242,6 @@ public let ATTRIBUTE_NODES: [Node] = [
258
242
]
259
243
) ,
260
244
261
- // convention-attribute-arguments -> token ',' 'cType'? ':' string-literal
262
245
Node (
263
246
kind: . conventionAttributeArguments,
264
247
base: . syntax,
@@ -293,7 +276,6 @@ public let ATTRIBUTE_NODES: [Node] = [
293
276
]
294
277
) ,
295
278
296
- // convention-attribute-arguments -> 'witness_method' ':' identifier
297
279
Node (
298
280
kind: . conventionWitnessMethodAttributeArguments,
299
281
base: . syntax,
@@ -315,12 +297,6 @@ public let ATTRIBUTE_NODES: [Node] = [
315
297
]
316
298
) ,
317
299
318
- // The argument of the derivative registration attribute
319
- // '@derivative(of: ...)' and the transpose registration attribute
320
- // '@transpose(of: ...)'.
321
- //
322
- // derivative-registration-attr-arguments ->
323
- // 'of' ':' func-decl-name ','? differentiability-params-clause?
324
300
Node (
325
301
kind: . derivativeAttributeArguments,
326
302
base: . syntax,
@@ -370,16 +346,13 @@ public let ATTRIBUTE_NODES: [Node] = [
370
346
]
371
347
) ,
372
348
373
- // differentiability-param-list ->
374
- // differentiability-param differentiability-param-list?
375
349
Node (
376
350
kind: . differentiabilityArgumentList,
377
351
base: . syntaxCollection,
378
352
nameForDiagnostics: " differentiability parameters " ,
379
353
elementChoices: [ . differentiabilityArgument]
380
354
) ,
381
355
382
- // differentiability-param -> ('self' | identifier | integer-literal) ','?
383
356
Node (
384
357
kind: . differentiabilityArgument,
385
358
base: . syntax,
@@ -402,8 +375,6 @@ public let ATTRIBUTE_NODES: [Node] = [
402
375
]
403
376
) ,
404
377
405
- // differentiability-params-clause ->
406
- // 'wrt' ':' (differentiability-param | differentiability-params)
407
378
Node (
408
379
kind: . differentiabilityWithRespectToArgument,
409
380
base: . syntax,
@@ -440,7 +411,6 @@ public let ATTRIBUTE_NODES: [Node] = [
440
411
]
441
412
) ,
442
413
443
- // differentiability-params -> '(' differentiability-param-list ')'
444
414
Node (
445
415
kind: . differentiabilityArguments,
446
416
base: . syntax,
@@ -464,10 +434,6 @@ public let ATTRIBUTE_NODES: [Node] = [
464
434
]
465
435
) ,
466
436
467
- // The argument of '@differentiable(...)'.
468
- // differentiable-attr-arguments ->
469
- // differentiability-kind? '.'? differentiability-params-clause? ','?
470
- // generic-where-clause?
471
437
Node (
472
438
kind: . differentiableAttributeArguments,
473
439
base: . syntax,
@@ -541,7 +507,7 @@ public let ATTRIBUTE_NODES: [Node] = [
541
507
. keyword( . public) ,
542
508
. keyword( . open) ,
543
509
] )
544
- ) , // Keywords can be: public, internal, private, fileprivate, open
510
+ ) ,
545
511
Child (
546
512
name: " string " ,
547
513
kind: . node( kind: . stringLiteralExpr)
@@ -618,9 +584,6 @@ public let ATTRIBUTE_NODES: [Node] = [
618
584
]
619
585
) ,
620
586
621
- // The argument of '@_implements(...)'
622
- // implements-attr-arguments -> simple-type-identifier ','
623
- // (identifier | operator) decl-name-arguments
624
587
Node (
625
588
kind: . implementsAttributeArguments,
626
589
base: . syntax,
@@ -648,8 +611,6 @@ public let ATTRIBUTE_NODES: [Node] = [
648
611
]
649
612
) ,
650
613
651
- // Representation of e.g. 'exported: true,'
652
- // labeled-specialize-entry -> identifier ':' token ','?
653
614
Node (
654
615
kind: . labeledSpecializeArgument,
655
616
base: . syntax,
@@ -693,7 +654,6 @@ public let ATTRIBUTE_NODES: [Node] = [
693
654
]
694
655
) ,
695
656
696
- // objc-selector-piece -> identifier? ':'?
697
657
Node (
698
658
kind: . objCSelectorPiece,
699
659
base: . syntax,
@@ -715,15 +675,13 @@ public let ATTRIBUTE_NODES: [Node] = [
715
675
]
716
676
) ,
717
677
718
- // objc-selector -> objc-selector-piece objc-selector?
719
678
Node (
720
679
kind: . objCSelectorPieceList,
721
680
base: . syntaxCollection,
722
681
nameForDiagnostics: " Objective-C selector " ,
723
682
elementChoices: [ . objCSelectorPiece]
724
683
) ,
725
684
726
- // opaque-return-type-of-arguments -> string-literal ',' integer-literal
727
685
Node (
728
686
kind: . opaqueReturnTypeOfAttributeArguments,
729
687
base: . syntax,
@@ -776,11 +734,6 @@ public let ATTRIBUTE_NODES: [Node] = [
776
734
]
777
735
) ,
778
736
779
- // The argument of '@_specialize(...)'
780
- // specialize-attr-spec-list -> labeled-specialize-entry
781
- // specialize-spec-attr-list?
782
- // | generic-where-clause
783
- // specialize-spec-attr-list?
784
737
Node (
785
738
kind: . specializeAttributeArgumentList,
786
739
base: . syntaxCollection,
@@ -789,8 +742,6 @@ public let ATTRIBUTE_NODES: [Node] = [
789
742
elementChoices: [ . labeledSpecializeArgument, . specializeAvailabilityArgument, . specializeTargetFunctionArgument, . genericWhereClause]
790
743
) ,
791
744
792
- // Representation of e.g. 'exported: true,'
793
- // labeled-specialize-entry -> identifier ':' token ','?
794
745
Node (
795
746
kind: . specializeTargetFunctionArgument,
796
747
base: . syntax,
0 commit comments