branch: elpa/swift-mode commit da673f995fac844a3584efdaa3ea76cb9ebfb9a8 Author: taku0 <mxxouy6x3m_git...@tatapa.org> Commit: taku0 <mxxouy6x3m_git...@tatapa.org>
Support distributed actor https://github.com/apple/swift-evolution/blob/main/proposals/0336-distributed-actor-isolation.md --- swift-mode-font-lock.el | 2 +- swift-mode-lexer.el | 6 ++++-- test/swift-files/indent/declarations.swift | 22 ++++++++++++++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/swift-mode-font-lock.el b/swift-mode-font-lock.el index c737f76c2e..15dcb4e652 100644 --- a/swift-mode-font-lock.el +++ b/swift-mode-font-lock.el @@ -543,7 +543,7 @@ Return nil otherwise." '("associatedtype" "class" "deinit" "enum" "extension" "fileprivate" "func" "import" "init" "inout" "internal" "let" "open" "operator" "private" "protocol" "public" "any" "some" "static" "struct" "subscript" "typealias" - "var" "actor" "nonisolated" "isolated") + "var" "actor" "nonisolated" "isolated" "distributed") "Keywords used in declarations.") (defconst swift-mode:statement-keywords diff --git a/swift-mode-lexer.el b/swift-mode-lexer.el index 9d25ab34f5..2caf5eb608 100644 --- a/swift-mode-lexer.el +++ b/swift-mode-lexer.el @@ -484,7 +484,8 @@ Return nil otherwise." '("indirect" "convenience" "dynamic" "final" "infix" "lazy" "mutating" "nonmutating" "optional" "override" "postfix" "prefix" "required" "static" "unowned" "weak" "internal" - "private" "public" "open" "fileprivate" "nonisolated")) + "private" "public" "open" "fileprivate" "nonisolated" + "distributed")) nil) ;; internal(set) private(set) public(set) open(set) fileprivate(set) @@ -517,7 +518,8 @@ Return nil otherwise." '("indirect" "convenience" "dynamic" "final" "infix" "lazy" "mutating" "nonmutating" "optional" "override" "postfix" "prefix" "required" "static" "unowned" "weak" "internal" - "private" "public" "open" "fileprivate" "nonisolated")) + "private" "public" "open" "fileprivate" "nonisolated" + "distributed")) t) ;; Inserts implicit semicolon around keywords that forms single keyword diff --git a/test/swift-files/indent/declarations.swift b/test/swift-files/indent/declarations.swift index 41a13165e6..f0dae56b6d 100644 --- a/test/swift-files/indent/declarations.swift +++ b/test/swift-files/indent/declarations.swift @@ -627,6 +627,28 @@ fileprivate func foo() } +@A +distributed + actor + Foo { + distributed + func + foo() { + } + + distributed + func + foo() { + } + + distributed + var + foo + : + Int { + } +} + // Protocol declarations