@@ -61,86 +61,67 @@ public let ATTRIBUTE_NODES: [Node] = [
61
61
kind: . nodeChoices( choices: [
62
62
Child (
63
63
name: " argumentList " ,
64
+ // Regular function-like attribute arguments.
64
65
kind: . node( kind: . labeledExprList)
65
66
) ,
66
- Child (
67
- name: " token " ,
68
- kind: . node( kind: . token)
69
- ) ,
70
- Child (
71
- name: " string " ,
72
- kind: . node( kind: . stringLiteralExpr)
73
- ) ,
74
67
Child (
75
68
name: " availability " ,
69
+ // Special arguments for platform versions.
76
70
kind: . node( kind: . availabilityArgumentList)
77
71
) ,
78
72
Child (
79
73
name: " specializeArguments " ,
74
+ // Special arguments for keyword decl name e.g. 'subscript(_:)', and availability arguments.
80
75
kind: . node( kind: . specializeAttributeArgumentList)
81
76
) ,
82
77
Child (
83
78
name: " objCName " ,
79
+ // Special arguments for Objective-C names. e.g. 'methodNameWithArg1:Arg2:'
84
80
kind: . node( kind: . objCSelectorPieceList)
85
81
) ,
86
82
Child (
87
83
name: " implementsArguments " ,
84
+ // Special arguments for keyword decl name e.g. 'subscript(_:)'.
88
85
kind: . node( kind: . implementsAttributeArguments)
89
86
) ,
90
87
Child (
91
88
name: " differentiableArguments " ,
89
+ // Special arguments for 'where' clause.
92
90
kind: . node( kind: . differentiableAttributeArguments)
93
91
) ,
94
92
Child (
95
93
name: " derivativeRegistrationArguments " ,
94
+ // Special arguments for 'where' clause.
96
95
kind: . node( kind: . derivativeAttributeArguments)
97
96
) ,
98
97
Child (
99
98
name: " backDeployedArguments " ,
99
+ // Special arguments for platform versions.
100
100
kind: . node( kind: . backDeployedAttributeArguments)
101
101
) ,
102
- Child (
103
- name: " conventionArguments " ,
104
- kind: . node( kind: . conventionAttributeArguments)
105
- ) ,
106
- Child (
107
- name: " conventionWitnessMethodArguments " ,
108
- kind: . node( kind: . conventionWitnessMethodAttributeArguments)
109
- ) ,
110
- Child (
111
- name: " opaqueReturnTypeOfAttributeArguments " ,
112
- kind: . node( kind: . opaqueReturnTypeOfAttributeArguments)
113
- ) ,
114
- Child (
115
- name: " exposeAttributeArguments " ,
116
- kind: . node( kind: . exposeAttributeArguments)
117
- ) ,
118
102
Child (
119
103
name: " originallyDefinedInArguments " ,
104
+ // Special arguments for platform versions.
120
105
kind: . node( kind: . originallyDefinedInAttributeArguments)
121
106
) ,
122
- Child (
123
- name: " underscorePrivateAttributeArguments " ,
124
- kind: . node( kind: . underscorePrivateAttributeArguments)
125
- ) ,
126
107
Child (
127
108
name: " dynamicReplacementArguments " ,
109
+ // Special arguments for keyword decl name e.g. 'subscript(_:)'.
128
110
kind: . node( kind: . dynamicReplacementAttributeArguments)
129
111
) ,
130
- Child (
131
- name: " unavailableFromAsyncArguments " ,
132
- kind: . node( kind: . unavailableFromAsyncAttributeArguments)
133
- ) ,
134
112
Child (
135
113
name: " effectsArguments " ,
114
+ // Special arguments for arbitrary token list, processed in SIL.
136
115
kind: . node( kind: . effectsAttributeArgumentList)
137
116
) ,
138
117
Child (
139
118
name: " documentationArguments " ,
119
+ // Special arguments for access-level keywords. E.g. 'private'.
140
120
kind: . node( kind: . documentationAttributeArgumentList)
141
121
) ,
142
122
Child (
143
123
name: " abiArguments " ,
124
+ // Special arguments for declaration syntax. e.g. @abi(func abiName() -> Int)
144
125
kind: . node( kind: . abiAttributeArguments) ,
145
126
experimentalFeature: . abiAttribute
146
127
) ,
@@ -296,65 +277,6 @@ public let ATTRIBUTE_NODES: [Node] = [
296
277
]
297
278
) ,
298
279
299
- Node (
300
- kind: . conventionAttributeArguments,
301
- base: . syntax,
302
- nameForDiagnostics: " @convention(...) arguments " ,
303
- documentation: " The arguments for the '@convention(...)'. " ,
304
- children: [
305
- Child (
306
- name: " conventionLabel " ,
307
- kind: . token( choices: [ . token( . identifier) ] ) ,
308
- documentation: " The convention label. "
309
- ) ,
310
- Child (
311
- name: " comma " ,
312
- kind: . token( choices: [ . token( . comma) ] ) ,
313
- isOptional: true
314
- ) ,
315
- Child (
316
- name: " cTypeLabel " ,
317
- kind: . token( choices: [ . keyword( . cType) ] ) ,
318
- isOptional: true
319
- ) ,
320
- Child (
321
- name: " colon " ,
322
- kind: . token( choices: [ . token( . colon) ] ) ,
323
- isOptional: true
324
- ) ,
325
- Child (
326
- name: " cTypeString " ,
327
- kind: . node( kind: . stringLiteralExpr) ,
328
- isOptional: true
329
- ) ,
330
- ]
331
- ) ,
332
-
333
- Node (
334
- kind: . conventionWitnessMethodAttributeArguments,
335
- base: . syntax,
336
- nameForDiagnostics: " @convention(...) arguments for witness methods " ,
337
- documentation: " The arguments for the '@convention(witness_method: ...)'. " ,
338
- children: [
339
- Child (
340
- name: " witnessMethodLabel " ,
341
- kind: . token( choices: [ . keyword( . witness_method) ] ) ,
342
- documentation: #"The `witnessMethod` label."#
343
- ) ,
344
- Child (
345
- name: " colon " ,
346
- kind: . token( choices: [ . token( . colon) ] ) ,
347
- documentation: #"The colon separating the `witnessMethod` label and the original protocol name."#
348
-
349
- ) ,
350
- Child (
351
- name: " protocolName " ,
352
- kind: . token( choices: [ . token( . identifier) ] ) ,
353
- documentation: " The original protocol name. "
354
- ) ,
355
- ]
356
- ) ,
357
-
358
280
Node (
359
281
kind: . derivativeAttributeArguments,
360
282
base: . syntax,
@@ -653,29 +575,6 @@ public let ATTRIBUTE_NODES: [Node] = [
653
575
elementChoices: [ . token]
654
576
) ,
655
577
656
- Node (
657
- kind: . exposeAttributeArguments,
658
- base: . syntax,
659
- nameForDiagnostics: " @_expose arguments " ,
660
- documentation: " The arguments for the '@_expose' attribute " ,
661
- children: [
662
- Child (
663
- name: " language " ,
664
- kind: . node( kind: . token)
665
- ) ,
666
- Child (
667
- name: " comma " ,
668
- kind: . token( choices: [ . token( . comma) ] ) ,
669
- isOptional: true
670
- ) ,
671
- Child (
672
- name: " cxxName " ,
673
- kind: . node( kind: . stringLiteralExpr) ,
674
- isOptional: true
675
- ) ,
676
- ]
677
- ) ,
678
-
679
578
Node (
680
579
kind: . implementsAttributeArguments,
681
580
base: . syntax,
@@ -780,29 +679,6 @@ public let ATTRIBUTE_NODES: [Node] = [
780
679
elementChoices: [ . objCSelectorPiece]
781
680
) ,
782
681
783
- Node (
784
- kind: . opaqueReturnTypeOfAttributeArguments,
785
- base: . syntax,
786
- nameForDiagnostics: " opaque return type arguments " ,
787
- documentation: " The arguments for the '@_opaqueReturnTypeOf()'. " ,
788
- children: [
789
- Child (
790
- name: " mangledName " ,
791
- kind: . node( kind: . stringLiteralExpr) ,
792
- documentation: " The mangled name of a declaration. "
793
- ) ,
794
- Child (
795
- name: " comma " ,
796
- kind: . token( choices: [ . token( . comma) ] )
797
- ) ,
798
- Child (
799
- name: " ordinal " ,
800
- kind: . token( choices: [ . token( . integerLiteral) ] ) ,
801
- documentation: " The ordinal corresponding to the 'some' keyword that introduced this opaque type. "
802
- ) ,
803
- ]
804
- ) ,
805
-
806
682
Node (
807
683
kind: . originallyDefinedInAttributeArguments,
808
684
base: . syntax,
@@ -884,47 +760,4 @@ public let ATTRIBUTE_NODES: [Node] = [
884
760
]
885
761
]
886
762
) ,
887
-
888
- Node (
889
- kind: . unavailableFromAsyncAttributeArguments,
890
- base: . syntax,
891
- nameForDiagnostics: " @_unavailableFromAsync argument " ,
892
- documentation: " The arguments for the '@_unavailableFromAsync' attribute " ,
893
- children: [
894
- Child (
895
- name: " messageLabel " ,
896
- kind: . token( choices: [ . keyword( . message) ] )
897
- ) ,
898
- Child (
899
- name: " colon " ,
900
- kind: . token( choices: [ . token( . colon) ] )
901
- ) ,
902
- Child (
903
- name: " message " ,
904
- kind: . node( kind: . stringLiteralExpr)
905
- ) ,
906
- ]
907
- ) ,
908
-
909
- Node (
910
- kind: . underscorePrivateAttributeArguments,
911
- base: . syntax,
912
- nameForDiagnostics: " @_private argument " ,
913
- documentation: " The arguments for the '@_private' attribute " ,
914
- children: [
915
- Child (
916
- name: " sourceFileLabel " ,
917
- kind: . token( choices: [ . keyword( . sourceFile) ] )
918
- ) ,
919
- Child (
920
- name: " colon " ,
921
- kind: . token( choices: [ . token( . colon) ] )
922
- ) ,
923
- Child (
924
- name: " filename " ,
925
- kind: . node( kind: . stringLiteralExpr)
926
- ) ,
927
- ]
928
- ) ,
929
-
930
763
]
0 commit comments