File tree 2 files changed +62
-6
lines changed
2 files changed +62
-6
lines changed Original file line number Diff line number Diff line change @@ -463,6 +463,12 @@ Return nil otherwise." ;; FIXME pound-count
463
463
" fileprivate" )))))
464
464
nil )
465
465
466
+ ; ; Suppress implicit semicolon after declaration starters.
467
+ ((member (swift-mode:token:text previous-token)
468
+ '(" class" " struct" " protocol" " enum" " extension" " func"
469
+ " typealias" " associatedtype" " precedencegroup" " operator" ))
470
+ nil )
471
+
466
472
; ; Insert implicit semicolon before modifiers.
467
473
; ;
468
474
; ; Preceding modifiers takes precedence over this.
@@ -525,12 +531,6 @@ Return nil otherwise." ;; FIXME pound-count
525
531
'(" get" " set" " willSet" " didSet" " subscript" " init" " deinit" ))
526
532
t )
527
533
528
- ; ; Suppress implicit semicolon after declaration starters.
529
- ((member (swift-mode:token:text previous-token)
530
- '(" class" " struct" " protocol" " enum" " extension" " func"
531
- " typealias" " associatedtype" " precedencegroup" " operator" ))
532
- nil )
533
-
534
534
; ; Inserts implicit semicolon before declaration starters.
535
535
; ; Modifiers take precedence over this.
536
536
; ;
Original file line number Diff line number Diff line change @@ -460,3 +460,59 @@ precedencegroup
460
460
associativity :
461
461
left
462
462
}
463
+
464
+ // Declaration modifiers
465
+
466
+ class Foo {
467
+ open
468
+ class
469
+ mutating
470
+ nonmutating
471
+ func
472
+ foo( ) {
473
+ }
474
+
475
+ public
476
+ (
477
+ set
478
+ )
479
+ class
480
+ dynamic
481
+ final
482
+ lazy
483
+ optional
484
+ required
485
+ static
486
+ unowned
487
+ unowned
488
+ (
489
+ safe
490
+ )
491
+ unowned
492
+ (
493
+ unsafe
494
+ )
495
+ weak
496
+ var
497
+ x = 1
498
+
499
+ internal
500
+ class
501
+ let
502
+ x = 1
503
+
504
+ fileprivate
505
+ class
506
+ init ( ) {
507
+ }
508
+
509
+ private
510
+ class
511
+ deinit {
512
+ }
513
+
514
+ class
515
+ subscript( foo: Int ) -> Int {
516
+ return foo
517
+ }
518
+ }
You can’t perform that action at this time.
0 commit comments