tm-grammars 1.22.6 → 1.22.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE CHANGED
@@ -984,7 +984,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
984
984
  SOFTWARE.
985
985
 
986
986
  =========================================================================================================
987
- Files: angular-ts.json, bat.json, bibtex.json, c.json, clojure.json, coffee.json, cpp.json, cpp-macro.json, csharp.json, css.json, dart.json, diff.json, docker.json, fsharp.json, git-commit.json, git-rebase.json, go.json, groovy.json, handlebars.json, hlsl.json, html.json, html-derivative.json, ini.json, java.json, javascript.json, json.json, jsonc.json, jsonl.json, jsx.json, julia.json, latex.json, less.json, lua.json, make.json, markdown.json, objective-c.json, objective-cpp.json, perl.json, php.json, powershell.json, pug.json, python.json, r.json, raku.json, rst.json, ruby.json, rust.json, scss.json, shaderlab.json, shellscript.json, sql.json, swift.json, tex.json, tsx.json, typescript.json, vb.json, xml.json, xsl.json
987
+ Files: angular-ts.json, bat.json, bibtex.json, c.json, clojure.json, coffee.json, cpp.json, cpp-macro.json, csharp.json, css.json, dart.json, diff.json, docker.json, fsharp.json, git-commit.json, git-rebase.json, go.json, groovy.json, handlebars.json, hlsl.json, html.json, html-derivative.json, ini.json, java.json, javascript.json, json.json, jsonc.json, jsonl.json, jsx.json, julia.json, latex.json, less.json, lua.json, make.json, markdown.json, objective-c.json, objective-cpp.json, perl.json, php.json, powershell.json, pug.json, python.json, r.json, raku.json, rst.json, ruby.json, rust.json, scss.json, shaderlab.json, shellscript.json, sql.json, tex.json, tsx.json, typescript.json, vb.json, xml.json, xsl.json
988
988
  License: https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt
989
989
  SPDX: MIT
990
990
  ---------------------------------------------------------------------------------------------------------
@@ -8333,6 +8333,19 @@ The above copyright notice and this permission notice shall be included in all c
8333
8333
 
8334
8334
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8335
8335
 
8336
+ =========================================================================================================
8337
+ Files: swift.json
8338
+ License: https://raw.githubusercontent.com/jtbandes/swift-tmlanguage/main/LICENSE.md
8339
+ SPDX: MIT
8340
+ ---------------------------------------------------------------------------------------------------------
8341
+ Copyright 2023 Jacob Bandes-Storch
8342
+
8343
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8344
+
8345
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8346
+
8347
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8348
+
8336
8349
  =========================================================================================================
8337
8350
  Files: system-verilog.json, verilog.json
8338
8351
  License: https://raw.githubusercontent.com/mshr-h/vscode-verilog-hdl-support/main/LICENSE
package/README.md CHANGED
@@ -48,7 +48,7 @@ import { grammars } from 'tm-grammars'
48
48
  | `clarity` | | [hirosystems/clarity.tmbundle](https://github.com/hirosystems/clarity.tmbundle/blob/52508cc05304780d80a5dc817fcc35c6760c5459/Syntaxes/clarity.JSON-tmLanguage) | [MIT](https://raw.githubusercontent.com/hirosystems/clarity.tmbundle/main/LICENSE) | | 13.64 kB |
49
49
  | `clojure` | `clj` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/a1a4c0a63b1ad59e84f54b874744fe35dea9abe1/extensions/clojure/syntaxes/clojure.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 6.36 kB |
50
50
  | `cmake` | | [twxs/vs.language.cmake](https://github.com/twxs/vs.language.cmake/blob/19b1b8fe2d68d72cf294d0c3c22f0a3fc54f8f6f/syntaxes/CMake.tmLanguage) | [MIT](https://raw.githubusercontent.com/twxs/vs.language.cmake/master/LICENSE) | | 10.00 kB |
51
- | `cobol` | | [spgennard/vscode_cobol](https://github.com/spgennard/vscode_cobol/blob/627c3ea9e330666c24e0723cec7b9553447ab45b/syntaxes/COBOL.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/spgennard/vscode_cobol/main/LICENSE) | `html` `java` | 38.39 kB |
51
+ | `cobol` | | [spgennard/vscode_cobol](https://github.com/spgennard/vscode_cobol/blob/dc60eb00faf728138ead0ea66581e406c6465652/syntaxes/COBOL.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/spgennard/vscode_cobol/main/LICENSE) | `html` `java` | 38.39 kB |
52
52
  | `codeowners` | | [jasonnutter/vscode-codeowners](https://github.com/jasonnutter/vscode-codeowners/blob/219dee0ab25c1bfad0b9de84180117e71221a653/syntaxes/codeowners.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/jasonnutter/vscode-codeowners/master/LICENSE.txt) | | 471.00 B |
53
53
  | `codeql` | `ql` | [github/vscode-codeql](https://github.com/github/vscode-codeql/blob/47fa163cb9fffce379458962eb391c9ef9082dcb/syntaxes/ql.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/github/vscode-codeql/main/LICENSE.md) | | 31.84 kB |
54
54
  | `coffee` | `coffeescript` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/ff58f5083f57b50e6a100ab60454dfb72fe21e80/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | `javascript` | 26.11 kB |
@@ -174,7 +174,7 @@ import { grammars } from 'tm-grammars'
174
174
  | `r` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/e67b1982e1ab318288b8196ad503273dcb168049/extensions/r/syntaxes/r.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 33.72 kB |
175
175
  | `racket` | | [Eugleo/magic-racket](https://github.com/Eugleo/magic-racket/blob/6a4d9934b3ec523162ab0243b5cb0e785316507a/syntaxes/racket.tmLanguage.json) | [GPL-3.0](https://raw.githubusercontent.com/Eugleo/magic-racket/master/LICENSE) | | 91.39 kB |
176
176
  | `raku` | `perl6` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/8fdf170a0850c1cc027382f31650aaf300d3ae2a/extensions/perl/syntaxes/perl6.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 10.05 kB |
177
- | `razor` | | [dotnet/razor](https://github.com/dotnet/razor/blob/39159764277f3c80a786d8872eba7730da3d7ef0/src/Razor/src/Microsoft.VisualStudio.RazorExtension/EmbeddedGrammars/aspnetcorerazor.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/dotnet/razor/main/LICENSE.txt) | `html` `csharp` | 24.41 kB |
177
+ | `razor` | | [dotnet/razor](https://github.com/dotnet/razor/blob/9b1e979b6c3fe7cfbe30f595b9b0994d20bd482c/src/Razor/src/Microsoft.VisualStudio.RazorExtension/EmbeddedGrammars/aspnetcorerazor.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/dotnet/razor/main/LICENSE.txt) | `html` `csharp` | 24.44 kB |
178
178
  | `reg` | | [mihai-vlc/reg-vscode](https://github.com/mihai-vlc/reg-vscode/blob/896096fc6756329d82c71a913663a1c0ac678f74/syntaxes/reg.tmLanguage) | [MIT](https://raw.githubusercontent.com/mihai-vlc/reg-vscode/master/LICENSE) | | 2.20 kB |
179
179
  | `regexp` | `regex` | [MagicStack/MagicPython](https://github.com/MagicStack/MagicPython/blob/c9b3409deb69acec31bbf7913830e93a046b30cc/grammars/MagicRegExp.tmLanguage) | [MIT](https://raw.githubusercontent.com/MagicStack/MagicPython/master/LICENSE) | | 7.61 kB |
180
180
  | `rel` | | [relationalai-oss/rel_vscode](https://github.com/relationalai-oss/rel_vscode/blob/63dda4dee48c67b037357f47b562185484555ea9/syntaxes/rel.tmLanguage.json) | | | 3.18 kB |
@@ -201,7 +201,7 @@ import { grammars } from 'tm-grammars'
201
201
  | `stata` | | [kylebarron/language-stata](https://github.com/kylebarron/language-stata/blob/dd98de502bc1bf2a205f3f023afb98c7aa5b42ee/grammars/stata.json) | [MIT](https://raw.githubusercontent.com/kylebarron/language-stata/master/LICENSE) | `sql` | 58.06 kB |
202
202
  | `stylus` | `styl` | [d4rkr00t/language-stylus](https://github.com/d4rkr00t/language-stylus/blob/198a851f385aee857332f3ce5dd981ff67720ead/syntaxes/stylus.json) | [MIT](https://raw.githubusercontent.com/d4rkr00t/language-stylus/master/LICENSE) | | 30.11 kB |
203
203
  | `svelte` | | [sveltejs/language-tools](https://github.com/sveltejs/language-tools/blob/02db54de1f2fc44d958d67113a9d0fb41a8f6fe7/packages/svelte-vscode/syntaxes/svelte.tmLanguage.src.yaml) | [MIT](https://raw.githubusercontent.com/sveltejs/language-tools/master/LICENSE) | `javascript` `typescript` `coffee` `stylus` `sass` `css` `scss` `less` `postcss` `pug` `markdown` | 15.92 kB |
204
- | `swift` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/ed4e6eda599f37bac9a11952403a6e63fd4f5a4d/extensions/swift/syntaxes/swift.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 91.25 kB |
204
+ | `swift` | | [jtbandes/swift-tmlanguage](https://github.com/jtbandes/swift-tmlanguage/blob/b8d2889b4af1d8bad41578317a6adade642555a3/Swift.tmLanguage.yaml) | [MIT](https://raw.githubusercontent.com/jtbandes/swift-tmlanguage/main/LICENSE.md) | | 84.97 kB |
205
205
  | `system-verilog` | | [mshr-h/vscode-verilog-hdl-support](https://github.com/mshr-h/vscode-verilog-hdl-support/blob/a63b28cd8f15d9ec4861b2f802e8bf6ce4f6d2f2/syntaxes/systemverilog.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/mshr-h/vscode-verilog-hdl-support/main/LICENSE) | | 24.59 kB |
206
206
  | `systemd` | | [hangxingliu/vscode-systemd](https://github.com/hangxingliu/vscode-systemd/blob/62ace1156b5afa0ec9932e3a55cfc00c0123c457/src/syntax/systemd.tmLanguage) | [MIT](https://raw.githubusercontent.com/hangxingliu/vscode-systemd/main/LICENSE) | | 7.49 kB |
207
207
  | `talonscript` | `talon` | [mrob95/vscode-TalonScript](https://github.com/mrob95/vscode-TalonScript/blob/d422be3703e2b726c3538015bff9015a642eeb3e/syntaxes/talon.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/mrob95/vscode-TalonScript/master/LICENSE) | | 6.29 kB |
@@ -351,7 +351,7 @@
351
351
  },
352
352
  {
353
353
  "match": "(#)([0-9a-zA-Z][a-zA-Z\\-0-9]+)",
354
- "name": "meta.symbol.cobol.forced"
354
+ "name": "meta.symbol.forced.cobol"
355
355
  },
356
356
  {
357
357
  "begin": "((?<![-_a-zA-Z0-9()-])(?i:installation|author|source-computer|object-computer|date-written|security|date-compiled)(\\.|$))",
@@ -1106,7 +1106,7 @@
1106
1106
  "match": "(\\()([0-9]*)(:)([0-9]*)(\\))"
1107
1107
  },
1108
1108
  {
1109
- "match": "([a-zA-Z-0-9_]*[a-zA-Z0-9]|([#]?[0-9a-zA-Z]+[a-zA-Z-0-9_]*[a-zA-Z0-9]))",
1109
+ "match": "([a-zA-Z-0-9-_]*[a-zA-Z0-9]|([#]?[0-9a-zA-Z]+[a-zA-Z-0-9_-]*[a-zA-Z0-9]))",
1110
1110
  "name": "meta.symbol.cobol"
1111
1111
  }
1112
1112
  ],
@@ -1447,6 +1447,9 @@
1447
1447
  {
1448
1448
  "include": "source.cs#switch-label"
1449
1449
  },
1450
+ {
1451
+ "include": "#csharp-code-block"
1452
+ },
1450
1453
  {
1451
1454
  "include": "#razor-codeblock-body"
1452
1455
  }
@@ -1,5 +1,9 @@
1
1
  {
2
2
  "displayName": "Swift",
3
+ "fileTypes": [
4
+ "swift"
5
+ ],
6
+ "firstLineMatch": "^#!/.*\\bswift",
3
7
  "name": "swift",
4
8
  "patterns": [
5
9
  {
@@ -154,7 +158,6 @@
154
158
  "name": "punctuation.definition.identifier.swift"
155
159
  }
156
160
  },
157
- "comment": "any other attribute",
158
161
  "end": "(?!\\G\\()",
159
162
  "name": "meta.attribute.swift",
160
163
  "patterns": [
@@ -185,17 +188,14 @@
185
188
  "builtin-functions": {
186
189
  "patterns": [
187
190
  {
188
- "comment": "Member functions in the standard library in Swift 3 which may be used with trailing closures and no parentheses",
189
191
  "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",
190
192
  "name": "support.function.swift"
191
193
  },
192
194
  {
193
- "comment": "Member functions in the standard library in Swift 3",
194
195
  "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(?:Reference|lyReferenced(?:OrPinned)?)|Equal|Le(?:ss(?:ThanOrEqualTo)?|adSurrogate))|n(?:sert(?:ContentsOf)?|tersect(?:ion|InPlace)?|itialize(?:Memory|From)?|dex(?:Of|ForKey)))|o(?:verlaps|bjectAt)|d(?:i(?:stance(?:To)?|vide(?:d|WithOverflow)?)|e(?:s(?:cendant|troy)|code(?:CString)?|initialize|alloc(?:ate(?:Capacity)?)?)|rop(?:First|Last))|u(?:n(?:ion(?:InPlace)?|derestimateCount|wrappedOrError)|p(?:date(?:Value)?|percased))|join(?:ed|WithSeparator)|p(?:op(?:First|Last)|ass(?:Retained|Unretained)|re(?:decessor|fix))|e(?:scape(?:d)?|n(?:code|umerate(?:d)?)|lementsEqual|xclusiveOr(?:InPlace)?)|f(?:orm(?:Remainder|S(?:ymmetricDifference|quareRoot)|TruncatingRemainder|In(?:tersection|dex)|Union)|latten|rom(?:CString(?:RepairingIllFormedUTF8)?|Opaque))|w(?:i(?:thMemoryRebound|dth)|rite(?:To)?)|l(?:o(?:wercased|ad)|e(?:adSurrogate|xicographical(?:Compare|lyPrecedes)))|a(?:ss(?:ign(?:BackwardFrom|From)?|umingMemoryBound)|d(?:d(?:ing(?:Product)?|Product|WithOverflow)?|vanced(?:By)?)|utorelease|ppend(?:ContentsOf)?|lloc(?:ate)?|bs)|r(?:ound(?:ed)?|e(?:serveCapacity|tain|duce|place(?:Range|Subrange)?|verse(?:d)?|quest(?:NativeBuffer|UniqueMutableBackingBuffer)|lease|m(?:ove(?:Range|Subrange|Value(?:ForKey)?|First|Last|A(?:tIndex|ll))?|ainder(?:WithOverflow)?)))|ge(?:nerate|t(?:Objects|Element))|m(?:in(?:imum(?:Magnitude)?|Element)|ove(?:Initialize(?:Memory|BackwardFrom|From)?|Assign(?:From)?)?|ultipl(?:y(?:WithOverflow)?|ied)|easure|a(?:ke(?:Iterator|Description)|x(?:imum(?:Magnitude)?|Element)))|bindMemory)(?=\\s*\\()",
195
196
  "name": "support.function.swift"
196
197
  },
197
198
  {
198
- "comment": "Member functions in the standard library in Swift 2 only",
199
199
  "match": "(?<=\\.)(?:s(?:uperclassMirror|amePositionIn|tartsWith)|nextObject|c(?:haracterAtIndex|o(?:untByEnumeratingWithState|pyWithZone)|ustom(?:Mirror|PlaygroundQuickLook))|is(?:EmptyInput|ASCII)|object(?:Enumerator|ForKey|AtIndex)|join|put|keyEnumerator|withUnsafeMutablePointerToValue|length|getMirror|m(?:oveInitializeAssignFrom|ember))(?=\\s*\\()",
200
200
  "name": "support.function.swift"
201
201
  }
@@ -232,17 +232,14 @@
232
232
  ]
233
233
  },
234
234
  {
235
- "comment": "Global functions available in Swift 3 which may be used with trailing closures and no parentheses",
236
235
  "match": "\\b(?:anyGenerator|autoreleasepool)(?=\\s*[({])\\b",
237
236
  "name": "support.function.swift"
238
237
  },
239
238
  {
240
- "comment": "Global functions available in Swift 3",
241
239
  "match": "\\b(?:s(?:tride(?:of(?:Value)?)?|izeof(?:Value)?|equence|wap)|numericCast|transcode|is(?:UniquelyReferenced(?:NonObjC)?|KnownUniquelyReferenced)|zip|d(?:ump|ebugPrint)|unsafe(?:BitCast|Downcast|Unwrap|Address(?:Of)?)|pr(?:int|econdition(?:Failure)?)|fatalError|with(?:Unsafe(?:MutablePointer|Pointer)|ExtendedLifetime|VaList)|a(?:ssert(?:ionFailure)?|lignof(?:Value)?|bs)|re(?:peatElement|adLine)|getVaList|m(?:in|ax))(?=\\s*\\()",
242
240
  "name": "support.function.swift"
243
241
  },
244
242
  {
245
- "comment": "Global functions available in Swift 2 only",
246
243
  "match": "\\b(?:s(?:ort|uffix|pli(?:ce|t))|insert|overlaps|d(?:istance|rop(?:First|Last))|join|prefix|extend|withUnsafe(?:MutablePointers|Pointers)|lazy|advance|re(?:flect|move(?:Range|Last|A(?:tIndex|ll))))(?=\\s*\\()",
247
244
  "name": "support.function.swift"
248
245
  }
@@ -251,29 +248,24 @@
251
248
  "builtin-properties": {
252
249
  "patterns": [
253
250
  {
254
- "comment": "The simpler (?<=\\bProcess\\.|\\bCommandLine\\.) breaks VS Code / Atom, see https://github.com/textmate/swift.tmbundle/issues/29",
255
251
  "match": "(?<=^Process\\.|\\WProcess\\.|^CommandLine\\.|\\WCommandLine\\.)(arguments|argc|unsafeArgv)",
256
252
  "name": "support.variable.swift"
257
253
  },
258
254
  {
259
- "comment": "Properties in the standard library in Swift 3",
260
255
  "match": "(?<=\\.)(?:s(?:t(?:artIndex|ri(?:ngValue|de))|i(?:ze|gn(?:BitIndex|ificand(?:Bit(?:Count|Pattern)|Width)?|alingNaN)?)|u(?:perclassMirror|mmary|bscriptBaseAddress))|h(?:eader|as(?:hValue|PointerRepresentation))|n(?:ulTerminatedUTF8|ext(?:Down|Up)|a(?:n|tiveOwner))|c(?:haracters|ount(?:TrailingZeros)?|ustom(?:Mirror|PlaygroundQuickLook)|apacity)|i(?:s(?:S(?:ign(?:Minus|aling(?:NaN)?)|ubnormal)|N(?:ormal|aN)|Canonical|Infinite|Zero|Empty|Finite|ASCII)|n(?:dices|finity)|dentity)|owner|de(?:scription|bugDescription)|u(?:n(?:safelyUnwrapped|icodeScalar(?:s)?|derestimatedCount)|tf(?:16|8(?:Start|C(?:String|odeUnitCount))?)|intValue|ppercaseString|lp(?:OfOne)?)|p(?:i|ointee)|e(?:ndIndex|lements|xponent(?:Bit(?:Count|Pattern))?)|value(?:s)?|keys|quietNaN|f(?:irst(?:ElementAddress(?:IfContiguous)?)?|loatingPointClass)|l(?:ittleEndian|owercaseString|eastNo(?:nzeroMagnitude|rmalMagnitude)|a(?:st|zy))|a(?:l(?:ignment|l(?:ocatedElementCount|Zeros))|rray(?:PropertyIsNativeTypeChecked)?)|ra(?:dix|wValue)|greatestFiniteMagnitude|m(?:in|emory|ax)|b(?:yteS(?:ize|wapped)|i(?:nade|tPattern|gEndian)|uffer|ase(?:Address)?))\\b",
261
256
  "name": "support.variable.swift"
262
257
  },
263
258
  {
264
- "comment": "Properties in the standard library in Swift 2 only",
265
259
  "match": "(?<=\\.)(?:boolValue|disposition|end|objectIdentifier|quickLookObject|start|valueType)\\b",
266
260
  "name": "support.variable.swift"
267
261
  },
268
262
  {
269
- "comment": "Enum cases in the standard library - note that there is some overlap between these and the properties",
270
263
  "match": "(?<=\\.)(?:s(?:calarValue|i(?:ze|gnalingNaN)|o(?:und|me)|uppressed|prite|et)|n(?:one|egative(?:Subnormal|Normal|Infinity|Zero))|c(?:ol(?:or|lection)|ustomized)|t(?:o(?:NearestOr(?:Even|AwayFromZero)|wardZero)|uple|ext)|i(?:nt|mage)|optional|d(?:ictionary|o(?:uble|wn))|u(?:Int|p|rl)|p(?:o(?:sitive(?:Subnormal|Normal|Infinity|Zero)|int)|lus)|e(?:rror|mptyInput)|view|quietNaN|float|a(?:ttributedString|wayFromZero)|r(?:ectangle|ange)|generated|minus|b(?:ool|ezierPath))\\b",
271
264
  "name": "support.variable.swift"
272
265
  }
273
266
  ]
274
267
  },
275
268
  "builtin-types": {
276
- "comment": "Types provided in the standard library",
277
269
  "patterns": [
278
270
  {
279
271
  "include": "#builtin-types-builtin-class-type"
@@ -297,29 +289,24 @@
297
289
  ]
298
290
  },
299
291
  "builtin-types-builtin-class-type": {
300
- "comment": "Builtin class types",
301
292
  "match": "\\b(Managed(Buffer|ProtoBuffer)|NonObjectiveCBase|AnyGenerator)\\b",
302
293
  "name": "support.class.swift"
303
294
  },
304
295
  "builtin-types-builtin-enum-type": {
305
296
  "patterns": [
306
297
  {
307
- "comment": "CommandLine is an enum, but it acts like a constant",
308
298
  "match": "\\b(?:CommandLine|Process(?=\\.))\\b",
309
299
  "name": "support.constant.swift"
310
300
  },
311
301
  {
312
- "comment": "The return type of a function that never returns",
313
302
  "match": "\\bNever\\b",
314
303
  "name": "support.constant.never.swift"
315
304
  },
316
305
  {
317
- "comment": "Enum types in the standard library in Swift 3",
318
306
  "match": "\\b(?:ImplicitlyUnwrappedOptional|Representation|MemoryLayout|FloatingPointClassification|SetIndexRepresentation|SetIteratorRepresentation|FloatingPointRoundingRule|UnicodeDecodingResult|Optional|DictionaryIndexRepresentation|AncestorRepresentation|DisplayStyle|PlaygroundQuickLook|Never|FloatingPointSign|Bit|DictionaryIteratorRepresentation)\\b",
319
307
  "name": "support.type.swift"
320
308
  },
321
309
  {
322
- "comment": "Enum types in the standard library in Swift 2 only",
323
310
  "match": "\\b(?:MirrorDisposition|QuickLookObject)\\b",
324
311
  "name": "support.type.swift"
325
312
  }
@@ -328,12 +315,10 @@
328
315
  "builtin-types-builtin-protocol-type": {
329
316
  "patterns": [
330
317
  {
331
- "comment": "Protocols in the standard library in Swift 3",
332
318
  "match": "\\b(?:Ra(?:n(?:domAccess(?:Collection|Indexable)|geReplaceable(?:Collection|Indexable))|wRepresentable)|M(?:irrorPath|utable(?:Collection|Indexable))|Bi(?:naryFloatingPoint|twiseOperations|directional(?:Collection|Indexable))|S(?:tr(?:ideable|eamable)|igned(?:Number|Integer)|e(?:tAlgebra|quence))|Hashable|C(?:o(?:llection|mparable)|ustom(?:Reflectable|StringConvertible|DebugStringConvertible|PlaygroundQuickLookable|LeafReflectable)|VarArg)|TextOutputStream|I(?:n(?:teger(?:Arithmetic)?|dexable(?:Base)?)|teratorProtocol)|OptionSet|Un(?:signedInteger|icodeCodec)|E(?:quatable|rror|xpressibleBy(?:BooleanLiteral|String(?:Interpolation|Literal)|NilLiteral|IntegerLiteral|DictionaryLiteral|UnicodeScalarLiteral|ExtendedGraphemeClusterLiteral|FloatLiteral|ArrayLiteral))|FloatingPoint|L(?:osslessStringConvertible|azy(?:SequenceProtocol|CollectionProtocol))|A(?:nyObject|bsoluteValuable))\\b",
333
319
  "name": "support.type.swift"
334
320
  },
335
321
  {
336
- "comment": "Protocols in the standard library in Swift 2 only",
337
322
  "match": "\\b(?:Ran(?:domAccessIndexType|geReplaceableCollectionType)|GeneratorType|M(?:irror(?:Type|PathType)|utable(?:Sliceable|CollectionType))|B(?:i(?:twiseOperationsType|directionalIndexType)|oolean(?:Type|LiteralConvertible))|S(?:tring(?:InterpolationConvertible|LiteralConvertible)|i(?:nkType|gned(?:NumberType|IntegerType))|e(?:tAlgebraType|quenceType)|liceable)|NilLiteralConvertible|C(?:ollectionType|VarArgType)|Inte(?:rvalType|ger(?:Type|LiteralConvertible|ArithmeticType))|O(?:utputStreamType|ptionSetType)|DictionaryLiteralConvertible|Un(?:signedIntegerType|icode(?:ScalarLiteralConvertible|CodecType))|E(?:rrorType|xten(?:sibleCollectionType|dedGraphemeClusterLiteralConvertible))|F(?:orwardIndexType|loat(?:ingPointType|LiteralConvertible))|A(?:nyCollectionType|rrayLiteralConvertible))\\b",
338
323
  "name": "support.type.swift"
339
324
  }
@@ -342,12 +327,10 @@
342
327
  "builtin-types-builtin-struct-type": {
343
328
  "patterns": [
344
329
  {
345
- "comment": "Structs in the standard library in Swift 3",
346
330
  "match": "\\b(?:R(?:e(?:peat(?:ed)?|versed(?:RandomAccess(?:Collection|Index)|Collection|Index))|an(?:domAccessSlice|ge(?:Replaceable(?:RandomAccessSlice|BidirectionalSlice|Slice)|Generator)?))|Generator(?:Sequence|OfOne)|M(?:irror|utable(?:Ran(?:domAccessSlice|geReplaceable(?:RandomAccessSlice|BidirectionalSlice|Slice))|BidirectionalSlice|Slice)|anagedBufferPointer)|B(?:idirectionalSlice|ool)|S(?:t(?:aticString|ri(?:ng|deT(?:hrough(?:Generator|Iterator)?|o(?:Generator|Iterator)?)))|et(?:I(?:ndex|terator))?|lice)|HalfOpenInterval|C(?:haracter(?:View)?|o(?:ntiguousArray|untable(?:Range|ClosedRange)|llectionOfOne)|OpaquePointer|losed(?:Range(?:I(?:ndex|terator))?|Interval)|VaListPointer)|I(?:n(?:t(?:16|8|32|64)?|d(?:ices|ex(?:ing(?:Generator|Iterator))?))|terator(?:Sequence|OverOne)?)|Zip2(?:Sequence|Iterator)|O(?:paquePointer|bjectIdentifier)|D(?:ictionary(?:I(?:ndex|terator)|Literal)?|ouble|efault(?:RandomAccessIndices|BidirectionalIndices|Indices))|U(?:n(?:safe(?:RawPointer|Mutable(?:RawPointer|BufferPointer|Pointer)|BufferPointer(?:Generator|Iterator)?|Pointer)|icodeScalar(?:View)?|foldSequence|managed)|TF(?:16(?:View)?|8(?:View)?|32)|Int(?:16|8|32|64)?)|Join(?:Generator|ed(?:Sequence|Iterator))|PermutationGenerator|E(?:numerate(?:Generator|Sequence|d(?:Sequence|Iterator))|mpty(?:Generator|Collection|Iterator))|Fl(?:oat(?:80)?|atten(?:Generator|BidirectionalCollection(?:Index)?|Sequence|Collection(?:Index)?|Iterator))|L(?:egacyChildren|azy(?:RandomAccessCollection|Map(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Collection|Iterator)|BidirectionalCollection|Sequence|Collection|Filter(?:Generator|BidirectionalCollection|Sequence|Collection|I(?:ndex|terator))))|A(?:ny(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Hashable|Collection|I(?:ndex|terator))|utoreleasingUnsafeMutablePointer|rray(?:Slice)?))\\b",
347
331
  "name": "support.type.swift"
348
332
  },
349
333
  {
350
- "comment": "Structs in the standard library in Swift 2 only",
351
334
  "match": "\\b(?:R(?:everse(?:RandomAccess(?:Collection|Index)|Collection|Index)|awByte)|Map(?:Generator|Sequence|Collection)|S(?:inkOf|etGenerator)|Zip2Generator|DictionaryGenerator|Filter(?:Generator|Sequence|Collection(?:Index)?)|LazyForwardCollection|Any(?:RandomAccessIndex|BidirectionalIndex|Forward(?:Collection|Index)))\\b",
352
335
  "name": "support.type.swift"
353
336
  }
@@ -356,12 +339,10 @@
356
339
  "builtin-types-builtin-typealias": {
357
340
  "patterns": [
358
341
  {
359
- "comment": "Typealiases in the standard library in Swift 3",
360
342
  "match": "\\b(?:Raw(?:Significand|Exponent|Value)|B(?:ooleanLiteralType|uffer|ase)|S(?:t(?:orage|r(?:i(?:ngLiteralType|de)|eam(?:1|2)))|ubSequence)|NativeBuffer|C(?:hild(?:ren)?|Bool|S(?:hort|ignedChar)|odeUnit|Char(?:16|32)?|Int|Double|Unsigned(?:Short|Char|Int|Long(?:Long)?)|Float|WideChar|Long(?:Long)?)|I(?:n(?:t(?:Max|egerLiteralType)|d(?:ices|ex(?:Distance)?))|terator)|Distance|U(?:n(?:icodeScalar(?:Type|Index|View|LiteralType)|foldFirstSequence)|TF(?:16(?:Index|View)|8Index)|IntMax)|E(?:lement(?:s)?|x(?:tendedGraphemeCluster(?:Type|LiteralType)|ponent))|V(?:oid|alue)|Key|Float(?:32|LiteralType|64)|AnyClass)\\b",
361
343
  "name": "support.type.swift"
362
344
  },
363
345
  {
364
- "comment": "Typealiases in the standard library in Swift 2 only",
365
346
  "match": "\\b(?:Generator|PlaygroundQuickLook|UWord|Word)\\b",
366
347
  "name": "support.type.swift"
367
348
  }
@@ -780,7 +761,6 @@
780
761
  ]
781
762
  }
782
763
  },
783
- "comment": "while can be the end of a repeat-while statement so doesn't necessarily have braces after it",
784
764
  "end": "(?=\\{)|$",
785
765
  "patterns": [
786
766
  {
@@ -883,7 +863,6 @@
883
863
  "name": "keyword.operator.type.composition.swift"
884
864
  }
885
865
  },
886
- "comment": "Swift 3: A & B",
887
866
  "match": "(?<![/=\\-+!*%<>&|\\^~.])(&)(?![/=\\-+!*%<>&|\\^~.])"
888
867
  },
889
868
  {
@@ -895,7 +874,6 @@
895
874
  "name": "keyword.operator.function.variadic-parameter.swift"
896
875
  },
897
876
  {
898
- "comment": "Swift 2: protocol<A, B>",
899
877
  "match": "\\bprotocol\\b",
900
878
  "name": "keyword.other.type.composition.swift"
901
879
  },
@@ -921,7 +899,6 @@
921
899
  "name": "punctuation.section.collection-type.begin.swift"
922
900
  }
923
901
  },
924
- "comment": "array and dictionary types [Value] and [Key: Value]",
925
902
  "end": "\\]|(?=[>){}])",
926
903
  "endCaptures": {
927
904
  "0": {
@@ -999,7 +976,6 @@
999
976
  "include": "#comments"
1000
977
  },
1001
978
  {
1002
- "comment": "SE-0143: Conditional Conformances",
1003
979
  "include": "#declarations-generic-where-clause"
1004
980
  },
1005
981
  {
@@ -1062,7 +1038,6 @@
1062
1038
  "include": "#async-throws"
1063
1039
  },
1064
1040
  {
1065
- "comment": "Swift 3: generic constraints after the parameters and return type",
1066
1041
  "include": "#declarations-generic-where-clause"
1067
1042
  },
1068
1043
  {
@@ -1116,7 +1091,6 @@
1116
1091
  "include": "#async-throws"
1117
1092
  },
1118
1093
  {
1119
- "comment": "Swift 3: generic constraints after the parameters and return type",
1120
1094
  "include": "#declarations-generic-where-clause"
1121
1095
  },
1122
1096
  {
@@ -1245,7 +1219,6 @@
1245
1219
  "include": "#comments"
1246
1220
  },
1247
1221
  {
1248
- "comment": "Swift 2: constraints inside the generic param list",
1249
1222
  "include": "#declarations-generic-where-clause"
1250
1223
  },
1251
1224
  {
@@ -1542,7 +1515,6 @@
1542
1515
  "include": "#async-throws"
1543
1516
  },
1544
1517
  {
1545
- "comment": "Swift 3: generic constraints after the parameters and return type",
1546
1518
  "include": "#declarations-generic-where-clause"
1547
1519
  }
1548
1520
  ]
@@ -1560,7 +1532,6 @@
1560
1532
  "name": "entity.name.function.operator.swift"
1561
1533
  },
1562
1534
  "4": {
1563
- "comment": "workaround for https://github.com/microsoft/vscode-textmate/issues/140#issuecomment-1793610346",
1564
1535
  "name": "entity.name.function.operator.swift",
1565
1536
  "patterns": [
1566
1537
  {
@@ -1704,7 +1675,6 @@
1704
1675
  "name": "punctuation.definition.identifier.swift"
1705
1676
  }
1706
1677
  },
1707
- "comment": "External parameter labels are considered part of the function name",
1708
1678
  "match": "((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q1>))\\s+((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q2>))(?=\\s*:)"
1709
1679
  },
1710
1680
  {
@@ -1722,7 +1692,6 @@
1722
1692
  "name": "punctuation.definition.identifier.swift"
1723
1693
  }
1724
1694
  },
1725
- "comment": "If no external label is given, the name is both the external label and the internal variable name",
1726
1695
  "match": "(((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)))(?=\\s*:)"
1727
1696
  },
1728
1697
  {
@@ -1743,7 +1712,6 @@
1743
1712
  "name": "keyword.operator.assignment.swift"
1744
1713
  }
1745
1714
  },
1746
- "comment": "a parameter's default value",
1747
1715
  "end": "(?=[,)])",
1748
1716
  "patterns": [
1749
1717
  {
@@ -1865,7 +1833,6 @@
1865
1833
  "include": "#declarations-inheritance-clause"
1866
1834
  },
1867
1835
  {
1868
- "comment": "SE-0142: Permit where clauses to constrain associated types",
1869
1836
  "include": "#declarations-generic-where-clause"
1870
1837
  },
1871
1838
  {
@@ -1922,7 +1889,6 @@
1922
1889
  "include": "#declarations-inheritance-clause"
1923
1890
  },
1924
1891
  {
1925
- "comment": "SE-0142: Permit where clauses to constrain associated types",
1926
1892
  "include": "#declarations-generic-where-clause"
1927
1893
  },
1928
1894
  {
@@ -1959,7 +1925,6 @@
1959
1925
  "include": "#async-throws"
1960
1926
  },
1961
1927
  {
1962
- "comment": "Swift 3: generic constraints after the parameters and return type",
1963
1928
  "include": "#declarations-generic-where-clause"
1964
1929
  },
1965
1930
  {
@@ -2019,7 +1984,6 @@
2019
1984
  "include": "#async-throws"
2020
1985
  },
2021
1986
  {
2022
- "comment": "Swift 3: generic constraints after the parameters and return type",
2023
1987
  "include": "#declarations-generic-where-clause"
2024
1988
  },
2025
1989
  {
@@ -2072,7 +2036,6 @@
2072
2036
  "include": "#declarations-generic-parameter-clause"
2073
2037
  },
2074
2038
  {
2075
- "comment": "Swift 3: generic constraints after the generic param list",
2076
2039
  "include": "#declarations-generic-where-clause"
2077
2040
  },
2078
2041
  {
@@ -2131,7 +2094,6 @@
2131
2094
  "include": "#declarations-generic-parameter-clause"
2132
2095
  },
2133
2096
  {
2134
- "comment": "Swift 3: generic constraints after the generic param list",
2135
2097
  "include": "#declarations-generic-where-clause"
2136
2098
  },
2137
2099
  {
@@ -2224,7 +2186,6 @@
2224
2186
  },
2225
2187
  {
2226
2188
  "begin": "(?![,)\\]])(?=\\S)",
2227
- "comment": "an element without a label (i.e. anything else)",
2228
2189
  "end": "(?=[,)\\]])",
2229
2190
  "patterns": [
2230
2191
  {
@@ -2350,7 +2311,6 @@
2350
2311
  "name": "keyword.operator.type.composition.swift"
2351
2312
  }
2352
2313
  },
2353
- "comment": "Swift 3: A & B",
2354
2314
  "match": "(?<![/=\\-+!*%<>&|\\^~.])(&)(?![/=\\-+!*%<>&|\\^~.])"
2355
2315
  },
2356
2316
  {
@@ -2359,7 +2319,6 @@
2359
2319
  "name": "keyword.operator.type.requirement-suppression.swift"
2360
2320
  }
2361
2321
  },
2362
- "comment": "SE-0390: Noncopyable structs and enums",
2363
2322
  "match": "(?<![/=\\-+!*%<>&|\\^~.])(~)(?![/=\\-+!*%<>&|\\^~.])"
2364
2323
  }
2365
2324
  ]
@@ -2431,14 +2390,12 @@
2431
2390
  "declarations-types-precedencegroup": {
2432
2391
  "patterns": [
2433
2392
  {
2434
- "comment": "Precedence groups in the standard library",
2435
2393
  "match": "\\b(?:BitwiseShift|Assignment|RangeFormation|Casting|Addition|NilCoalescing|Comparison|LogicalConjunction|LogicalDisjunction|Default|Ternary|Multiplication|FunctionArrow)Precedence\\b",
2436
2394
  "name": "support.type.swift"
2437
2395
  }
2438
2396
  ]
2439
2397
  },
2440
2398
  "expressions": {
2441
- "comment": "trailing closures need to be parsed before other member references",
2442
2399
  "patterns": [
2443
2400
  {
2444
2401
  "include": "#expressions-without-trailing-closures-or-member-references"
@@ -2465,7 +2422,6 @@
2465
2422
  "name": "punctuation.definition.identifier.swift"
2466
2423
  }
2467
2424
  },
2468
- "comment": "foo { body } -- a call with a trailing closure and no argument clause",
2469
2425
  "match": "(#?(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))(?=\\s*\\{)",
2470
2426
  "name": "meta.function-call.trailing-closure-only.swift"
2471
2427
  },
@@ -2484,7 +2440,6 @@
2484
2440
  "name": "punctuation.separator.argument-label.swift"
2485
2441
  }
2486
2442
  },
2487
- "comment": "foo: { body } -- labeled-trailing-closure (SE-0279)",
2488
2443
  "match": "((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(:)(?=\\s*\\{)"
2489
2444
  }
2490
2445
  ]
@@ -2638,7 +2593,6 @@
2638
2593
  ]
2639
2594
  }
2640
2595
  },
2641
- "comment": "a reference to a function with disambiguating argument labels, such as foo(_:), foo(bar:), etc.",
2642
2596
  "match": "((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q1>))\\(((((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q2>)):)+)\\)"
2643
2597
  },
2644
2598
  "expressions-without-trailing-closures-or-member-references-expression-element-list": {
@@ -2662,7 +2616,6 @@
2662
2616
  "name": "punctuation.separator.argument-label.swift"
2663
2617
  }
2664
2618
  },
2665
- "comment": "an element with a label",
2666
2619
  "end": "(?=[,)\\]])",
2667
2620
  "patterns": [
2668
2621
  {
@@ -2672,7 +2625,6 @@
2672
2625
  },
2673
2626
  {
2674
2627
  "begin": "(?![,)\\]])(?=\\S)",
2675
- "comment": "an element without a label (i.e. anything else)",
2676
2628
  "end": "(?=[,)\\]])",
2677
2629
  "patterns": [
2678
2630
  {
@@ -2700,7 +2652,6 @@
2700
2652
  "name": "punctuation.definition.arguments.begin.swift"
2701
2653
  }
2702
2654
  },
2703
- "comment": "foo(args) -- a call whose callee is a highlightable name",
2704
2655
  "end": "\\)",
2705
2656
  "endCaptures": {
2706
2657
  "0": {
@@ -2721,7 +2672,6 @@
2721
2672
  "name": "punctuation.definition.arguments.begin.swift"
2722
2673
  }
2723
2674
  },
2724
- "comment": "[Int](args) -- a call whose callee is a more complicated expression",
2725
2675
  "end": "\\)",
2726
2676
  "endCaptures": {
2727
2677
  "0": {
@@ -2748,7 +2698,6 @@
2748
2698
  "name": "punctuation.section.tuple.begin.swift"
2749
2699
  }
2750
2700
  },
2751
- "comment": "correctly matching closure expressions is too hard (depends on trailing \"in\") so we just tack on some basics to the end of parenthesized-expression",
2752
2701
  "end": "(\\))\\s*((?:\\b(?:async|throws|rethrows)\\s)*)",
2753
2702
  "endCaptures": {
2754
2703
  "1": {
@@ -2819,7 +2768,6 @@
2819
2768
  "name": "punctuation.whitespace.trailing.repeat.swift"
2820
2769
  }
2821
2770
  },
2822
- "comment": "extra scopes for repeat-while snippet",
2823
2771
  "match": "(?<!\\.)\\b(repeat)\\b(\\s*)"
2824
2772
  },
2825
2773
  {
@@ -2854,7 +2802,6 @@
2854
2802
  "name": "punctuation.whitespace.trailing.do.swift"
2855
2803
  }
2856
2804
  },
2857
- "comment": "extra scopes for do-catch snippet",
2858
2805
  "match": "(?<!\\.)\\b(do)\\b(\\s*)"
2859
2806
  },
2860
2807
  {
@@ -2889,7 +2836,6 @@
2889
2836
  "name": "keyword.other.declaration-specifier.accessibility.swift"
2890
2837
  },
2891
2838
  {
2892
- "comment": "matches weak, unowned, unowned(safe), unowned(unsafe)",
2893
2839
  "match": "(?<!\\.)\\bunowned\\((?:safe|unsafe)\\)|(?<!\\.)\\b(?:weak|unowned)\\b",
2894
2840
  "name": "keyword.other.capture-specifier.swift"
2895
2841
  },
@@ -2917,12 +2863,10 @@
2917
2863
  "name": "keyword.control.import.swift"
2918
2864
  },
2919
2865
  {
2920
- "comment": "SE-0366: \"consume behaves as a contextual keyword. In order to avoid interfering with existing code that calls functions named consume, the operand to consume must begin with another identifier, and must consist of an identifier or postfix expression\"",
2921
2866
  "match": "(?<!\\.)\\bconsume(?=\\s+`?[\\p{L}_])",
2922
2867
  "name": "keyword.control.consume.swift"
2923
2868
  },
2924
2869
  {
2925
- "comment": "SE-0377: \"copy is a contextual keyword, parsed as an operator if it is immediately followed by an identifier on the same line, like the consume x operator before it\"",
2926
2870
  "match": "(?<!\\.)\\bcopy(?=\\s+`?[\\p{L}_])",
2927
2871
  "name": "keyword.control.copy.swift"
2928
2872
  }
@@ -2944,7 +2888,6 @@
2944
2888
  "name": "constant.language.nil.swift"
2945
2889
  },
2946
2890
  {
2947
- "comment": "object \"literals\" used in playgrounds",
2948
2891
  "match": "\\B#(colorLiteral|imageLiteral|fileLiteral)\\b",
2949
2892
  "name": "support.function.object-literal.swift"
2950
2893
  },
@@ -2996,56 +2939,45 @@
2996
2939
  "literals-numeric": {
2997
2940
  "patterns": [
2998
2941
  {
2999
- "comment": "0.1, -4_2.5, 6.022e23, 10E-5",
3000
2942
  "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9][0-9_]*(?=\\.[0-9]|[eE])(?:\\.[0-9][0-9_]*)?(?:[eE][-+]?[0-9][0-9_]*)?\\b(?!\\.[0-9])",
3001
2943
  "name": "constant.numeric.float.decimal.swift"
3002
2944
  },
3003
2945
  {
3004
- "comment": "-0x1.ap2_3, 0x31p-4",
3005
2946
  "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)(?:\\.[0-9a-fA-F][0-9a-fA-F_]*)?[pP][-+]?[0-9][0-9_]*\\b(?!\\.[0-9])",
3006
2947
  "name": "constant.numeric.float.hexadecimal.swift"
3007
2948
  },
3008
2949
  {
3009
- "comment": "0x1p, 0x1p_2, 0x1.5pa, 0x1.1p+1f, 0x1pz",
3010
2950
  "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)(?:\\.[0-9a-fA-F][0-9a-fA-F_]*)?(?:[pP][-+]?\\w*)\\b(?!\\.[0-9])",
3011
2951
  "name": "invalid.illegal.numeric.float.invalid-exponent.swift"
3012
2952
  },
3013
2953
  {
3014
- "comment": "0x1.5w (note that 0x1.f may be a valid expression)",
3015
2954
  "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)\\.[0-9][\\w.]*",
3016
2955
  "name": "invalid.illegal.numeric.float.missing-exponent.swift"
3017
2956
  },
3018
2957
  {
3019
- "comment": "-.5, .2f (note that 1.-.5 may be a valid expression)",
3020
2958
  "match": "(?<=\\s|^)\\-?\\.[0-9][\\w.]*",
3021
2959
  "name": "invalid.illegal.numeric.float.missing-leading-zero.swift"
3022
2960
  },
3023
2961
  {
3024
- "comment": "0b_0_1, 0x_1p+3q",
3025
2962
  "match": "(\\B\\-|\\b)0[box]_[0-9a-fA-F_]*(?:[pPeE][+-]?\\w+)?[\\w.]+",
3026
2963
  "name": "invalid.illegal.numeric.leading-underscore.swift"
3027
2964
  },
3028
2965
  {
3029
- "comment": "tuple positional member: not really a numeric literal, but not invalid",
3030
2966
  "match": "(?<=[\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9]+\\b"
3031
2967
  },
3032
2968
  {
3033
- "comment": "0b010, 0b1_0",
3034
2969
  "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0b[01][01_]*\\b(?!\\.[0-9])",
3035
2970
  "name": "constant.numeric.integer.binary.swift"
3036
2971
  },
3037
2972
  {
3038
- "comment": "0o1, 0o7_3",
3039
2973
  "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0o[0-7][0-7_]*\\b(?!\\.[0-9])",
3040
2974
  "name": "constant.numeric.integer.octal.swift"
3041
2975
  },
3042
2976
  {
3043
- "comment": "02, 3_456",
3044
2977
  "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9][0-9_]*\\b(?!\\.[0-9])",
3045
2978
  "name": "constant.numeric.integer.decimal.swift"
3046
2979
  },
3047
2980
  {
3048
- "comment": "0x4, 0xF_7",
3049
2981
  "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0x[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\.[0-9])",
3050
2982
  "name": "constant.numeric.integer.hexadecimal.swift"
3051
2983
  },
@@ -3056,7 +2988,6 @@
3056
2988
  ]
3057
2989
  },
3058
2990
  "literals-regular-expression-literal": {
3059
- "comment": "SE-0354 & SE-0355",
3060
2991
  "patterns": [
3061
2992
  {
3062
2993
  "begin": "(#+)/\\n",
@@ -3083,21 +3014,19 @@
3083
3014
  "1": {
3084
3015
  "name": "punctuation.definition.string.begin.regexp.swift"
3085
3016
  },
3086
- "12": {
3017
+ "8": {
3087
3018
  "name": "punctuation.definition.string.end.regexp.swift"
3088
3019
  },
3089
- "13": {
3020
+ "9": {
3090
3021
  "name": "invalid.illegal.returns-not-allowed.regexp"
3091
3022
  }
3092
3023
  },
3093
- "comment": "Single-line regular expression literals must be matched all in one go\n in order to avoid ambiguities with operators, and to adhere to certain\n parsing rules in SE-0354/SE-0355, such as:\n - A regex literal will not be parsed if it contains an unbalanced ).\n - A regex may end with a space only if it began with an escaped space",
3094
- "match": "(((\\#+)?)/)(?(3)|(?!/))(?(3)|(?!\\s))(\\\\\\s)?(?<guts>(?>(?:\\\\Q(?:(?!\\\\E)(?!/\\2).)*+(?:\\\\E|(?(3)|(?<!\\s))(?=/\\2))|\\\\.|\\(\\?\\#[^)]*\\)|\\(\\?\\{(?<g1>\\{)?+(?<g2>\\{)?+(?<g3>\\{)?+(?<g4>\\{)?+(?<g5>\\{)?+.+?\\}(?(<g1>)\\})(?(<g2>)\\})(?(<g3>)\\})(?(<g4>)\\})(?(<g5>)\\})(?:\\[(?!\\d)\\w+\\])?[X<>]?\\)|(?<class>\\[(?:\\\\.|[^\\[\\]]|\\g<class>)+\\])|\\(\\g<guts>?+\\)|(?:(?!/\\2)[^()\\[\\\\])+)+))?+(?(3)|(?(5)(?<!\\s)))(/\\2)|\\#+/.+(\\n)",
3024
+ "match": "(?!/\\s)(?!//)(((\\#+)?)/)(\\\\\\s)?(?<guts>(?>(?:\\\\Q(?:(?!\\\\E)(?!/\\2).)*+(?:\\\\E|(?(3)|(?<!\\s))(?=/\\2))|\\\\.|\\(\\?\\#[^)]*\\)|\\(\\?(?>(\\{(?:\\g<-1>|(?!{).*?)\\}))(?:\\[(?!\\d)\\w+\\])?[X<>]?\\)|(?<class>\\[(?:\\\\.|[^\\[\\]]|\\g<class>)+\\])|\\(\\g<guts>?+\\)|(?:(?!/\\2)[^()\\[\\\\])+)+))?+(?(3)|(?(5)(?<!\\s)))(/\\2)|\\#+/.+(\\n)",
3095
3025
  "name": "string.regexp.line.swift"
3096
3026
  }
3097
3027
  ]
3098
3028
  },
3099
3029
  "literals-regular-expression-literal-backreference-or-subpattern": {
3100
- "comment": "These patterns are separated to work around issues like https://github.com/microsoft/vscode-textmate/issues/164",
3101
3030
  "patterns": [
3102
3031
  {
3103
3032
  "captures": {
@@ -3126,7 +3055,6 @@
3126
3055
  "name": "constant.character.escape.backslash.regexp"
3127
3056
  }
3128
3057
  },
3129
- "comment": "'\\g{' NamedOrNumberRef '}'",
3130
3058
  "match": "(\\\\g\\{)(?:((?!\\d)\\w+)(?:([+-])(\\d+))?|([+-]?\\d+)(?:([+-])(\\d+))?)(\\})"
3131
3059
  },
3132
3060
  {
@@ -3144,7 +3072,6 @@
3144
3072
  "name": "constant.numeric.integer.decimal.regexp"
3145
3073
  }
3146
3074
  },
3147
- "comment": "'\\g' NumberRef",
3148
3075
  "match": "(\\\\g)([+-]?\\d+)(?:([+-])(\\d+))?"
3149
3076
  },
3150
3077
  {
@@ -3152,30 +3079,58 @@
3152
3079
  "1": {
3153
3080
  "name": "constant.character.escape.backslash.regexp"
3154
3081
  },
3155
- "3": {
3082
+ "2": {
3156
3083
  "name": "variable.other.group-name.regexp"
3157
3084
  },
3158
- "4": {
3085
+ "3": {
3159
3086
  "name": "keyword.operator.recursion-level.regexp"
3160
3087
  },
3088
+ "4": {
3089
+ "name": "constant.numeric.integer.decimal.regexp"
3090
+ },
3161
3091
  "5": {
3162
3092
  "name": "constant.numeric.integer.decimal.regexp"
3163
3093
  },
3164
3094
  "6": {
3165
- "name": "constant.numeric.integer.decimal.regexp"
3095
+ "name": "keyword.operator.recursion-level.regexp"
3166
3096
  },
3167
3097
  "7": {
3168
- "name": "keyword.operator.recursion-level.regexp"
3098
+ "name": "constant.numeric.integer.decimal.regexp"
3169
3099
  },
3170
3100
  "8": {
3101
+ "name": "constant.character.escape.backslash.regexp"
3102
+ }
3103
+ },
3104
+ "match": "(\\\\[gk]<)(?:((?!\\d)\\w+)(?:([+-])(\\d+))?|([+-]?\\d+)(?:([+-])(\\d+))?)(>)"
3105
+ },
3106
+ {
3107
+ "captures": {
3108
+ "1": {
3109
+ "name": "constant.character.escape.backslash.regexp"
3110
+ },
3111
+ "2": {
3112
+ "name": "variable.other.group-name.regexp"
3113
+ },
3114
+ "3": {
3115
+ "name": "keyword.operator.recursion-level.regexp"
3116
+ },
3117
+ "4": {
3171
3118
  "name": "constant.numeric.integer.decimal.regexp"
3172
3119
  },
3173
- "9": {
3120
+ "5": {
3121
+ "name": "constant.numeric.integer.decimal.regexp"
3122
+ },
3123
+ "6": {
3124
+ "name": "keyword.operator.recursion-level.regexp"
3125
+ },
3126
+ "7": {
3127
+ "name": "constant.numeric.integer.decimal.regexp"
3128
+ },
3129
+ "8": {
3174
3130
  "name": "constant.character.escape.backslash.regexp"
3175
3131
  }
3176
3132
  },
3177
- "comment": "'\\k<' NamedOrNumberRef '>'\n \"\\k'\" NamedOrNumberRef \"'\"\n '\\g<' NamedOrNumberRef '>'\n \"\\g'\" NamedOrNumberRef \"'\"",
3178
- "match": "(\\\\[gk](<)|\\\\[gk]')(?:((?!\\d)\\w+)(?:([+-])(\\d+))?|([+-]?\\d+)(?:([+-])(\\d+))?)((?(2)>|'))"
3133
+ "match": "(\\\\[gk]')(?:((?!\\d)\\w+)(?:([+-])(\\d+))?|([+-]?\\d+)(?:([+-])(\\d+))?)(')"
3179
3134
  },
3180
3135
  {
3181
3136
  "captures": {
@@ -3195,7 +3150,6 @@
3195
3150
  "name": "constant.character.escape.backslash.regexp"
3196
3151
  }
3197
3152
  },
3198
- "comment": "'\\k{' NamedRef '}'",
3199
3153
  "match": "(\\\\k\\{)((?!\\d)\\w+)(?:([+-])(\\d+))?(\\})"
3200
3154
  },
3201
3155
  {
@@ -3220,7 +3174,6 @@
3220
3174
  "name": "keyword.other.back-reference.regexp"
3221
3175
  }
3222
3176
  },
3223
- "comment": "'(?P=' NamedRef ')'",
3224
3177
  "match": "(\\(\\?(?:P[=>]|&))((?!\\d)\\w+)(?:([+-])(\\d+))?(\\))"
3225
3178
  },
3226
3179
  {
@@ -3245,7 +3198,6 @@
3245
3198
  "name": "keyword.other.back-reference.regexp"
3246
3199
  }
3247
3200
  },
3248
- "comment": "'(?' NumberRef ')'",
3249
3201
  "match": "(\\(\\?)([+-]?\\d+)(?:([+-])(\\d+))?(\\))"
3250
3202
  }
3251
3203
  ]
@@ -3320,13 +3272,13 @@
3320
3272
  "2": {
3321
3273
  "name": "keyword.control.callout.regexp"
3322
3274
  },
3323
- "26": {
3275
+ "21": {
3324
3276
  "name": "variable.language.tag-name.regexp"
3325
3277
  },
3326
- "27": {
3278
+ "22": {
3327
3279
  "name": "keyword.control.callout.regexp"
3328
3280
  },
3329
- "28": {
3281
+ "23": {
3330
3282
  "name": "punctuation.definition.group.regexp"
3331
3283
  },
3332
3284
  "3": {
@@ -3351,7 +3303,7 @@
3351
3303
  "name": "entity.name.function.callout.regexp"
3352
3304
  }
3353
3305
  },
3354
- "match": "(\\()(?<keyw>\\?C)(?:(?<num>\\d+)|`(?<name>(?:[^`]|``)*)`|'(?<name>(?:[^']|'')*)'|\"(?<name>(?:[^\"]|\"\")*)\"|\\^(?<name>(?:[^\\^]|\\^\\^)*)\\^|%(?<name>(?:[^%]|%%)*)%|\\#(?<name>(?:[^#]|\\#\\#)*)\\#|\\$(?<name>(?:[^$]|\\$\\$)*)\\$|\\{(?<name>(?:[^}]|\\}\\})*)\\})?(\\))|(\\()(?<keyw>\\*)(?<name>(?!\\d)\\w+)(?:\\[(?<tag>(?!\\d)\\w+)\\])?(?:\\{[^,}]+(?:,[^,}]+)*\\})?(\\))|(\\()(?<keyw>\\?)(\\{(?<g1>\\{)?+(?<g2>\\{)?+(?<g3>\\{)?+(?<g4>\\{)?+(?<g5>\\{)?+).+?\\}(?(<g1>)\\})(?(<g2>)\\})(?(<g3>)\\})(?(<g4>)\\})(?(<g5>)\\})(?:\\[(?<tag>(?!\\d)\\w+)\\])?(?<keyw>[X<>]?)(\\))",
3306
+ "match": "(\\()(?<keyw>\\?C)(?:(?<num>\\d+)|`(?<name>(?:[^`]|``)*)`|'(?<name>(?:[^']|'')*)'|\"(?<name>(?:[^\"]|\"\")*)\"|\\^(?<name>(?:[^\\^]|\\^\\^)*)\\^|%(?<name>(?:[^%]|%%)*)%|\\#(?<name>(?:[^#]|\\#\\#)*)\\#|\\$(?<name>(?:[^$]|\\$\\$)*)\\$|\\{(?<name>(?:[^}]|\\}\\})*)\\})?(\\))|(\\()(?<keyw>\\*)(?<name>(?!\\d)\\w+)(?:\\[(?<tag>(?!\\d)\\w+)\\])?(?:\\{[^,}]+(?:,[^,}]+)*\\})?(\\))|(\\()(?<keyw>\\?)(?>(\\{(?:\\g<-1>|(?!{).*?)\\}))(?:\\[(?<tag>(?!\\d)\\w+)\\])?(?<keyw>[X<>]?)(\\))",
3355
3307
  "name": "meta.callout.regexp"
3356
3308
  },
3357
3309
  "literals-regular-expression-literal-character-properties": {
@@ -3400,10 +3352,8 @@
3400
3352
  ]
3401
3353
  },
3402
3354
  "literals-regular-expression-literal-custom-char-class-members": {
3403
- "comment": "TODO: should also include atoms?",
3404
3355
  "patterns": [
3405
3356
  {
3406
- "comment": "\\b inside a character class represents a backspace",
3407
3357
  "match": "\\\\b",
3408
3358
  "name": "constant.character.escape.backslash.regexp"
3409
3359
  },
@@ -3425,7 +3375,6 @@
3425
3375
  ]
3426
3376
  },
3427
3377
  "literals-regular-expression-literal-group-option-toggle": {
3428
- "comment": "A matching option sequence may be part of an \"isolated group\" which has an implicit scope that wraps the remaining elements of the current group",
3429
3378
  "match": "\\(\\?(?:\\^(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*|(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})+|(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*-(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*)\\)",
3430
3379
  "name": "keyword.other.option-toggle.regexp"
3431
3380
  },
@@ -3728,7 +3677,6 @@
3728
3677
  "name": "punctuation.definition.string.begin.swift"
3729
3678
  }
3730
3679
  },
3731
- "comment": "SE-0168: Multi-Line String Literals",
3732
3680
  "end": "\"\"\"(#*)",
3733
3681
  "endCaptures": {
3734
3682
  "0": {
@@ -3752,7 +3700,6 @@
3752
3700
  "include": "#literals-string-string-guts"
3753
3701
  },
3754
3702
  {
3755
- "comment": "Allow \\(\"\"\"...\"\"\") to appear inside a block string",
3756
3703
  "match": "\\S((?!\\\\\\().)*(?=\"\"\")",
3757
3704
  "name": "invalid.illegal.content-before-closing-delimiter.swift"
3758
3705
  }
@@ -3788,7 +3735,6 @@
3788
3735
  "include": "#literals-string-raw-string-guts"
3789
3736
  },
3790
3737
  {
3791
- "comment": "Allow \\(\"\"\"...\"\"\") to appear inside a block string",
3792
3738
  "match": "\\S((?!\\\\#\\().)*(?=\"\"\")",
3793
3739
  "name": "invalid.illegal.content-before-closing-delimiter.swift"
3794
3740
  }
@@ -3852,7 +3798,6 @@
3852
3798
  "name": "punctuation.definition.string.begin.raw.swift"
3853
3799
  }
3854
3800
  },
3855
- "comment": "SE-0168: raw string literals (more than one #, grammar limitations prevent us from supporting escapes)",
3856
3801
  "end": "\"\\1(#*)",
3857
3802
  "endCaptures": {
3858
3803
  "0": {
@@ -3877,7 +3822,6 @@
3877
3822
  "name": "punctuation.definition.string.begin.raw.swift"
3878
3823
  }
3879
3824
  },
3880
- "comment": "SE-0168: raw string literals (one #, escapes supported)",
3881
3825
  "end": "\"#(#*)",
3882
3826
  "endCaptures": {
3883
3827
  "0": {
@@ -3901,7 +3845,6 @@
3901
3845
  ]
3902
3846
  },
3903
3847
  "literals-string-raw-string-guts": {
3904
- "comment": "the same as #string-guts but with # in escapes",
3905
3848
  "patterns": [
3906
3849
  {
3907
3850
  "match": "\\\\#[0\\\\tnr\"']",
@@ -3935,7 +3878,6 @@
3935
3878
  },
3936
3879
  {
3937
3880
  "begin": "\\(",
3938
- "comment": "Nested parens",
3939
3881
  "end": "\\)"
3940
3882
  }
3941
3883
  ]
@@ -3980,7 +3922,6 @@
3980
3922
  },
3981
3923
  {
3982
3924
  "begin": "\\(",
3983
- "comment": "Nested parens",
3984
3925
  "end": "\\)"
3985
3926
  }
3986
3927
  ]
@@ -4012,13 +3953,11 @@
4012
3953
  "operators": {
4013
3954
  "patterns": [
4014
3955
  {
4015
- "comment": "Type casting",
4016
3956
  "match": "\\b(is\\b|as([!?]\\B|\\b))",
4017
3957
  "name": "keyword.operator.type-casting.swift"
4018
3958
  },
4019
3959
  {
4020
3960
  "begin": "(?=(?<oph>[/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}])|\\.(\\g<oph>|\\.|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))",
4021
- "comment": "This rule helps us speed up the matching.",
4022
3961
  "end": "(?!\\G)",
4023
3962
  "patterns": [
4024
3963
  {
@@ -4048,7 +3987,6 @@
4048
3987
  ]
4049
3988
  }
4050
3989
  },
4051
- "comment": "Prefix unary operator",
4052
3990
  "match": "\\G(?<=^|[\\s(\\[{,;:])((?!(//|/\\*|\\*/))([/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}]|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))++(?![\\s)\\]},;:]|\\z)"
4053
3991
  },
4054
3992
  {
@@ -4070,7 +4008,6 @@
4070
4008
  ]
4071
4009
  }
4072
4010
  },
4073
- "comment": "Postfix unary operator",
4074
4011
  "match": "\\G(?<!^|[\\s(\\[{,;:])((?!(//|/\\*|\\*/))([/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}]|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))++(?=[\\s)\\]},;:]|\\z)"
4075
4012
  },
4076
4013
  {
@@ -4128,7 +4065,6 @@
4128
4065
  ]
4129
4066
  }
4130
4067
  },
4131
- "comment": "Infix operator",
4132
4068
  "match": "\\G((?!(//|/\\*|\\*/))([/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}]|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))++"
4133
4069
  },
4134
4070
  {
@@ -4142,7 +4078,6 @@
4142
4078
  ]
4143
4079
  }
4144
4080
  },
4145
- "comment": "Dot prefix unary operator",
4146
4081
  "match": "\\G(?<=^|[\\s(\\[{,;:])\\.((?!(//|/\\*|\\*/))(\\.|[/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}]|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))++(?![\\s)\\]},;:]|\\z)"
4147
4082
  },
4148
4083
  {
@@ -4156,7 +4091,6 @@
4156
4091
  ]
4157
4092
  }
4158
4093
  },
4159
- "comment": "Dot postfix unary operator",
4160
4094
  "match": "\\G(?<!^|[\\s(\\[{,;:])\\.((?!(//|/\\*|\\*/))(\\.|[/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}]|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))++(?=[\\s)\\]},;:]|\\z)"
4161
4095
  },
4162
4096
  {
@@ -4174,7 +4108,6 @@
4174
4108
  ]
4175
4109
  }
4176
4110
  },
4177
- "comment": "Dot infix operator",
4178
4111
  "match": "\\G\\.((?!(//|/\\*|\\*/))(\\.|[/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}]|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))++"
4179
4112
  }
4180
4113
  ]
package/index.js CHANGED
@@ -492,20 +492,20 @@ export const grammars = [
492
492
  source: 'https://github.com/twxs/vs.language.cmake/blob/19b1b8fe2d68d72cf294d0c3c22f0a3fc54f8f6f/syntaxes/CMake.tmLanguage',
493
493
  },
494
494
  {
495
- byteSize: 39311,
495
+ byteSize: 39313,
496
496
  displayName: 'COBOL',
497
497
  embedded: [
498
498
  'html',
499
499
  'java',
500
500
  ],
501
- hash: 'vxjHhkYwlh',
502
- lastUpdate: '2024-10-31T10:49:48Z',
501
+ hash: 'euBtAopOGq',
502
+ lastUpdate: '2025-01-16T21:59:32Z',
503
503
  license: 'MIT',
504
504
  licenseUrl: 'https://raw.githubusercontent.com/spgennard/vscode_cobol/main/LICENSE',
505
505
  name: 'cobol',
506
506
  scopeName: 'source.cobol',
507
- sha: '627c3ea9e330666c24e0723cec7b9553447ab45b',
508
- source: 'https://github.com/spgennard/vscode_cobol/blob/627c3ea9e330666c24e0723cec7b9553447ab45b/syntaxes/COBOL.tmLanguage.json',
507
+ sha: 'dc60eb00faf728138ead0ea66581e406c6465652',
508
+ source: 'https://github.com/spgennard/vscode_cobol/blob/dc60eb00faf728138ead0ea66581e406c6465652/syntaxes/COBOL.tmLanguage.json',
509
509
  },
510
510
  {
511
511
  byteSize: 471,
@@ -2653,20 +2653,20 @@ export const grammars = [
2653
2653
  source: 'https://github.com/microsoft/vscode/blob/8fdf170a0850c1cc027382f31650aaf300d3ae2a/extensions/perl/syntaxes/perl6.tmLanguage.json',
2654
2654
  },
2655
2655
  {
2656
- byteSize: 24997,
2656
+ byteSize: 25030,
2657
2657
  displayName: 'ASP.NET Razor',
2658
2658
  embedded: [
2659
2659
  'html',
2660
2660
  'csharp',
2661
2661
  ],
2662
- hash: 'zCtA8kqfB6',
2663
- lastUpdate: '2024-04-18T22:08:48Z',
2662
+ hash: 'hjzTrk5BYO',
2663
+ lastUpdate: '2025-01-16T21:40:52Z',
2664
2664
  license: 'MIT',
2665
2665
  licenseUrl: 'https://raw.githubusercontent.com/dotnet/razor/main/LICENSE.txt',
2666
2666
  name: 'razor',
2667
2667
  scopeName: 'text.aspnetcorerazor',
2668
- sha: '39159764277f3c80a786d8872eba7730da3d7ef0',
2669
- source: 'https://github.com/dotnet/razor/blob/39159764277f3c80a786d8872eba7730da3d7ef0/src/Razor/src/Microsoft.VisualStudio.RazorExtension/EmbeddedGrammars/aspnetcorerazor.tmLanguage.json',
2668
+ sha: '9b1e979b6c3fe7cfbe30f595b9b0994d20bd482c',
2669
+ source: 'https://github.com/dotnet/razor/blob/9b1e979b6c3fe7cfbe30f595b9b0994d20bd482c/src/Razor/src/Microsoft.VisualStudio.RazorExtension/EmbeddedGrammars/aspnetcorerazor.tmLanguage.json',
2670
2670
  },
2671
2671
  {
2672
2672
  byteSize: 2255,
@@ -3109,19 +3109,19 @@ export const grammars = [
3109
3109
  source: 'https://github.com/sveltejs/language-tools/blob/02db54de1f2fc44d958d67113a9d0fb41a8f6fe7/packages/svelte-vscode/syntaxes/svelte.tmLanguage.src.yaml',
3110
3110
  },
3111
3111
  {
3112
- byteSize: 93438,
3112
+ byteSize: 87008,
3113
3113
  categories: [
3114
3114
  'general',
3115
3115
  ],
3116
3116
  displayName: 'Swift',
3117
- hash: 'rYWxmdwPLb',
3118
- lastUpdate: '2024-06-28T09:56:38Z',
3117
+ hash: 'huCqvuz9BT',
3118
+ lastUpdate: '2025-01-18T23:17:43Z',
3119
3119
  license: 'MIT',
3120
- licenseUrl: 'https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt',
3120
+ licenseUrl: 'https://raw.githubusercontent.com/jtbandes/swift-tmlanguage/main/LICENSE.md',
3121
3121
  name: 'swift',
3122
3122
  scopeName: 'source.swift',
3123
- sha: 'ed4e6eda599f37bac9a11952403a6e63fd4f5a4d',
3124
- source: 'https://github.com/microsoft/vscode/blob/ed4e6eda599f37bac9a11952403a6e63fd4f5a4d/extensions/swift/syntaxes/swift.tmLanguage.json',
3123
+ sha: 'b8d2889b4af1d8bad41578317a6adade642555a3',
3124
+ source: 'https://github.com/jtbandes/swift-tmlanguage/blob/b8d2889b4af1d8bad41578317a6adade642555a3/Swift.tmLanguage.yaml',
3125
3125
  },
3126
3126
  {
3127
3127
  byteSize: 25181,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tm-grammars",
3
3
  "type": "module",
4
- "version": "1.22.6",
4
+ "version": "1.22.8",
5
5
  "description": "Collecton of TextMate grammars in JSON",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",