2 lines
95 KiB
JavaScript
Raw Permalink Normal View History

2025-09-05 14:59:21 +08:00
const e=Object.freeze(JSON.parse('{"displayName":"Swift","name":"swift","patterns":[{"include":"#root"}],"repository":{"async-throws":{"captures":{"1":{"name":"invalid.illegal.await-must-precede-throws.swift"},"2":{"name":"storage.modifier.exception.swift"},"3":{"name":"storage.modifier.async.swift"}},"match":"\\\\b(?:(throws\\\\s+async|rethrows\\\\s+async)|(throws|rethrows)|(async))\\\\b"},"attributes":{"patterns":[{"begin":"((@)available)(\\\\()","beginCaptures":{"1":{"name":"storage.modifier.attribute.swift"},"2":{"name":"punctuation.definition.attribute.swift"},"3":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.attribute.available.swift","patterns":[{"captures":{"1":{"name":"keyword.other.platform.os.swift"},"2":{"name":"constant.numeric.swift"}},"match":"\\\\b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\\\\b(?:\\\\s+(\\\\d+(?:\\\\.\\\\d+)*\\\\b))?"},{"begin":"\\\\b(introduced|deprecated|obsoleted)\\\\s*(:)\\\\s*","beginCaptures":{"1":{"name":"keyword.other.swift"},"2":{"name":"punctuation.separator.key-value.swift"}},"end":"(?!\\\\G)","patterns":[{"match":"\\\\b\\\\d+(?:\\\\.\\\\d+)*\\\\b","name":"constant.numeric.swift"}]},{"begin":"\\\\b(message|renamed)\\\\s*(:)\\\\s*(?=\\")","beginCaptures":{"1":{"name":"keyword.other.swift"},"2":{"name":"punctuation.separator.key-value.swift"}},"end":"(?!\\\\G)","patterns":[{"include":"#literals"}]},{"captures":{"1":{"name":"keyword.other.platform.all.swift"},"2":{"name":"keyword.other.swift"},"3":{"name":"invalid.illegal.character-not-allowed-here.swift"}},"match":"(?:(\\\\*)|\\\\b(deprecated|unavailable|noasync)\\\\b)\\\\s*(.*?)(?=[,)])"}]},{"begin":"((@)objc)(\\\\()","beginCaptures":{"1":{"name":"storage.modifier.attribute.swift"},"2":{"name":"punctuation.definition.attribute.swift"},"3":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.attribute.objc.swift","patterns":[{"captures":{"1":{"name":"invalid.illegal.missing-colon-after-selector-piece.swift"}},"match":"\\\\w*(?::(?:\\\\w*:)*(\\\\w*))?","name":"entity.name.function.swift"}]},{"begin":"(@)(?<q>`?)[\\\\p{L}_][\\\\p{L}_\\\\p{N}\\\\p{M}]*(\\\\k<q>)","beginCaptures":{"0":{"name":"storage.modifier.attribute.swift"},"1":{"name":"punctuation.definition.attribute.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"comment":"any other attribute","end":"(?!\\\\G\\\\()","name":"meta.attribute.swift","patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.arguments.attribute.swift","patterns":[{"include":"#expressions"}]}]}]},"builtin-functions":{"patterns":[{"comment":"Member functions in the standard library in Swift 3 which may be used with trailing closures and no parentheses","match":"(?<=\\\\.)(?:s(?:ort(?:ed)?|plit)|contains|index|partition|f(?:i(?:lter|rst)|orEach|latMap)|with(?:MutableCharacters|CString|U(?:nsafe(?:Mutable(?:BufferPointer|Pointer(?:s|To(?:Header|Elements)))|BufferPointer)|TF8Buffer))|m(?:in|a(?:p|x)))(?=\\\\s*[({])\\\\b","name":"support.function.swift"},{"comment":"Member functions in the standard library in Swift 3","match":"(?<=\\\\.)(?:s(?:ymmetricDifference|t(?:oreBytes|arts|ride)|ortInPlace|u(?:ccessor|ffix|btract(?:ing|InPlace|WithOverflow)?)|quareRoot|amePosition)|h(?:oldsUnique(?:Reference|OrPinnedReference)|as(?:Suffix|Prefix))|ne(?:gate(?:d)?|xt)|c(?:o(?:untByEnumerating|py(?:Bytes)?)|lamp(?:ed)?|reate)|t(?:o(?:IntMax|Opaque|UIntMax)|ake(?:RetainedValue|UnretainedValue)|r(?:uncatingRemainder|a(?:nscodedLength|ilSurrogate)))|i(?:s(?:MutableAndUniquelyReferenced(?:OrPinned)?|S(?:trictSu(?:perset(?:Of)?|bset(?:Of)?)|u(?:perset(?:Of)?|bset(?:Of)?))|Continuation|T(?:otallyOrdered|railSurrogate)|Disjoint(?:With)?|Unique(?:Refer