8000 Revert "[5.7] Update gyb after updating async to contextual keyword" · swiftlang/swift-syntax@243ebb4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 243ebb4

Browse files
authored
Revert "[5.7] Update gyb after updating async to contextual keyword"
1 parent 79d1e52 commit 243ebb4

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

Sources/SwiftSyntax/gyb_generated/SyntaxClassification.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,22 @@ extension SyntaxClassification {
6767
switch (parentKind, indexInParent) {
6868
case (.awaitExpr, 0):
6969
return (.keyword, false)
70+
case (.arrowExpr, 0):
71+
return (.keyword, false)
72+
case (.closureSignature, 3):
73+
return (.keyword, false)
7074
case (.expressionSegment, 2):
7175
return (.stringInterpolationAnchor, true)
76+
case (.functionSignature, 1):
77+
return (.keyword, false)
7278
case (.ifConfigClause, 0):
7379
return (.buildConfigId, false)
7480
case (.ifConfigDecl, 1):
7581
return (.buildConfigId, false)
7682
case (.declModifier, 0):
7783
return (.attribute, false)
84+
case (.accessorDecl, 4):
85+
return (.keyword, false)
7886
case (.precedenceGroupRelation, 0):
7987
return (.keyword, false)
8088
case (.precedenceGroupAssociativity, 0):
@@ -89,6 +97,8 @@ extension SyntaxClassification {
8997
return (.typeIdentifier, false)
9098
case (.constrainedSugarType, 0):
9199
return (.keyword, false)
100+
case (.functionType, 3):
101+
return (.keyword, false)
92102
case (.availabilityVersionRestriction, 0):
93103
return (.keyword, false)
94104
default: return nil

Sources/SwiftSyntaxBuilder/gyb_generated/BuildableNodes.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ public struct ArrowExpr: ExprBuildable, ExpressibleAsArrowExpr {
13151315
arrowToken: TokenSyntax = TokenSyntax.`arrow`
13161316
) {
13171317
self.init(
1318-
asyncKeyword: asyncKeyword.map(TokenSyntax.contextualKeyword),
1318+
asyncKeyword: asyncKeyword.map(TokenSyntax.identifier),
13191319
throwsToken: throwsToken,
13201320
arrowToken: arrowToken
13211321
)
@@ -2464,7 +2464,7 @@ public struct ClosureSignature: SyntaxBuildable, ExpressibleAsClosureSignature {
24642464
attributes: attributesBuilder(),
24652465
capture: capture,
24662466
input: input,
2467-
asyncKeyword: asyncKeyword.map(TokenSyntax.contextualKeyword),
2467+
asyncKeyword: asyncKeyword.map(TokenSyntax.identifier),
24682468
throwsTok: throwsTok,
24692469
output: output,
24702470
inTok: inTok
@@ -4356,7 +4356,7 @@ public struct FunctionSignature: SyntaxBuildable, ExpressibleAsFunctionSignature
43564356
) {
43574357
self.init(
43584358
input: input,
4359-
asyncOrReasyncKeyword: asyncOrReasyncKeyword.map(TokenSyntax.contextualKeyword),
4359+
asyncOrReasyncKeyword: asyncOrReasyncKeyword.map(TokenSyntax.identifier),
43604360
throwsOrRethrowsKeyword: throwsOrRethrowsKeyword,
43614361
output: output
43624362
)
@@ -6533,7 +6533,7 @@ public struct AccessorDecl: DeclBuildable, ExpressibleAsAccessorDecl {
65336533
modifier: modifier,
65346534
accessorKind: accessorKind,
65356535
parameter: parameter,
6536-
asyncKeyword: asyncKeyword.map(TokenSyntax.contextualKeyword),
6536+
asyncKeyword: asyncKeyword.map(TokenSyntax.identifier),
65376537
throwsKeyword: throwsKeyword,
65386538
body: body
65396539
)
@@ -12433,7 +12433,7 @@ public struct FunctionType: TypeBuildable, ExpressibleAsFunctionType {
1243312433
public init(
1243412434
leftParen: TokenSyntax = TokenSyntax.`leftParen`,
1243512435
rightParen: TokenSyntax = TokenSyntax.`rightParen`,
12436-
asyncKeyword: TokenSyntax? = nil,
12436+
asyncKeyword: String?,
1243712437
throwsOrRethrowsKeyword: TokenSyntax? = nil,
1243812438
arrow: TokenSyntax = TokenSyntax.`arrow`,
1243912439
returnType: ExpressibleAsTypeBuildable,
@@ -12443,7 +12443,7 @@ public struct FunctionType: TypeBuildable, ExpressibleAsFunctionType {
1244312443
leftParen: leftParen,
1244412444
arguments: argumentsBuilder(),
1244512445
rightParen: rightParen,
12446-
asyncKeyword: asyncKeyword,
12446+
asyncKeyword: asyncKeyword.map(TokenSyntax.identifier),
1244712447
throwsOrRethrowsKeyword: throwsOrRethrowsKeyword,
1244812448
arrow: arrow,
1244912449
returnType: returnType

Sources/SwiftSyntaxParser/gyb_generated/NodeDeclarationHash.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
extension SyntaxParser {
1818
static func verifyNodeDeclarationHash() -> Bool {
1919
return String(cString: swiftparse_syntax_structure_versioning_identifier()!) ==
20-
"2ec3f7586996f875c3cb1e71ed98e0551f0ec8e7"
20+
"9adb90dde0ca797a8bd9be567fefc6f4e027c3a5"
2121
}
2222
}

0 commit comments

Comments
 (0)
0