Skip to content

Commit be8dc65

Browse files
authored
Merge pull request #1949 from ahoppen/ahoppen/renames
More renames of syntax nodes
2 parents cb134fa + 44c4cca commit be8dc65

File tree

151 files changed

+16169
-14574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+16169
-14574
lines changed

CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public let ATTRIBUTE_NODES: [Node] = [
6060
kind: .nodeChoices(choices: [
6161
Child(
6262
name: "ArgumentList",
63-
kind: .node(kind: .tupleExprElementList)
63+
kind: .node(kind: .labeledExprList)
6464
),
6565
Child(
6666
name: "Token",
@@ -72,11 +72,11 @@ public let ATTRIBUTE_NODES: [Node] = [
7272
),
7373
Child(
7474
name: "Availability",
75-
kind: .node(kind: .availabilitySpecList)
75+
kind: .node(kind: .availabilityArgumentList)
7676
),
7777
Child(
7878
name: "SpecializeArguments",
79-
kind: .node(kind: .specializeAttributeSpecList)
79+
kind: .node(kind: .specializeAttributeArgumentList)
8080
),
8181
Child(
8282
name: "ObjCName",
@@ -92,11 +92,11 @@ public let ATTRIBUTE_NODES: [Node] = [
9292
),
9393
Child(
9494
name: "DerivativeRegistrationArguments",
95-
kind: .node(kind: .derivativeRegistrationAttributeArguments)
95+
kind: .node(kind: .derivativeAttributeArguments)
9696
),
9797
Child(
9898
name: "BackDeployedArguments",
99-
kind: .node(kind: .backDeployedAttributeSpecList)
99+
kind: .node(kind: .backDeployedAttributeArguments)
100100
),
101101
Child(
102102
name: "ConventionArguments",
@@ -116,23 +116,23 @@ public let ATTRIBUTE_NODES: [Node] = [
116116
),
117117
Child(
118118
name: "OriginallyDefinedInArguments",
119-
kind: .node(kind: .originallyDefinedInArguments)
119+
kind: .node(kind: .originallyDefinedInAttributeArguments)
120120
),
121121
Child(
122122
name: "UnderscorePrivateAttributeArguments",
123123
kind: .node(kind: .underscorePrivateAttributeArguments)
124124
),
125125
Child(
126126
name: "DynamicReplacementArguments",
127-
kind: .node(kind: .dynamicReplacementArguments)
127+
kind: .node(kind: .dynamicReplacementAttributeArguments)
128128
),
129129
Child(
130130
name: "UnavailableFromAsyncArguments",
131-
kind: .node(kind: .unavailableFromAsyncArguments)
131+
kind: .node(kind: .unavailableFromAsyncAttributeArguments)
132132
),
133133
Child(
134134
name: "EffectsArguments",
135-
kind: .node(kind: .effectsArgumentList)
135+
kind: .node(kind: .effectsAttributeArgumentList)
136136
),
137137
Child(
138138
name: "DocumentationArguments",
@@ -152,7 +152,7 @@ public let ATTRIBUTE_NODES: [Node] = [
152152
),
153153

154154
Node(
155-
kind: .availabilityEntry,
155+
kind: .specializeAvailabilityArgument,
156156
base: .syntax,
157157
nameForDiagnostics: "availability entry",
158158
documentation: "The availability argument for the _specialize attribute",
@@ -172,7 +172,7 @@ public let ATTRIBUTE_NODES: [Node] = [
172172
Child(
173173
name: "AvailabilityArguments",
174174
deprecatedName: "AvailabilityList",
175-
kind: .collection(kind: .availabilitySpecList, collectionElementName: "AvailabilityArgument", deprecatedCollectionElementName: "Availability")
175+
kind: .collection(kind: .availabilityArgumentList, collectionElementName: "AvailabilityArgument", deprecatedCollectionElementName: "Availability")
176176
),
177177
Child(
178178
name: "Semicolon",
@@ -183,15 +183,15 @@ public let ATTRIBUTE_NODES: [Node] = [
183183

184184
// back-deploy-version-entry -> availability-version-restriction ','?
185185
Node(
186-
kind: .availabilityVersionRestrictionListEntry,
186+
kind: .platformVersionItem,
187187
base: .syntax,
188188
nameForDiagnostics: "version",
189189
documentation: "A single platform/version pair in an attribute, e.g. `iOS 10.1`.",
190190
traits: ["WithTrailingComma"],
191191
children: [
192192
Child(
193193
name: "AvailabilityVersionRestriction",
194-
kind: .node(kind: .availabilityVersionRestriction)
194+
kind: .node(kind: .platformVersion)
195195
),
196196
Child(
197197
name: "TrailingComma",
@@ -205,16 +205,16 @@ public let ATTRIBUTE_NODES: [Node] = [
205205
// back-deploy-version-list ->
206206
// back-deploy-version-entry back-deploy-version-list?
207207
Node(
208-
kind: .availabilityVersionRestrictionList,
208+
kind: .platformVersionItemList,
209209
base: .syntaxCollection,
210210
nameForDiagnostics: "version list",
211-
elementChoices: [.availabilityVersionRestrictionListEntry]
211+
elementChoices: [.platformVersionItem]
212212
),
213213

214214
// The arguments of '@backDeployed(...)'
215215
// back-deployed-attr-spec-list -> 'before' ':' back-deployed-version-list
216216
Node(
217-
kind: .backDeployedAttributeSpecList,
217+
kind: .backDeployedAttributeArguments,
218218
base: .syntax,
219219
nameForDiagnostics: "'@backDeployed' arguments",
220220
documentation: "A collection of arguments for the `@backDeployed` attribute",
@@ -232,7 +232,7 @@ public let ATTRIBUTE_NODES: [Node] = [
232232
Child(
233233
name: "Platforms",
234234
deprecatedName: "VersionList",
235-
kind: .collection(kind: .availabilityVersionRestrictionList, collectionElementName: "Platform", deprecatedCollectionElementName: "Availability"),
235+
kind: .collection(kind: .platformVersionItemList, collectionElementName: "Platform", deprecatedCollectionElementName: "Availability"),
236236
documentation: "The list of OS versions in which the declaration became ABI stable."
237237
),
238238
]
@@ -331,7 +331,7 @@ public let ATTRIBUTE_NODES: [Node] = [
331331
// derivative-registration-attr-arguments ->
332332
// 'of' ':' func-decl-name ','? differentiability-params-clause?
333333
Node(
334-
kind: .derivativeRegistrationAttributeArguments,
334+
kind: .derivativeAttributeArguments,
335335
base: .syntax,
336336
nameForDiagnostics: "attribute arguments",
337337
documentation:
@@ -373,7 +373,7 @@ public let ATTRIBUTE_NODES: [Node] = [
373373
Child(
374374
name: "Parameters",
375375
deprecatedName: "DiffParams",
376-
kind: .node(kind: .differentiabilityParamsClause),
376+
kind: .node(kind: .differentiabilityWithRespectToArgument),
377377
isOptional: true
378378
),
379379
]
@@ -382,15 +382,15 @@ public let ATTRIBUTE_NODES: [Node] = [
382382
// differentiability-param-list ->
383383
// differentiability-param differentiability-param-list?
384384
Node(
385-
kind: .differentiabilityParamList,
385+
kind: .differentiabilityParameterList,
386386
base: .syntaxCollection,
387387
nameForDiagnostics: "differentiability parameters",
388-
elementChoices: [.differentiabilityParam]
388+
elementChoices: [.differentiabilityArgument]
389389
),
390390

391391
// differentiability-param -> ('self' | identifier | integer-literal) ','?
392392
Node(
393-
kind: .differentiabilityParam,
393+
kind: .differentiabilityArgument,
394394
base: .syntax,
395395
nameForDiagnostics: "differentiability parameter",
396396
documentation: "A differentiability parameter: either the \"self\" identifier, a function parameter name, or a function parameter index.",
@@ -413,7 +413,7 @@ public let ATTRIBUTE_NODES: [Node] = [
413413
// differentiability-params-clause ->
414414
// 'wrt' ':' (differentiability-param | differentiability-params)
415415
Node(
416-
kind: .differentiabilityParamsClause,
416+
kind: .differentiabilityWithRespectToArgument,
417417
base: .syntax,
418418
nameForDiagnostics: "'@differentiable' argument",
419419
documentation: "A clause containing differentiability parameters.",
@@ -433,11 +433,11 @@ public let ATTRIBUTE_NODES: [Node] = [
433433
kind: .nodeChoices(choices: [
434434
Child(
435435
name: "Parameter",
436-
kind: .node(kind: .differentiabilityParam)
436+
kind: .node(kind: .differentiabilityArgument)
437437
),
438438
Child(
439439
name: "ParameterList",
440-
kind: .node(kind: .differentiabilityParams)
440+
kind: .node(kind: .differentiabilityArguments)
441441
),
442442
]),
443443
nameForDiagnostics: "parameters"
@@ -447,7 +447,7 @@ public let ATTRIBUTE_NODES: [Node] = [
447447

448448
// differentiability-params -> '(' differentiability-param-list ')'
449449
Node(
450-
kind: .differentiabilityParams,
450+
kind: .differentiabilityArguments,
451451
base: .syntax,
452452
nameForDiagnostics: "differentiability parameters",
453453
documentation: "The differentiability parameters.",
@@ -458,7 +458,7 @@ public let ATTRIBUTE_NODES: [Node] = [
458458
),
459459
Child(
460460
name: "DifferentiabilityParameters",
461-
kind: .collection(kind: .differentiabilityParamList, collectionElementName: "DifferentiabilityParam"),
461+
kind: .collection(kind: .differentiabilityParameterList, collectionElementName: "DifferentiabilityParam"),
462462
documentation: "The parameters for differentiation."
463463
),
464464
Child(
@@ -495,7 +495,7 @@ public let ATTRIBUTE_NODES: [Node] = [
495495
Child(
496496
name: "Parameters",
497497
deprecatedName: "DiffParams",
498-
kind: .node(kind: .differentiabilityParamsClause),
498+
kind: .node(kind: .differentiabilityWithRespectToArgument),
499499
isOptional: true
500500
),
501501
Child(
@@ -570,7 +570,7 @@ public let ATTRIBUTE_NODES: [Node] = [
570570
),
571571

572572
Node(
573-
kind: .dynamicReplacementArguments,
573+
kind: .dynamicReplacementAttributeArguments,
574574
base: .syntax,
575575
nameForDiagnostics: "@_dynamicReplacement argument",
576576
documentation: "The arguments for the '@_dynamicReplacement' attribute",
@@ -592,7 +592,7 @@ public let ATTRIBUTE_NODES: [Node] = [
592592
),
593593

594594
Node(
595-
kind: .effectsArgumentList,
595+
kind: .effectsAttributeArgumentList,
596596
base: .syntaxCollection,
597597
nameForDiagnostics: "@_effects arguments",
598598
documentation: "The arguments of the '@_effect' attribute. These will be parsed during the SIL stage.",
@@ -661,7 +661,7 @@ public let ATTRIBUTE_NODES: [Node] = [
661661
// Representation of e.g. 'exported: true,'
662662
// labeled-specialize-entry -> identifier ':' token ','?
663663
Node(
664-
kind: .labeledSpecializeEntry,
664+
kind: .labeledSpecializeArgument,
665665
base: .syntax,
666666
nameForDiagnostics: "attribute argument",
667667
documentation: "A labeled argument for the `@_specialize` attribute like `exported: true`",
@@ -750,7 +750,7 @@ public let ATTRIBUTE_NODES: [Node] = [
750750
),
751751

752752
Node(
753-
kind: .originallyDefinedInArguments,
753+
kind: .originallyDefinedInAttributeArguments,
754754
base: .syntax,
755755
nameForDiagnostics: "@_originallyDefinedIn arguments",
756756
documentation: "The arguments for the '@_originallyDefinedIn' attribute",
@@ -773,7 +773,7 @@ public let ATTRIBUTE_NODES: [Node] = [
773773
),
774774
Child(
775775
name: "Platforms",
776-
kind: .collection(kind: .availabilityVersionRestrictionList, collectionElementName: "Platform")
776+
kind: .collection(kind: .platformVersionItemList, collectionElementName: "Platform")
777777
),
778778
]
779779
),
@@ -834,17 +834,17 @@ public let ATTRIBUTE_NODES: [Node] = [
834834
// | generic-where-clause
835835
// specialize-spec-attr-list?
836836
Node(
837-
kind: .specializeAttributeSpecList,
837+
kind: .specializeAttributeArgumentList,
838838
base: .syntaxCollection,
839839
nameForDiagnostics: "argument to '@_specialize",
840840
documentation: "A collection of arguments for the `@_specialize` attribute",
841-
elementChoices: [.labeledSpecializeEntry, .availabilityEntry, .targetFunctionEntry, .genericWhereClause]
841+
elementChoices: [.labeledSpecializeArgument, .specializeAvailabilityArgument, .specializeTargetFunctionArgument, .genericWhereClause]
842842
),
843843

844844
// Representation of e.g. 'exported: true,'
845845
// labeled-specialize-entry -> identifier ':' token ','?
846846
Node(
847-
kind: .targetFunctionEntry,
847+
kind: .specializeTargetFunctionArgument,
848848
base: .syntax,
849849
nameForDiagnostics: "attribute argument",
850850
documentation: "A labeled argument for the `@_specialize` attribute with a function decl value like `target: myFunc(_:)`",
@@ -881,7 +881,7 @@ public let ATTRIBUTE_NODES: [Node] = [
881881
),
882882

883883
Node(
884-
kind: .unavailableFromAsyncArguments,
884+
kind: .unavailableFromAsyncAttributeArguments,
885885
base: .syntax,
886886
nameForDiagnostics: "@_unavailableFromAsync argument",
887887
documentation: "The arguments for the '@_unavailableFromAsync' attribute",

CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public let AVAILABILITY_NODES: [Node] = [
2424
traits: ["WithTrailingComma"],
2525
children: [
2626
Child(
27-
name: "Entry",
27+
name: "Argument",
28+
deprecatedName: "Entry",
2829
kind: .nodeChoices(choices: [
2930
Child(
3031
name: "Token",
@@ -36,7 +37,7 @@ public let AVAILABILITY_NODES: [Node] = [
3637
),
3738
Child(
3839
name: "AvailabilityVersionRestriction",
39-
kind: .node(kind: .availabilityVersionRestriction)
40+
kind: .node(kind: .platformVersion)
4041
),
4142
Child(
4243
name: "AvailabilityLabeledArgument",
@@ -99,7 +100,7 @@ public let AVAILABILITY_NODES: [Node] = [
99100

100101
// availability-spec-list -> availability-entry availability-spec-list?
101102
Node(
102-
kind: .availabilitySpecList,
103+
kind: .availabilityArgumentList,
103104
base: .syntaxCollection,
104105
nameForDiagnostics: "'@availability' arguments",
105106
elementChoices: [.availabilityArgument]
@@ -108,7 +109,7 @@ public let AVAILABILITY_NODES: [Node] = [
108109
// Representation for 'iOS 10', 'swift 3.4' etc.
109110
// availability-version-restriction -> identifier version-tuple
110111
Node(
111-
kind: .availabilityVersionRestriction,
112+
kind: .platformVersion,
112113
base: .syntax,
113114
nameForDiagnostics: "version restriction",
114115
documentation: "An argument to `@available` that restricts the availability on a certain platform to a version, e.g. `iOS 10` or `swift 3.4`.",

CodeGeneration/Sources/SyntaxSupport/BuilderInitializableTypes.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@
1414
/// builder. If the value is not nil, the result builder construct the value's
1515
/// type and synthesize all other members to form the node.
1616
public let BUILDER_INITIALIZABLE_TYPES: [SyntaxNodeKind: SyntaxNodeKind?] = [
17+
.arrayElementList: nil,
18+
.closureCaptureList: nil,
1719
.codeBlock: .codeBlockItemList,
18-
.memberDeclBlock: .memberDeclList,
1920
.codeBlockItemList: nil,
20-
.memberDeclList: nil,
21-
.patternBindingList: nil,
22-
.switchCaseList: nil,
23-
.arrayElementList: nil,
24-
.tupleExprElementList: nil,
2521
.enumCaseElementList: nil,
22+
.exprList: nil,
2623
.functionParameterList: nil,
24+
.genericArgumentList: nil,
2725
.genericParameterList: nil,
2826
.genericRequirementList: nil,
2927
.inheritedTypeList: nil,
30-
.closureCaptureItemList: nil,
31-
.caseItemList: nil,
32-
.genericArgumentList: nil,
28+
.labeledExprList: nil,
29+
.memberBlock: .memberBlockItemList,
30+
.memberBlockItemList: nil,
31+
.patternBindingList: nil,
32+
.switchCaseItemList: nil,
33+
.switchCaseList: nil,
3334
.tuplePatternElementList: nil,
34-
.exprList: nil,
3535
]

CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public let COMMON_NODES: [Node] = [
126126

127127
// deinit-effect-specifiers -> async?
128128
Node(
129-
kind: .deinitEffectSpecifiers,
129+
kind: .deinitializerEffectSpecifiers,
130130
base: .syntax,
131131
nameForDiagnostics: "effect specifiers",
132132
traits: [],
@@ -172,7 +172,7 @@ public let COMMON_NODES: [Node] = [
172172
),
173173
Child(
174174
name: "Modifiers",
175-
kind: .collection(kind: .modifierList, collectionElementName: "Modifier"),
175+
kind: .collection(kind: .declModifierList, collectionElementName: "Modifier"),
176176
documentation: "If there were standalone modifiers without a declaration to attach them to, the ``MissingDeclSyntax`` will contain these.",
177177
isOptional: true
178178
),

0 commit comments

Comments
 (0)