File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -642,6 +642,13 @@ return non-nil."
642
642
(swift-mode:forward-token-simple)))
643
643
" let" ))
644
644
645
+ ; ; After async
646
+ ; ;
647
+ ; ; Suppresses implicit semicolon if before let.
648
+ ((and (equal (swift-mode:token:text previous-token) " async" )
649
+ (equal (swift-mode:token:text next-token) " let" ))
650
+ nil )
651
+
645
652
; ; Suppress implicit semicolon around else
646
653
((or
647
654
(equal (swift-mode:token:text previous-token) " else" )
@@ -721,7 +728,7 @@ return non-nil."
721
728
; ; Suppress implicit semicolon after keywords that cannot end statements.
722
729
((member (swift-mode:token:text previous-token)
723
730
'(" while" " for" " switch" " case" " default" " catch" " if" " guard"
724
- " let" " var" " throw" " import" " async " ))
731
+ " let" " var" " throw" " import" ))
9145
725
732
nil )
726
733
727
734
; ; Inserts implicit semicolon before keywords that starts a new
Original file line number Diff line number Diff line change @@ -698,6 +698,7 @@ protocol Foo {
698
698
func foo( x: Int , y: Int ) throws -> ( A , B )
699
699
func bar( x: Int ) throws
700
700
func baz( x: ( ) throws -> Int ) rethrows
701
+ func aaa( ) async
701
702
init < A, B> ( x: Int ) throws
702
703
where
703
704
A: C
You can’t perform that action at this time.
0 commit comments