Skip to content

Commit ea029a0

Browse files
committed
Suppress implicit semicolons inside interpolated expressions
1 parent 1167fec commit ea029a0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

swift-mode-lexer.el

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,13 @@ Return nil otherwise."
389389
(memq (swift-mode:token:type previous-token) '({ \( \[))
390390
(memq (swift-mode:token:type next-token) '(} \) \]))
391391

392+
;; Suppress implicit semicolon after/before string chunks inside
393+
;; interpolated expressions.
394+
(eq (swift-mode:token:type previous-token)
395+
'string-chunk-before-interpolated-expression)
396+
(eq (swift-mode:token:type next-token)
397+
'string-chunk-after-interpolated-expression)
398+
392399
;; Suppress implicit semicolon around keywords that cannot start or end
393400
;; statements.
394401
(member (swift-mode:token:text previous-token)

0 commit comments

Comments
 (0)