diff --git a/Swift.tmLanguage.json b/Swift.tmLanguage.json index cc0d07b..4e8bdd2 100644 --- a/Swift.tmLanguage.json +++ b/Swift.tmLanguage.json @@ -36,7 +36,7 @@ }, "patterns": [ { - "match": "\\b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))?", + "match": "\\b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))?", "captures": { "1": { "name": "keyword.other.platform.os.swift" }, "2": { "name": "constant.numeric.swift" } @@ -465,7 +465,7 @@ }, { - "match": "\\b(os)\\s*(\\()\\s*(?:(macOS|OSX|iOS|tvOS|watchOS|Android|Linux|FreeBSD|Windows|PS4)|\\w+)\\s*(\\))", + "match": "\\b(os)\\s*(\\()\\s*(?:(macOS|OSX|iOS|tvOS|watchOS|visionOS|Android|Linux|FreeBSD|Windows|PS4)|\\w+)\\s*(\\))", "captures": { "1": { "name": "keyword.other.condition.swift" }, "2": { "name": "punctuation.definition.parameters.begin.swift" }, @@ -1848,7 +1848,7 @@ }, "patterns": [ { - "match": "\\s*\\b((?:iOS|macOS|OSX|watchOS|tvOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))", + "match": "\\s*\\b((?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))", "captures": { "1": { "name": "keyword.other.platform.os.swift" }, "2": { "name": "constant.numeric.swift" } diff --git a/Swift.tmLanguage.yaml b/Swift.tmLanguage.yaml index ef64b8f..a58f9be 100644 --- a/Swift.tmLanguage.yaml +++ b/Swift.tmLanguage.yaml @@ -29,7 +29,7 @@ repository: endCaptures: 0: { name: punctuation.definition.arguments.end.swift } patterns: - - match: \b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|UIKitForMac)(?:ApplicationExtension)?)\b(?:\s+([0-9]+(?:\.[0-9]+)*\b))? + - match: \b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\b(?:\s+([0-9]+(?:\.[0-9]+)*\b))? captures: 1: { name: keyword.other.platform.os.swift } 2: { name: constant.numeric.swift } @@ -325,7 +325,7 @@ repository: 3: { name: support.constant.platform.architecture.swift } 4: { name: punctuation.definition.parameters.end.swift } - - match: \b(os)\s*(\()\s*(?:(macOS|OSX|iOS|tvOS|watchOS|Android|Linux|FreeBSD|Windows|PS4)|\w+)\s*(\)) + - match: \b(os)\s*(\()\s*(?:(macOS|OSX|iOS|tvOS|watchOS|visionOS|Android|Linux|FreeBSD|Windows|PS4)|\w+)\s*(\)) captures: 1: { name: keyword.other.condition.swift } 2: { name: punctuation.definition.parameters.begin.swift } @@ -1514,7 +1514,7 @@ repository: endCaptures: 0: { name: punctuation.definition.arguments.end.swift } patterns: - - match: \s*\b((?:iOS|macOS|OSX|watchOS|tvOS|UIKitForMac)(?:ApplicationExtension)?)\b(?:\s+([0-9]+(?:\.[0-9]+)*\b)) + - match: \s*\b((?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\b(?:\s+([0-9]+(?:\.[0-9]+)*\b)) captures: 1: { name: keyword.other.platform.os.swift } 2: { name: constant.numeric.swift } diff --git a/Syntaxes/Swift.tmLanguage b/Syntaxes/Swift.tmLanguage index 21eef45..d8188fd 100644 --- a/Syntaxes/Swift.tmLanguage +++ b/Syntaxes/Swift.tmLanguage @@ -91,7 +91,7 @@ match - \b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|UIKitForMac)(?:ApplicationExtension)?)\b(?:\s+([0-9]+(?:\.[0-9]+)*\b))? + \b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\b(?:\s+([0-9]+(?:\.[0-9]+)*\b))? captures 1 @@ -919,7 +919,7 @@ match - \b(os)\s*(\()\s*(?:(macOS|OSX|iOS|tvOS|watchOS|Android|Linux|FreeBSD|Windows|PS4)|\w+)\s*(\)) + \b(os)\s*(\()\s*(?:(macOS|OSX|iOS|tvOS|watchOS|visionOS|Android|Linux|FreeBSD|Windows|PS4)|\w+)\s*(\)) captures 1 @@ -4168,7 +4168,7 @@ match - \s*\b((?:iOS|macOS|OSX|watchOS|tvOS|UIKitForMac)(?:ApplicationExtension)?)\b(?:\s+([0-9]+(?:\.[0-9]+)*\b)) + \s*\b((?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\b(?:\s+([0-9]+(?:\.[0-9]+)*\b)) captures 1 diff --git a/grammar-test.swift b/grammar-test.swift index 80c2292..4afb2cd 100644 --- a/grammar-test.swift +++ b/grammar-test.swift @@ -34,7 +34,7 @@ __FILE__, __LINE__, __FUNCTION__, __DSO_HANDLE__ // MARK: Attributes @available( - macOS 1.2, macOSApplicationExtension 1.2, OSX, tvOS 1.4, iOS, watchOS, + macOS 1.2, macOSApplicationExtension 1.2, OSX, tvOS 1.4, iOS, watchOS, visionOS, swift 5, UIKitForMac, noasync, introduced, introduced: 1,