Skip to content

Commit 4724c19

Browse files
committed
Update for async being a contextual keyword.
`async` was changed from an identifier to a contextual keyword by swiftlang/swift#58912.
1 parent f30e81e commit 4724c19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftFormatPrettyPrint/TokenStreamCreator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1700,7 +1700,7 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
17001700
// this special exception for `async let` statements to avoid breaking prematurely between the
17011701
// `async` and `let` keywords.
17021702
let breakOrSpace: Token
1703-
if node.name.tokenKind == .identifier("async") {
1703+
if node.name.tokenKind == .contextualKeyword("async") {
17041704
breakOrSpace = .space
17051705
} else {
17061706
breakOrSpace = .break

0 commit comments

Comments
 (0)