8000 Add `package` modifier · swift-emacs/swift-mode@6b19157 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b19157

Browse files
committed
1 parent 6194d95 commit 6b19157

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

swift-mode-font-lock.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,9 @@ Return nil otherwise."
522522

523523
(defconst swift-mode:declaration-keywords
524524
'("associatedtype" "class" "deinit" "enum" "extension" "fileprivate" "func"
525-
"import" "init" "inout" "internal" "let" "open" "operator" "private"
526-
"protocol" "public" "any" "some" "static" "struct" "subscript" "typealias"
527-
"var" "actor" "nonisolated" "isolated" "distributed"
525+
"import" "init" "inout" "internal" "let" "open" "operator" "package"
526+
"private" "protocol" "public" "any" "some" "static" "struct" "subscript"
527+
"typealias" "var" "actor" "nonisolated" "isolated" "distributed"
528528
"borrowing" "consuming")
529529
"Keywords used in declarations.")
530530

swift-mode-lexer.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ return non-nil."
669669
'("indirect" "convenience" "dynamic" "final" "infix" "lazy"
670670
"mutating" "nonmutating" "optional" "override" "postfix"
671671
"prefix" "required" "static" "unowned" "weak" "internal"
672-
"private" "public" "open" "fileprivate" "nonisolated"
672+
"package" "private" "public" "open" "fileprivate" "nonisolated"
673673
"distributed"))
674674
nil)
675675

@@ -703,7 +703,7 @@ return non-nil."
703703
'("indirect" "convenience" "dynamic" "final" "infix" "lazy"
704704
"mutating" "nonmutating" "optional" "override" "postfix"
705705
"prefix" "required" "static" "unowned" "weak" "internal"
706-
"private" "public" "open" "fileprivate" "nonisolated"
706+
"package" "private" "public" "open" "fileprivate" "nonisolated"
707707
"distributed"))
708708
t)
709709

test/swift-files/indent/declarations.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,10 @@ class Foo {
760760
subscript(foo: Int) -> Int {
761761
return foo
762762
}
763+
764+
package
765+
func foo() {
766+
}
763767
}
764768

765769
// async let

test/swift-files/indent/identifiers.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ func foo() {
9494
foo(
9595
public: 1
9696
)
97+
foo(
98+
package: 1
99+
)
97100
foo(
98101
static: 1
99102
)

0 commit comments

Comments
 (0)
0