Skip to content

Commit d79b876

Browse files
authored
Merge pull request #1769 from ahoppen/ahoppen/no-keyword-token-choice
Remove the last arbitrary keyword as a token choice
2 parents c52cfe4 + 864aeff commit d79b876

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ public let TYPE_NODES: [Node] = [
421421
.keyword(text: "self"),
422422
.keyword(text: "Self"),
423423
.keyword(text: "Any"),
424-
.token(tokenKind: "KeywordToken"),
425424
.token(tokenKind: "WildcardToken"),
426425
]),
427426
classification: "TypeIdentifier"

Sources/SwiftParser/Attributes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ extension Parser {
553553

554554
mutating func parseTransposeAttribute() -> RawAttributeSyntax {
555555
let (unexpectedBeforeAtSign, atSign) = self.expect(.atSign)
556-
let (unexpectedBeforeTranspose, transpose) = self.expect(.keyword(.transpose))
556+
let (unexpectedBeforeTranspose, transpose) = self.expect(TokenSpec(.transpose, remapping: .identifier))
557557

558558
let (unexpectedBeforeLeftParen, leftParen) = self.expect(.leftParen)
559559
let argument = self.parseDerivativeAttributeArguments()

Sources/SwiftSyntax/generated/raw/RawSyntaxValidation.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2277,7 +2277,6 @@ func validateLayout(layout: RawSyntaxBuffer, as kind: SyntaxKind) {
22772277
.keyword("self"),
22782278
.keyword("Self"),
22792279
.keyword("Any"),
2280-
.tokenKind(.keyword),
22812280
.tokenKind(.wildcard)
22822281
]))
22832282
assertNoError(kind, 2, verify(layout[2], as: RawUnexpectedNodesSyntax?.self))

0 commit comments

Comments
 (0)