Skip to content

Commit 9e220cb

Browse files
committed
1 parent 05a661e commit 9e220cb

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

swift-mode-font-lock.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ Return nil otherwise."
541541
'("associatedtype" "class" "deinit" "enum" "extension" "fileprivate" "func"
542542
"import" "init" "inout" "internal" "let" "open" "operator" "private"
543543
"protocol" "public" "some" "static" "struct" "subscript" "typealias" "var"
544-
"actor")
544+
"actor" "nonisolated" "isolated")
545545
"Keywords used in declarations.")
546546

547547
(defconst swift-mode:statement-keywords

swift-mode-lexer.el

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,10 @@ Return nil otherwise."
431431
;; Suppress implicit semicolon around keywords that cannot start or end
432432
;; statements.
433433
(member (swift-mode:token:text previous-token)
434-
'("some" "inout" "in" "where"))
434+
'("some" "inout" "in" "where" "isolated"))
435435
(member (swift-mode:token:text next-token)
436-
'("some" "inout" "throws" "rethrows" "async" "in" "where")))
436+
'("some" "inout" "throws" "rethrows" "in" "where"
437+
"isolated")))
437438
nil)
438439

439440
;; Inserts semicolon before open curly bracket.
@@ -458,7 +459,7 @@ Return nil otherwise."
458459
'("indirect" "convenience" "dynamic" "final" "infix" "lazy"
459460
"mutating" "nonmutating" "optional" "override" "postfix"
460461
"prefix" "required" "static" "unowned" "weak" "internal"
461-
"private" "public" "open" "fileprivate"))
462+
"private" "public" "open" "fileprivate" "nonisolated"))
462463
nil)
463464

464465
;; internal(set) private(set) public(set) open(set) fileprivate(set)
@@ -491,7 +492,7 @@ Return nil otherwise."
491492
'("indirect" "convenience" "dynamic" "final" "infix" "lazy"
492493
"mutating" "nonmutating" "optional" "override" "postfix"
493494
"prefix" "required" "static" "unowned" "weak" "internal"
494-
"private" "public" "open" "fileprivate"))
495+
"private" "public" "open" "fileprivate" "nonisolated"))
495496
t)
496497

497498
;; Inserts implicit semicolon around keywords that forms single keyword

test/swift-files/indent/declarations.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ private
338338
B>
339339
(
340340
x:
341+
@A
342+
isolated
343+
inout
341344
Int,
342345
y:
343346
Int
@@ -620,7 +623,8 @@ fileprivate
620623
B =
621624
D<E> {
622625
func foo()
623-
func foo()
626+
nonisolated
627+
func foo()
624628
}
625629

626630

test/swift-files/indent/identifiers.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ func foo() {
109109
foo(
110110
some: 1
111111
)
112+
foo(
113+
nonisolated: 1
114+
)
115+
foo(
116+
isolated: 1
117+
)
112118

113119
// Keywords used in statements
114120
foo(

0 commit comments

Comments
 (0)