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."
194194 '(" inout" " throws" " rethrows" " in" " where" )))
195195 nil )
196196
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+
197210 ; ; Inserts implicit semicolon around #... directives.
198211 ; ;
199212 ; ; Note that we cannot split #if line; the following code is not allowed.
@@ -330,19 +343,6 @@ END is the point after the token."
330343 (swift-mode:forward-token-simple)))
331344 " <" )))
332345
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-
346346 ; ; Suppress implicit semicolon after keywords that behave like method
347347 ; ; names.
348348 ; ;
Original file line number Diff line number Diff line change @@ -1035,7 +1035,11 @@ catch
10351035 foo ( )
10361036 foo ( )
10371037}
1038-
1038+ catch
1039+ {
1040+ foo ( )
1041+ foo ( )
1042+ }
10391043
10401044// Conditional control statements
10411045
You can’t perform that action at this time.
0 commit comments