File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,19 @@ END is the point after the token."
194
194
'(" inout" " throws" " rethrows" " in" " where" )))
195
195
nil )
196
196
197
+ ; ; Inserts semicolon before open curly bracket.
198
+ ; ;
199
+ ; ; Open curly bracket may continue the previous line, but we do not indent
200
+ ; ; there. For example, the code below is parsed as `(foo() { x in ... })'
201
+ ; ; by the Swift compiler, but we indent it like `foo(); { x in ... }'.
202
+ ; ;
203
+ ; ; foo()
204
+ ; ; { // does not indent here
205
+ ; ; x in
206
+ ; ; ...
207
+ ; ; }
208
+ ((eq (swift-mode:token:type next-token) '\{ ) t )
209
+
197
210
; ; Inserts implicit semicolon around #... directives.
198
211
; ;
199
212
; ; Note that we cannot split #if line; the following code is not allowed.
@@ -330,19 +343,6 @@ END is the point after the token."
330
343
(swift-mode:forward-token-simple)))
331
344
" <" )))
332
345
333
- ; ; Inserts semicolon before open curly bracket.
334
- ; ;
335
- ; ; Open curly bracket may continue the previous line, but we do not indent
336
- ; ; there. For example, the code below is parsed as `(foo() { x in ... })'
337
- ; ; by the Swift compiler, but we indent it like `foo(); { x in ... }'.
338
- ; ;
339
- ; ; foo()
340
- ; ; { // does not indent here
341
- ; ; x in
342
- ; ; ...
343
- ; ; }
344
- ((eq (swift-mode:token:type next-token) '\{ ) t )
345
-
346
346
; ; Suppress implicit semicolon after keywords that behave like method
347
347
; ; names.
348
348
; ;
Original file line number Diff line number Diff line change @@ -1035,7 +1035,11 @@ catch
1035
1035
foo ( )
1036
1036
foo ( )
1037
1037
}
1038
-
1038
+ catch
1039
+ {
1040
+ foo ( )
1041
+ foo ( )
1042
+ }
1039
1043
1040
1044
// Conditional control statements
1041
1045
You can’t perform that action at this time.
0 commit comments