Skip to content

Commit e5b1a2b

Browse files
committed
Make first characters of all Child's deprecatedName in CodeGeneration lowercase
Adjusted the 'deprecatedName' property of Child to begin with a lowercase character for consistency and intuition, without altering the generated code's output.
1 parent 5333edb commit e5b1a2b

File tree

12 files changed

+203
-203
lines changed

12 files changed

+203
-203
lines changed

CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public let ATTRIBUTE_NODES: [Node] = [
5252
children: [
5353
Child(
5454
name: "atSign",
55-
deprecatedName: "AtSignToken",
55+
deprecatedName: "atSignToken",
5656
kind: .token(choices: [.token(.atSign)]),
5757
documentation: "The `@` sign."
5858
),
@@ -70,7 +70,7 @@ public let ATTRIBUTE_NODES: [Node] = [
7070
),
7171
Child(
7272
name: "arguments",
73-
deprecatedName: "Argument",
73+
deprecatedName: "argument",
7474
kind: .nodeChoices(choices: [
7575
Child(
7676
name: "argumentList",
@@ -178,7 +178,7 @@ public let ATTRIBUTE_NODES: [Node] = [
178178
children: [
179179
Child(
180180
name: "availabilityLabel",
181-
deprecatedName: "Label",
181+
deprecatedName: "label",
182182
kind: .token(choices: [.keyword(text: "availability")]),
183183
nameForDiagnostics: "label",
184184
documentation: "The label of the argument"
@@ -190,7 +190,7 @@ public let ATTRIBUTE_NODES: [Node] = [
190190
),
191191
Child(
192192
name: "availabilityArguments",
193-
deprecatedName: "AvailabilityList",
193+
deprecatedName: "availabilityList",
194194
kind: .collection(kind: .availabilityArgumentList, collectionElementName: "AvailabilityArgument", deprecatedCollectionElementName: "Availability")
195195
),
196196
Child(
@@ -210,7 +210,7 @@ public let ATTRIBUTE_NODES: [Node] = [
210210
children: [
211211
Child(
212212
name: "platformVersion",
213-
deprecatedName: "AvailabilityVersionRestriction",
213+
deprecatedName: "availabilityVersionRestriction",
214214
kind: .node(kind: .platformVersion)
215215
),
216216
Child(
@@ -251,7 +251,7 @@ public let ATTRIBUTE_NODES: [Node] = [
251251
),
252252
Child(
253253
name: "platforms",
254-
deprecatedName: "VersionList",
254+
deprecatedName: "versionList",
255255
kind: .collection(kind: .platformVersionItemList, collectionElementName: "Platform", deprecatedCollectionElementName: "Availability"),
256256
documentation: "The list of OS versions in which the declaration became ABI stable."
257257
),
@@ -351,7 +351,7 @@ public let ATTRIBUTE_NODES: [Node] = [
351351
),
352352
Child(
353353
name: "accessorSpecifier",
354-
deprecatedName: "AccessorKind",
354+
deprecatedName: "accessorKind",
355355
kind: .token(choices: [.keyword(text: "get"), .keyword(text: "set")]),
356356
documentation: "The accessor name.",
357357
isOptional: true
@@ -363,7 +363,7 @@ public let ATTRIBUTE_NODES: [Node] = [
363363
),
364364
Child(
365365
name: "arguments",
366-
deprecatedName: "DiffParams",
366+
deprecatedName: "diffParams",
367367
kind: .node(kind: .differentiabilityWithRespectToArgument),
368368
isOptional: true
369369
),
@@ -391,7 +391,7 @@ public let ATTRIBUTE_NODES: [Node] = [
391391
children: [
392392
Child(
393393
name: "argument",
394-
deprecatedName: "Parameter",
394+
deprecatedName: "parameter",
395395
kind: .token(choices: [.token(.identifier), .token(.integerLiteral), .keyword(text: "self")])
396396
),
397397
Child(
@@ -422,16 +422,16 @@ public let ATTRIBUTE_NODES: [Node] = [
422422
),
423423
Child(
424424
name: "arguments",
425-
deprecatedName: "Parameters",
425+
deprecatedName: "parameters",
426426
kind: .nodeChoices(choices: [
427427
Child(
428428
name: "argument",
429-
deprecatedName: "Parameter",
429+
deprecatedName: "parameter",
430430
kind: .node(kind: .differentiabilityArgument)
431431
),
432432
Child(
433433
name: "argumentList",
434-
deprecatedName: "ParameterList",
434+
deprecatedName: "parameterList",
435435
kind: .node(kind: .differentiabilityArguments)
436436
),
437437
]),
@@ -453,7 +453,7 @@ public let ATTRIBUTE_NODES: [Node] = [
453453
),
454454
Child(
455455
name: "arguments",
456-
deprecatedName: "DifferentiabilityParameters",
456+
deprecatedName: "differentiabilityParameters",
457457
kind: .collection(kind: .differentiabilityArgumentList, collectionElementName: "Argument"),
458458
documentation: "The parameters for differentiation."
459459
),
@@ -477,33 +477,33 @@ public let ATTRIBUTE_NODES: [Node] = [
477477
children: [
478478
Child(
479479
name: "kindSpecifier",
480-
deprecatedName: "DiffKind",
480+
deprecatedName: "diffKind",
481481
kind: .token(choices: [.keyword(text: "_forward"), .keyword(text: "reverse"), .keyword(text: "_linear")]),
482482
isOptional: true
483483
),
484484
Child(
485485
name: "kindSpecifierComma",
486-
deprecatedName: "DiffKindComma",
486+
deprecatedName: "diffKindComma",
487487
kind: .token(choices: [.token(.comma)]),
488488
documentation: "The comma following the differentiability kind, if it exists.",
489489
isOptional: true
490490
),
491491
Child(
492492
name: "arguments",
493-
deprecatedName: "DiffParams",
493+
deprecatedName: "diffParams",
494494
kind: .node(kind: .differentiabilityWithRespectToArgument),
495495
isOptional: true
496496
),
497497
Child(
498498
name: "argumentsComma",
499-
deprecatedName: "DiffParamsComma",
499+
deprecatedName: "diffParamsComma",
500500
kind: .token(choices: [.token(.comma)]),
501501
documentation: "The comma following the differentiability arguments clause, if it exists.",
502502
isOptional: true
503503
),
504504
Child(
505505
name: "genericWhereClause",
506-
deprecatedName: "WhereClause",
506+
deprecatedName: "whereClause",
507507
kind: .node(kind: .genericWhereClause),
508508
documentation: "A `where` clause that places additional constraints on generic parameters like `where T: Differentiable`.",
509509
isOptional: true
@@ -581,7 +581,7 @@ public let ATTRIBUTE_NODES: [Node] = [
581581
),
582582
Child(
583583
name: "declName",
584-
deprecatedName: "Declname",
584+
deprecatedName: "declname",
585585
kind: .node(kind: .declReferenceExpr)
586586
),
587587
]
@@ -640,7 +640,7 @@ public let ATTRIBUTE_NODES: [Node] = [
640640
),
641641
Child(
642642
name: "declName",
643-
deprecatedName: "Declname",
643+
deprecatedName: "declname",
644644
kind: .node(kind: .declReferenceExpr),
645645
nameForDiagnostics: "declaration name",
646646
documentation: "The value for this argument"
@@ -800,7 +800,7 @@ public let ATTRIBUTE_NODES: [Node] = [
800800
),
801801
Child(
802802
name: "period",
803-
deprecatedName: "Dot",
803+
deprecatedName: "dot",
804804
kind: .token(choices: [.token(.period)]),
805805
isOptional: true
806806
),
@@ -839,7 +839,7 @@ public let ATTRIBUTE_NODES: [Node] = [
839839
children: [
840840
Child(
841841
name: "targetLabel",
842-
deprecatedName: "Label",
842+
deprecatedName: "label",
843843
kind: .token(choices: [.keyword(text: "target")]),
844844
nameForDiagnostics: "label",
845845
documentation: "The label of the argument"
@@ -851,7 +851,7 @@ public let ATTRIBUTE_NODES: [Node] = [
851851
),
852852
Child(
853853
name: "declName",
854-
deprecatedName: "Declname",
854+
deprecatedName: "declname",
855855
kind: .node(kind: .declReferenceExpr),
856856
nameForDiagnostics: "declaration name",
857857
documentation: "The value for this argument"

CodeGeneration/Sources/SyntaxSupport/AvailabilityNodes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public let AVAILABILITY_NODES: [Node] = [
2525
children: [
2626
Child(
2727
name: "argument",
28-
deprecatedName: "Entry",
28+
deprecatedName: "entry",
2929
kind: .nodeChoices(choices: [
3030
Child(
3131
name: "token",

CodeGeneration/Sources/SyntaxSupport/Child.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public class Child {
215215
isOptional: Bool = false
216216
) {
217217
precondition(name.first?.isLowercase ?? true, "The first letter of a child’s name should be lowercase")
218-
precondition(deprecatedName?.first?.isUppercase ?? true, "The first letter of a child’s name should be uppercase")
218+
precondition(deprecatedName?.first?.isLowercase ?? true, "The first letter of a child’s deprecatedName should be lowercase")
219219
self.name = name
220220
self.deprecatedName = deprecatedName
221221
self.kind = kind

0 commit comments

Comments
 (0)