Skip to content

Commit 90686cb

Browse files
committed
Add some keyword of Swift 5.1
1 parent bd5b2cb commit 90686cb

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

swift-mode-font-lock.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ Return nil otherwise."
538538
(defconst swift-mode:declaration-keywords
539539
'("associatedtype" "class" "deinit" "enum" "extension" "fileprivate" "func"
540540
"import" "init" "inout" "internal" "let" "open" "operator" "private"
541-
"protocol" "public" "static" "struct" "subscript" "typealias" "var")
541+
"protocol" "public" "some" "static" "struct" "subscript" "typealias" "var")
542542
"Keywords used in declarations.")
543543

544544
(defconst swift-mode:statement-keywords

swift-mode-lexer.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,9 @@ Return nil otherwise." ;; FIXME pound-count
416416
;; Suppress implicit semicolon around keywords that cannot start or end
417417
;; statements.
418418
(member (swift-mode:token:text previous-token)
419-
'("inout" "throws" "rethrows" "in" "where"))
419+
'("some" "inout" "throws" "rethrows" "in" "where"))
420420
(member (swift-mode:token:text next-token)
421-
'("inout" "throws" "rethrows" "in" "where")))
421+
'("some" "inout" "throws" "rethrows" "in" "where")))
422422
nil)
423423

424424
;; Inserts semicolon before open curly bracket.

test/swift-files/indent/identifiers.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ func foo() {
103103
foo(
104104
var: 1
105105
)
106+
foo(
107+
some: 1
108+
)
106109

107110
// Keywords used in statements
108111
foo(

0 commit comments

Comments
 (0)