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."
642642 (swift-mode:forward-token-simple)))
643643 " let" ))
644644
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+
645652 ; ; Suppress implicit semicolon around else
646653 ((or
647654 (equal (swift-mode:token:text previous-token) " else" )
@@ -721,7 +728,7 @@ return non-nil."
721728 ; ; Suppress implicit semicolon after keywords that cannot end statements.
722729 ((member (swift-mode:token:text previous-token)
723730 '(" while" " for" " switch" " case" " default" " catch" " if" " guard"
724- " let" " var" " throw" " import" " async " ))
731+ " let" " var" " throw" " import" ))
725732 nil )
726733
727734 ; ; 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 {
698698 func foo( x: Int , y: Int ) throws -> ( A , B )
699699 func bar( x: Int ) throws
700700 func baz( x: ( ) throws -> Int ) rethrows
701+ func aaa( ) async
701702 init < A, B> ( x: Int ) throws
702703 where
703704 A: C
You can’t perform that action at this time.
0 commit comments