diff --git a/CHANGES.md b/CHANGES.md index ffa143a71e..dde0d94bce 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,11 @@ +## Version 11.6.0 (maybe) + +Grammars: + +- enh(swift) add SE-0335 existential `any` keyword (#3515) [Bradley Mackey][] + +[Bradley Mackey]: https://github.com/bradleymackey + ## Version 11.5.0 Themes: diff --git a/src/languages/lib/kws_swift.js b/src/languages/lib/kws_swift.js index be06394ba8..ff53f648a0 100644 --- a/src/languages/lib/kws_swift.js +++ b/src/languages/lib/kws_swift.js @@ -33,6 +33,7 @@ export const keywords = [ // will result in additional modes being created to scan for those keywords to // avoid conflicts with other rules 'actor', + 'any', // contextual 'associatedtype', 'async', 'await', diff --git a/test/markup/swift/types.expect.txt b/test/markup/swift/types.expect.txt index 4bd3695140..9e604fbdb1 100644 --- a/test/markup/swift/types.expect.txt +++ b/test/markup/swift/types.expect.txt @@ -33,6 +33,7 @@ // Functions (@escaping (String) -> Void, @autoclosure () -> String) -> String (Int, String...) -> some Collection +(Int, String...) -> any SomeProtocol () throws -> Self // Generic arguments diff --git a/test/markup/swift/types.txt b/test/markup/swift/types.txt index 89a27ea6a9..fb1c5aca0c 100644 --- a/test/markup/swift/types.txt +++ b/test/markup/swift/types.txt @@ -33,6 +33,7 @@ Swift.Array.Element // Functions (@escaping (String) -> Void, @autoclosure () -> String) -> String (Int, String...) -> some Collection +(Int, String...) -> any SomeProtocol () throws -> Self // Generic arguments