File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -1718,7 +1718,7 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
1718
1718
// this special exception for `async let` statements to avoid breaking prematurely between the
1719
1719
// `async` and `let` keywords.
1720
1720
let breakOrSpace : Token
1721
- if node. name. tokenKind == . contextualKeyword( " async " ) {
1721
+ if node. name. tokenKind == . contextualKeyword( . async) {
1722
1722
breakOrSpace = . space
1723
1723
} else {
1724
1724
breakOrSpace = . break
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ public final class UseEarlyExits: SyntaxFormatRule {
65
65
66
66
diagnose ( . useGuardStatement, on: ifStatement. elseKeyword)
67
67
68
- let trueBlock = ifStatement. body. withLeftBrace ( nil ) . withRightBrace ( nil )
68
+ let trueBlock = ifStatement. body
69
69
70
70
let guardKeyword = TokenSyntax . guardKeyword (
71
71
leadingTrivia: ifStatement. ifKeyword. leadingTrivia,
Original file line number Diff line number Diff line change @@ -520,12 +520,12 @@ public final class UseShorthandTypeNames: SyntaxFormatRule {
520
520
// Look for accessors that indicate that this is a computed property. If none are found, then
521
521
// it is a stored property (e.g., having only observers like `willSet/didSet`).
522
522
switch accessorDecl. accessorKind. tokenKind {
523
- case . contextualKeyword( " get " ) ,
524
- . contextualKeyword( " set " ) ,
525
- . contextualKeyword( " unsafeAddress " ) ,
526
- . contextualKeyword( " unsafeMutableAddress " ) ,
527
- . contextualKeyword( " _read " ) ,
528
- . contextualKeyword( " _modify " ) :
523
+ case . contextualKeyword( . get) ,
524
+ . contextualKeyword( . set) ,
525
+ . contextualKeyword( . unsafeAddress) ,
526
+ . contextualKeyword( . unsafeMutableAddress) ,
527
+ . contextualKeyword( . _read) ,
528
+ . contextualKeyword( . _modify) :
529
529
return false
530
530
default :
531
531
return true
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public final class UseSingleLinePropertyGetter: SyntaxFormatRule {
26
26
let acc = accessorBlock. accessors. first,
27
27
let body = acc. body,
28
28
accessorBlock. accessors. count == 1 ,
29
- acc. accessorKind. tokenKind == . contextualKeyword( " get " ) ,
29
+ acc. accessorKind. tokenKind == . contextualKeyword( . get) ,
30
30
acc. attributes == nil ,
31
31
acc. modifier == nil ,
32
32
acc. asyncKeyword == nil ,
You can’t perform that action at this time.
0 commit comments