nuxt-og-image 3.0.0-rc.65 → 3.0.0-rc.67

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.
Files changed (469) hide show
  1. package/README.md +67 -67
  2. package/dist/client/200.html +222 -213
  3. package/dist/client/404.html +222 -213
  4. package/dist/client/_nuxt/{D33OKbkv.js → 0OCEc-sb.js} +1 -1
  5. package/dist/client/_nuxt/16nqZaIT.js +1 -0
  6. package/dist/client/_nuxt/3Ts0ZrM4.js +4 -0
  7. package/dist/client/_nuxt/44JOqR_V.js +1 -0
  8. package/dist/client/_nuxt/4FkZXfg1.js +3 -0
  9. package/dist/client/_nuxt/4WleZr1P.js +1 -0
  10. package/dist/client/_nuxt/5HixFuyr.js +1 -0
  11. package/dist/client/_nuxt/5bRVBCrv.js +1 -0
  12. package/dist/client/_nuxt/{CMDmr8et.js → 7LPQ6a13.js} +2 -2
  13. package/dist/client/_nuxt/8WiSp-0_.js +1 -0
  14. package/dist/client/_nuxt/9CfBjzQa.js +1 -0
  15. package/dist/client/_nuxt/B-9EjyZr.js +1 -0
  16. package/dist/client/_nuxt/B-a2BbyY.js +1 -0
  17. package/dist/client/_nuxt/B0LoMq2b.js +1 -0
  18. package/dist/client/_nuxt/B1ejXUAS.js +1 -0
  19. package/dist/client/_nuxt/{BR6CMsBL.js → B3LRAdDP.js} +1 -1
  20. package/dist/client/_nuxt/B3a86pAO.js +1 -0
  21. package/dist/client/_nuxt/B5La0Eyp.js +1 -0
  22. package/dist/client/_nuxt/B7-FEXAT.js +1 -0
  23. package/dist/client/_nuxt/B9HI_aQy.js +1 -0
  24. package/dist/client/_nuxt/B9vFkdfw.js +1 -0
  25. package/dist/client/_nuxt/BAGvEKUB.js +1 -0
  26. package/dist/client/_nuxt/BAp2aEeE.js +1 -0
  27. package/dist/client/_nuxt/BB9S_66N.js +1 -0
  28. package/dist/client/_nuxt/BC7ivatP.js +1 -0
  29. package/dist/client/_nuxt/{CJQrLysU.js → BCOu96sC.js} +1 -1
  30. package/dist/client/_nuxt/BD3t3nJY.js +1 -0
  31. package/dist/client/_nuxt/BDJ7po1j.js +1 -0
  32. package/dist/client/_nuxt/BGk6HrHT.js +1 -0
  33. package/dist/client/_nuxt/BHSTd-7M.js +1 -0
  34. package/dist/client/_nuxt/BKFBoKT4.js +1 -0
  35. package/dist/client/_nuxt/BKNiEhql.js +1 -0
  36. package/dist/client/_nuxt/BLmvGqlk.js +1 -0
  37. package/dist/client/_nuxt/BMRpS3Xo.js +1 -0
  38. package/dist/client/_nuxt/BMkdSFOr.js +1 -0
  39. package/dist/client/_nuxt/BNgG76gt.js +1 -0
  40. package/dist/client/_nuxt/BNofkYSZ.js +165 -0
  41. package/dist/client/_nuxt/BOp3HRET.js +1 -0
  42. package/dist/client/_nuxt/BPhJoBd6.js +1 -0
  43. package/dist/client/_nuxt/{DGDuLtS6.js → BQnHL-cn.js} +1 -8
  44. package/dist/client/_nuxt/BS9sT-GQ.js +1 -0
  45. package/dist/client/_nuxt/BU83OF-G.js +1 -0
  46. package/dist/client/_nuxt/BUeIC4cT.js +1 -0
  47. package/dist/client/_nuxt/BXP-NDAE.js +1 -0
  48. package/dist/client/_nuxt/BXUVD3TH.js +1 -0
  49. package/dist/client/_nuxt/BXWtGw2n.js +6 -0
  50. package/dist/client/_nuxt/BYLuaE_S.js +3 -0
  51. package/dist/client/_nuxt/BYelj_cE.js +1 -0
  52. package/dist/client/_nuxt/B_Sdu6N9.js +1 -0
  53. package/dist/client/_nuxt/{BXfENWL6.js → Ba_2pva2.js} +1 -1
  54. package/dist/client/_nuxt/BeX7BQ1y.js +1 -0
  55. package/dist/client/_nuxt/{CThH5sBG.js → BfVRrWqI.js} +1 -1
  56. package/dist/client/_nuxt/BgEvnnZj.js +1 -0
  57. package/dist/client/_nuxt/{DKb4lQY2.js → Bgrlo6mM.js} +1 -1
  58. package/dist/client/_nuxt/{CdedUr_-.js → BiVAY1KT.js} +1 -1
  59. package/dist/client/_nuxt/Bl6w8nq6.js +29 -0
  60. package/dist/client/_nuxt/BmUjtHPt.js +1 -0
  61. package/dist/client/_nuxt/BnYPtiAB.js +1 -0
  62. package/dist/client/_nuxt/{B9S9BZZh.js → BotTw_1M.js} +1 -1
  63. package/dist/client/_nuxt/BpDWT_aG.js +1 -0
  64. package/dist/client/_nuxt/BpqPLH6b.js +1 -0
  65. package/dist/client/_nuxt/{ChMCFiS0.js → Br4herk8.js} +1 -1
  66. package/dist/client/_nuxt/Brmco9EZ.js +2 -0
  67. package/dist/client/_nuxt/Bs9WCFOo.js +1 -0
  68. package/dist/client/_nuxt/BtPWTO6-.js +1 -0
  69. package/dist/client/_nuxt/BuqjW-Uc.js +1 -0
  70. package/dist/client/_nuxt/BwUg_Rem.js +1 -0
  71. package/dist/client/_nuxt/Bxuka25Y.js +1 -0
  72. package/dist/client/_nuxt/{DsfXcHUZ.js → BxwkrKyP.js} +1 -27
  73. package/dist/client/_nuxt/ByN1NmdT.js +11 -0
  74. package/dist/client/_nuxt/C2Z2wNnw.js +1 -0
  75. package/dist/client/_nuxt/{CarfVElc.js → C3wf4cjV.js} +1 -54
  76. package/dist/client/_nuxt/C5J_9lw5.js +1 -0
  77. package/dist/client/_nuxt/C6doOGgB.js +1 -0
  78. package/dist/client/_nuxt/C7n-thn-.js +1 -0
  79. package/dist/client/_nuxt/C7xspq5a.js +1 -0
  80. package/dist/client/_nuxt/C8DXlOXe.js +1 -0
  81. package/dist/client/_nuxt/C9CNr0dZ.js +1 -0
  82. package/dist/client/_nuxt/CA2blNRc.js +1 -0
  83. package/dist/client/_nuxt/CCW61mLD.js +1 -0
  84. package/dist/client/_nuxt/CDNnVXJ3.js +1 -0
  85. package/dist/client/_nuxt/CDP-pALJ.js +1 -0
  86. package/dist/client/_nuxt/{JgH_6NEN.js → CFy8Z7mU.js} +1 -1
  87. package/dist/client/_nuxt/CHDuk4cg.js +1 -0
  88. package/dist/client/_nuxt/{DGEpfOTx.js → CJYoS41Z.js} +1 -1
  89. package/dist/client/_nuxt/CKK8qrH7.js +3 -0
  90. package/dist/client/_nuxt/CKqhLkpw.js +1 -0
  91. package/dist/client/_nuxt/CLTURUqp.js +9 -0
  92. package/dist/client/_nuxt/CPQn-Lhb.js +1 -0
  93. package/dist/client/_nuxt/CPw9RxLe.js +1 -0
  94. package/dist/client/_nuxt/CRUEGcu5.js +1 -0
  95. package/dist/client/_nuxt/{BN4LRXf6.js → CS6sTstm.js} +1 -1
  96. package/dist/client/_nuxt/{BVLuctcA.js → CSPPpfsQ.js} +1 -1
  97. package/dist/client/_nuxt/CTeQKLZv.js +1 -0
  98. package/dist/client/_nuxt/CTsPJjdJ.js +1 -0
  99. package/dist/client/_nuxt/{CsYA0RN7.js → CUNQUWO_.js} +1 -1
  100. package/dist/client/_nuxt/CV5B5C80.js +1 -0
  101. package/dist/client/_nuxt/CZkFsSlX.js +1 -0
  102. package/dist/client/_nuxt/C_g069vW.js +1 -0
  103. package/dist/client/_nuxt/{DZqG9GXz.js → C_h5G2He.js} +1 -31
  104. package/dist/client/_nuxt/CaR_I2C-.js +1 -0
  105. package/dist/client/_nuxt/Cb48SAmt.js +1 -0
  106. package/dist/client/_nuxt/{BmCW-tYz.js → CeIpHJfZ.js} +4 -78
  107. package/dist/client/_nuxt/{B9CT-1u6.js → CidHYXz9.js} +1 -7
  108. package/dist/client/_nuxt/{beD-FUib.js → ClPxYbPx.js} +1 -1
  109. package/dist/client/_nuxt/Clj_IpB8.js +1 -0
  110. package/dist/client/_nuxt/CmN1UzhW.js +1 -0
  111. package/dist/client/_nuxt/Crs1WKlG.js +1 -0
  112. package/dist/client/_nuxt/{KPqz0Sb3.js → CsW3I34-.js} +1 -1
  113. package/dist/client/_nuxt/CsuMf1xJ.js +1 -0
  114. package/dist/client/_nuxt/Ctb_e1-I.js +1 -0
  115. package/dist/client/_nuxt/CvHWZNAB.js +1 -0
  116. package/dist/client/_nuxt/CyUS7F7b.js +17 -0
  117. package/dist/client/_nuxt/Cz-n9WvF.js +1 -0
  118. package/dist/client/_nuxt/{CrhH3_Og.js → Cz3ygVR-.js} +1 -1
  119. package/dist/client/_nuxt/{sQpxpyUs.js → CzK8D06Z.js} +1 -1
  120. package/dist/client/_nuxt/{B1nm99XP.js → D0N_qbs7.js} +1 -1
  121. package/dist/client/_nuxt/D0pnavP-.js +1 -0
  122. package/dist/client/_nuxt/D25Gr2Wc.js +1 -0
  123. package/dist/client/_nuxt/D46m5Xd3.js +1 -0
  124. package/dist/client/_nuxt/D4miJ1xw.js +1 -0
  125. package/dist/client/_nuxt/D5lQfeOG.js +1 -0
  126. package/dist/client/_nuxt/D6oCKXcX.js +1 -0
  127. package/dist/client/_nuxt/D8V69RRQ.js +1 -0
  128. package/dist/client/_nuxt/DBLgxP_1.js +2 -0
  129. package/dist/client/_nuxt/{ByMv4Xf1.js → DCmDdbvy.js} +1 -1
  130. package/dist/client/_nuxt/DDG_rSGg.js +8 -0
  131. package/dist/client/_nuxt/{CX_FIdg1.js → DDK5Hw8n.js} +1 -1
  132. package/dist/client/_nuxt/DFHN_7lU.js +3 -0
  133. package/dist/client/_nuxt/DFaziNDp.js +1 -0
  134. package/dist/client/_nuxt/DFsxFixh.js +1 -0
  135. package/dist/client/_nuxt/DGhhRy1e.js +1 -0
  136. package/dist/client/_nuxt/{DdacRhvC.js → DIw1DfnK.js} +1 -1
  137. package/dist/client/_nuxt/DJNHLfzP.js +1 -0
  138. package/dist/client/_nuxt/{I4qd5QHW.js → DJOPMAPO.js} +5 -5
  139. package/dist/client/_nuxt/DKgh9jPU.js +20 -0
  140. package/dist/client/_nuxt/DO04iIl4.js +1 -0
  141. package/dist/client/_nuxt/DOOuMSMh.js +1 -0
  142. package/dist/client/_nuxt/DQ-rpzxz.js +1 -0
  143. package/dist/client/_nuxt/DRuVOcqL.js +1 -0
  144. package/dist/client/_nuxt/DSmiUmWA.js +1 -0
  145. package/dist/client/_nuxt/DSv7Jr7N.js +5 -0
  146. package/dist/client/_nuxt/DTMFIK7w.js +1 -0
  147. package/dist/client/_nuxt/DV9_Ze0W.js +1 -0
  148. package/dist/client/_nuxt/{6XBPEST2.js → DXdsTRaC.js} +1 -1
  149. package/dist/client/_nuxt/{DouzTJIq.js → DXtfa3TF.js} +1 -1
  150. package/dist/client/_nuxt/DYgwfmdY.js +1 -0
  151. package/dist/client/_nuxt/DYikCEmq.js +1 -0
  152. package/dist/client/_nuxt/{8t4jSAMm.js → DYrknm32.js} +1 -1
  153. package/dist/client/_nuxt/D_lsq3cR.js +1 -0
  154. package/dist/client/_nuxt/D_nC6SfZ.js +1 -0
  155. package/dist/client/_nuxt/Dc3u8CCo.js +1 -0
  156. package/dist/client/_nuxt/Df4vQnuo.js +1 -0
  157. package/dist/client/_nuxt/Di1G_BEd.js +1 -0
  158. package/dist/client/_nuxt/Dk2kDqHs.js +1 -0
  159. package/dist/client/_nuxt/DkIL16gc.js +2 -0
  160. package/dist/client/_nuxt/DmixpzPA.js +1 -0
  161. package/dist/client/_nuxt/Dnd6U92I.js +25 -0
  162. package/dist/client/_nuxt/DofIr7ih.js +1 -0
  163. package/dist/client/_nuxt/DqFtmHIk.js +1 -0
  164. package/dist/client/_nuxt/{Bh8mriwU.js → DrUHIbQf.js} +1 -17
  165. package/dist/client/_nuxt/{6Kuza3Wr.js → DrhOmAGa.js} +1 -1
  166. package/dist/client/_nuxt/DsO5WfEU.js +1 -0
  167. package/dist/client/_nuxt/DsclqnHy.js +4 -0
  168. package/dist/client/_nuxt/Dwk9V841.js +1 -0
  169. package/dist/client/_nuxt/DyLIn2qo.js +1 -0
  170. package/dist/client/_nuxt/{C9d3aiqh.js → DzhYcJWo.js} +1 -1
  171. package/dist/client/_nuxt/Dziqk49f.js +1 -0
  172. package/dist/client/_nuxt/E5r7Moxb.js +16 -0
  173. package/dist/client/_nuxt/{B_SUYfiV.js → FMRyFT8D.js} +1 -1
  174. package/dist/client/_nuxt/GACPk8cj.js +16 -0
  175. package/dist/client/_nuxt/H94RPpLS.js +1 -0
  176. package/dist/client/_nuxt/{DBxHOdLe.js → HxmVvryO.js} +1 -1
  177. package/dist/client/_nuxt/JYC31MTV.js +1 -0
  178. package/dist/client/_nuxt/Jl0QvYgb.js +1 -0
  179. package/dist/client/_nuxt/{BeX7Iu5M.js → KA8c-whL.js} +1 -90
  180. package/dist/client/_nuxt/KN-DOLVO.js +1 -0
  181. package/dist/client/_nuxt/Ka_J5llu.js +1 -0
  182. package/dist/client/_nuxt/KuNYkU7X.js +1 -0
  183. package/dist/client/_nuxt/MkuNFWFs.js +204 -0
  184. package/dist/client/_nuxt/{BaedD2tq.js → N3zwmhmW.js} +1 -1
  185. package/dist/client/_nuxt/O4cDyHwR.js +1 -0
  186. package/dist/client/_nuxt/OPd3ySAa.js +1 -0
  187. package/dist/client/_nuxt/Opso89zU.js +16 -0
  188. package/dist/client/_nuxt/P3XzCKkX.js +1 -0
  189. package/dist/client/_nuxt/PBlC1IT3.js +1 -0
  190. package/dist/client/_nuxt/PauOf_jS.js +1 -0
  191. package/dist/client/_nuxt/Qj0mFepl.js +14 -0
  192. package/dist/client/_nuxt/R9SNgiQ9.js +1 -0
  193. package/dist/client/_nuxt/{C6XIsc4F.js → Rc0-bMtX.js} +1 -1
  194. package/dist/client/_nuxt/TYaudu4O.js +1 -0
  195. package/dist/client/_nuxt/VRCUJX8G.js +1 -0
  196. package/dist/client/_nuxt/{BH1M7C1g.js → VntNkNt1.js} +1 -1
  197. package/dist/client/_nuxt/{C_8Fx7bH.js → Ys9ZunwU.js} +1 -1
  198. package/dist/client/_nuxt/bEygH-WE.js +3 -0
  199. package/dist/client/_nuxt/builds/latest.json +1 -1
  200. package/dist/client/_nuxt/builds/meta/4133e154-aafc-47ec-8a1d-f5919be391d9.json +1 -0
  201. package/dist/client/_nuxt/eJKZXzCK.js +1 -0
  202. package/dist/client/_nuxt/eQYbbmqd.js +16 -0
  203. package/dist/client/_nuxt/entry.DtsycVcr.css +1 -0
  204. package/dist/client/_nuxt/error-404.CUF_CFKB.css +1 -0
  205. package/dist/client/_nuxt/error-500.BR60owpQ.css +1 -0
  206. package/dist/client/_nuxt/gwSZkKbG.js +1 -0
  207. package/dist/client/_nuxt/i0hkWYmE.js +1 -0
  208. package/dist/client/_nuxt/ithPx4uF.js +1 -0
  209. package/dist/client/_nuxt/{CiRxTSAc.js → jDrCW69G.js} +1 -1
  210. package/dist/client/_nuxt/kveMaAK5.js +1 -0
  211. package/dist/client/_nuxt/lBoe4CZw.js +1 -0
  212. package/dist/client/_nuxt/{Bgpqy2XC.js → lPxKsdjn.js} +1 -1
  213. package/dist/client/_nuxt/lRZxrFTT.js +1 -0
  214. package/dist/client/_nuxt/mvTh5Gok.js +1 -0
  215. package/dist/client/_nuxt/pCnzZaOt.js +1 -0
  216. package/dist/client/_nuxt/qpF8edk8.js +1 -0
  217. package/dist/client/_nuxt/qvnQm5y7.js +1 -0
  218. package/dist/client/_nuxt/qwoaayiL.js +1 -0
  219. package/dist/client/_nuxt/t1S7pxBA.js +1 -0
  220. package/dist/client/_nuxt/t6MJYFCU.js +5 -0
  221. package/dist/client/_nuxt/tEd5xQ4M.js +1 -0
  222. package/dist/client/_nuxt/xGgVA17b.js +1 -0
  223. package/dist/client/_nuxt/{Bj5xdiaE.js → xuIuMB9j.js} +1 -1
  224. package/dist/client/_nuxt/yvfKceIB.js +1 -0
  225. package/dist/client/_nuxt/z5DqfkHR.js +1 -0
  226. package/dist/client/index.html +222 -213
  227. package/dist/module.d.mts +6 -2
  228. package/dist/module.d.ts +6 -2
  229. package/dist/module.json +2 -2
  230. package/dist/module.mjs +246 -131
  231. package/dist/runtime/nitro/og-image/bindings/chromium/chrome-launcher.js +1 -1
  232. package/dist/runtime/nitro/og-image/bindings/chromium/on-demand.js +1 -1
  233. package/dist/runtime/nitro/og-image/bindings/satori/wasm.js +1 -1
  234. package/dist/runtime/nitro/og-image/{cache.d.ts → cache/lru.d.ts} +3 -1
  235. package/dist/runtime/nitro/og-image/{cache.js → cache/lru.js} +6 -0
  236. package/dist/runtime/nitro/og-image/cache/mock.d.ts +9 -0
  237. package/dist/runtime/nitro/og-image/cache/mock.js +9 -0
  238. package/dist/runtime/nitro/og-image/chromium/renderer.js +1 -1
  239. package/dist/runtime/nitro/og-image/chromium/screenshot.js +1 -1
  240. package/dist/runtime/nitro/og-image/context.js +8 -8
  241. package/dist/runtime/nitro/og-image/satori/font.d.ts +1 -0
  242. package/dist/runtime/nitro/og-image/satori/font.js +2 -2
  243. package/dist/runtime/nitro/og-image/satori/instances.d.ts +1 -1
  244. package/dist/runtime/nitro/og-image/satori/plugins/encoding.js +1 -1
  245. package/dist/runtime/nitro/og-image/satori/plugins/flex.js +27 -2
  246. package/dist/runtime/nitro/og-image/satori/plugins/imageSrc.js +4 -4
  247. package/dist/runtime/nitro/og-image/satori/plugins/unocss.js +1 -1
  248. package/dist/runtime/nitro/og-image/satori/renderer.js +3 -7
  249. package/dist/runtime/nitro/og-image/satori/transforms/emojis.d.ts +0 -2
  250. package/dist/runtime/nitro/og-image/satori/transforms/emojis.js +1 -5
  251. package/dist/runtime/nitro/og-image/satori/transforms/inlineCss.js +1 -1
  252. package/dist/runtime/nitro/og-image/satori/vnodes.js +8 -8
  253. package/dist/runtime/nitro/og-image/templates/html.js +16 -21
  254. package/dist/runtime/nitro/plugins/__zero-runtime/nuxt-content.d.ts +2 -0
  255. package/dist/runtime/nitro/plugins/__zero-runtime/nuxt-content.js +9 -0
  256. package/dist/runtime/nitro/plugins/nuxt-content.js +2 -51
  257. package/dist/runtime/nitro/plugins/prerender.js +9 -4
  258. package/dist/runtime/nitro/routes/__zero-runtime/font.d.ts +2 -0
  259. package/dist/runtime/nitro/routes/__zero-runtime/font.js +8 -0
  260. package/dist/runtime/nitro/routes/__zero-runtime/image.d.ts +2 -0
  261. package/dist/runtime/nitro/routes/__zero-runtime/image.js +8 -0
  262. package/dist/runtime/nitro/routes/debug.json.js +2 -2
  263. package/dist/runtime/nitro/routes/font.js +3 -49
  264. package/dist/runtime/nitro/routes/image.js +3 -87
  265. package/dist/runtime/nitro/tsconfig.json +3 -3
  266. package/dist/runtime/nitro/util/cache.js +3 -3
  267. package/dist/runtime/nitro/util/eventHandlers.d.ts +3 -0
  268. package/dist/runtime/nitro/util/eventHandlers.js +155 -0
  269. package/dist/runtime/nitro/util/kit.d.ts +1 -1
  270. package/dist/runtime/nitro/util/kit.js +3 -3
  271. package/dist/runtime/nitro/util/plugins.d.ts +2 -0
  272. package/dist/runtime/nitro/util/plugins.js +54 -0
  273. package/dist/runtime/nuxt/components/OgImage/OgImage.d.ts +1 -3
  274. package/dist/runtime/nuxt/components/OgImage/OgImage.js +1 -1
  275. package/dist/runtime/nuxt/components/OgImage/OgImageScreenshot.d.ts +1 -3
  276. package/dist/runtime/nuxt/components/OgImage/OgImageScreenshot.js +1 -1
  277. package/dist/runtime/nuxt/components/Templates/Community/BrandedLogo.vue +29 -29
  278. package/dist/runtime/nuxt/components/Templates/Community/Frame.vue +64 -64
  279. package/dist/runtime/nuxt/components/Templates/Community/Nuxt.vue +185 -185
  280. package/dist/runtime/nuxt/components/Templates/Community/NuxtSeo.vue +137 -137
  281. package/dist/runtime/nuxt/components/Templates/Community/Pergel.vue +103 -103
  282. package/dist/runtime/nuxt/components/Templates/Community/SimpleBlog.vue +35 -35
  283. package/dist/runtime/nuxt/components/Templates/Community/UnJs.vue +108 -108
  284. package/dist/runtime/nuxt/components/Templates/Community/Wave.vue +34 -34
  285. package/dist/runtime/nuxt/components/Templates/Community/WithEmoji.vue +28 -28
  286. package/dist/runtime/nuxt/composables/defineOgImage.js +7 -5
  287. package/dist/runtime/nuxt/composables/defineOgImageComponent.d.ts +1 -1
  288. package/dist/runtime/nuxt/composables/mock.d.ts +1 -1
  289. package/dist/runtime/nuxt/plugins/__zero-runtime/og-image-canonical-urls.server.d.ts +2 -0
  290. package/dist/runtime/nuxt/plugins/__zero-runtime/og-image-canonical-urls.server.js +9 -0
  291. package/dist/runtime/nuxt/plugins/__zero-runtime/route-rule-og-image.server.d.ts +2 -0
  292. package/dist/runtime/nuxt/plugins/__zero-runtime/route-rule-og-image.server.js +9 -0
  293. package/dist/runtime/nuxt/plugins/og-image-canonical-urls.server.js +3 -51
  294. package/dist/runtime/nuxt/plugins/route-rule-og-image.server.js +4 -36
  295. package/dist/runtime/nuxt/utils/plugins.d.ts +3 -0
  296. package/dist/runtime/nuxt/utils/plugins.js +87 -0
  297. package/dist/runtime/nuxt/utils.js +6 -4
  298. package/dist/runtime/shared.js +3 -3
  299. package/dist/runtime/types.d.ts +6 -5
  300. package/dist/types.d.mts +0 -4
  301. package/dist/types.d.ts +0 -4
  302. package/package.json +56 -48
  303. package/virtual.d.ts +49 -49
  304. package/dist/client/_nuxt/-7WWnkdy.js +0 -517
  305. package/dist/client/_nuxt/0ooBkv16.js +0 -1
  306. package/dist/client/_nuxt/1Je9_Reo.js +0 -136
  307. package/dist/client/_nuxt/1rqFXsGc.js +0 -666
  308. package/dist/client/_nuxt/37ic6j3l.js +0 -1
  309. package/dist/client/_nuxt/3ghuYFLd.js +0 -1
  310. package/dist/client/_nuxt/9B1nZgL-.js +0 -1
  311. package/dist/client/_nuxt/9ZOzOPqN.js +0 -1
  312. package/dist/client/_nuxt/AgnqFTPX.js +0 -13
  313. package/dist/client/_nuxt/B3g-KkBK.js +0 -1
  314. package/dist/client/_nuxt/B4yE-MfL.js +0 -38
  315. package/dist/client/_nuxt/B6bHXiXE.js +0 -25
  316. package/dist/client/_nuxt/B7rNE5kf.js +0 -1
  317. package/dist/client/_nuxt/BB42E8aY.js +0 -186
  318. package/dist/client/_nuxt/BBBqETUW.js +0 -1
  319. package/dist/client/_nuxt/BBJYjQ0k.js +0 -1
  320. package/dist/client/_nuxt/BEjL32p1.js +0 -5754
  321. package/dist/client/_nuxt/BF6G6X0H.js +0 -1
  322. package/dist/client/_nuxt/BH_RS3WO.js +0 -1
  323. package/dist/client/_nuxt/BICIrM8O.js +0 -1
  324. package/dist/client/_nuxt/BIxS-Weu.js +0 -1
  325. package/dist/client/_nuxt/BLluXI4E.js +0 -1
  326. package/dist/client/_nuxt/BMHPAh1U.js +0 -2
  327. package/dist/client/_nuxt/BOpLLL-w.js +0 -1
  328. package/dist/client/_nuxt/BPiaQZfK.js +0 -1
  329. package/dist/client/_nuxt/BT9ZzGyQ.js +0 -69
  330. package/dist/client/_nuxt/BUpeXbsf.js +0 -25
  331. package/dist/client/_nuxt/BVGdgKAv.js +0 -1
  332. package/dist/client/_nuxt/BVkeqZ59.js +0 -1
  333. package/dist/client/_nuxt/BWKJ1FCf.js +0 -239
  334. package/dist/client/_nuxt/BXR915QZ.js +0 -32
  335. package/dist/client/_nuxt/BYdKNJ10.js +0 -1
  336. package/dist/client/_nuxt/BZfs-ost.js +0 -1
  337. package/dist/client/_nuxt/BZz1Hhek.js +0 -1
  338. package/dist/client/_nuxt/BaNxgKSR.js +0 -17
  339. package/dist/client/_nuxt/BacI6-DX.js +0 -40
  340. package/dist/client/_nuxt/Bbv8ARUV.js +0 -13
  341. package/dist/client/_nuxt/Bdt_eLrj.js +0 -756
  342. package/dist/client/_nuxt/BeJnKnI_.js +0 -544
  343. package/dist/client/_nuxt/Bg0wAK5a.js +0 -100
  344. package/dist/client/_nuxt/Bi43K_FX.js +0 -6
  345. package/dist/client/_nuxt/BiDE021q.js +0 -1
  346. package/dist/client/_nuxt/BigF1UXR.js +0 -1
  347. package/dist/client/_nuxt/Bj0fF4lQ.js +0 -1
  348. package/dist/client/_nuxt/BlxWTfDV.js +0 -699
  349. package/dist/client/_nuxt/BnyYJeap.js +0 -129
  350. package/dist/client/_nuxt/Br6ll-O0.js +0 -1
  351. package/dist/client/_nuxt/BscxmKrE.js +0 -8
  352. package/dist/client/_nuxt/Btshr8M_.js +0 -70
  353. package/dist/client/_nuxt/BwXNTs7T.js +0 -1
  354. package/dist/client/_nuxt/Bxkoe-BC.js +0 -1
  355. package/dist/client/_nuxt/C15OxdQ5.js +0 -1
  356. package/dist/client/_nuxt/C1DVX8_8.js +0 -831
  357. package/dist/client/_nuxt/C1yTBzia.js +0 -1
  358. package/dist/client/_nuxt/C2TBxDwV.js +0 -1
  359. package/dist/client/_nuxt/C3qJFuQy.js +0 -3
  360. package/dist/client/_nuxt/C3qUB5O8.js +0 -301
  361. package/dist/client/_nuxt/C6Aznpr-.js +0 -1
  362. package/dist/client/_nuxt/CApMHEaB.js +0 -1
  363. package/dist/client/_nuxt/CBPJd_fO.js +0 -1
  364. package/dist/client/_nuxt/CBWrHyXe.js +0 -580
  365. package/dist/client/_nuxt/CCqFro8U.js +0 -3
  366. package/dist/client/_nuxt/CEfge3mM.js +0 -1
  367. package/dist/client/_nuxt/CFF2d1j6.js +0 -1
  368. package/dist/client/_nuxt/CG4fK2Nq.js +0 -21
  369. package/dist/client/_nuxt/CJGKC1_q.js +0 -40
  370. package/dist/client/_nuxt/CJIaz0BQ.js +0 -76
  371. package/dist/client/_nuxt/CO5hpdkB.js +0 -1
  372. package/dist/client/_nuxt/CQUCfALx.js +0 -13
  373. package/dist/client/_nuxt/CSPeAESR.js +0 -1
  374. package/dist/client/_nuxt/C_ZPRiAj.js +0 -26
  375. package/dist/client/_nuxt/Cb-F_BZP.js +0 -1
  376. package/dist/client/_nuxt/CbViG2Xw.js +0 -74
  377. package/dist/client/_nuxt/CbYhyuC0.js +0 -505
  378. package/dist/client/_nuxt/CfPQhs6g.js +0 -7
  379. package/dist/client/_nuxt/Cgl53LJQ.js +0 -1
  380. package/dist/client/_nuxt/Cicx_DS6.js +0 -1
  381. package/dist/client/_nuxt/ClXEvkw9.js +0 -68
  382. package/dist/client/_nuxt/CowR2XfX.js +0 -1
  383. package/dist/client/_nuxt/Cp2HGa90.js +0 -353
  384. package/dist/client/_nuxt/CpAANOdC.js +0 -1
  385. package/dist/client/_nuxt/CqYeW6XZ.js +0 -1
  386. package/dist/client/_nuxt/CrgTADc5.js +0 -1
  387. package/dist/client/_nuxt/CsyrCbsw.js +0 -699
  388. package/dist/client/_nuxt/Cthz8VOO.js +0 -771
  389. package/dist/client/_nuxt/CuJfdYLG.js +0 -1
  390. package/dist/client/_nuxt/CupVZNk8.js +0 -25
  391. package/dist/client/_nuxt/CxrokwfH.js +0 -1
  392. package/dist/client/_nuxt/D384ylkT.js +0 -1
  393. package/dist/client/_nuxt/D4LaosRr.js +0 -1
  394. package/dist/client/_nuxt/D6pmzCqS.js +0 -1
  395. package/dist/client/_nuxt/D7WeZTai.js +0 -1
  396. package/dist/client/_nuxt/DAGYewaG.js +0 -559
  397. package/dist/client/_nuxt/DAP_O-zg.js +0 -1
  398. package/dist/client/_nuxt/DAVo6uMX.js +0 -1
  399. package/dist/client/_nuxt/DAfrLhwG.js +0 -1
  400. package/dist/client/_nuxt/DBeuZS66.js +0 -1
  401. package/dist/client/_nuxt/DC4hdoM9.js +0 -87
  402. package/dist/client/_nuxt/DC8MraHL.js +0 -666
  403. package/dist/client/_nuxt/DGO8GyiP.js +0 -1
  404. package/dist/client/_nuxt/DGxQkqYo.js +0 -1
  405. package/dist/client/_nuxt/DHmGyzbM.js +0 -109
  406. package/dist/client/_nuxt/DJZWsvj0.js +0 -1
  407. package/dist/client/_nuxt/DJubGRtk.js +0 -1
  408. package/dist/client/_nuxt/DK4oFTHQ.js +0 -200
  409. package/dist/client/_nuxt/DLP9ZvWb.js +0 -3
  410. package/dist/client/_nuxt/DM4HHECw.js +0 -1
  411. package/dist/client/_nuxt/DOHBU7tp.js +0 -1
  412. package/dist/client/_nuxt/DOtRmeXT.js +0 -1
  413. package/dist/client/_nuxt/DR5YgmI2.js +0 -1
  414. package/dist/client/_nuxt/DS9ZWoKD.js +0 -1
  415. package/dist/client/_nuxt/DSrLtGYv.js +0 -15
  416. package/dist/client/_nuxt/DSsji4Hu.js +0 -1
  417. package/dist/client/_nuxt/DV9JwLIa.js +0 -1
  418. package/dist/client/_nuxt/DVC_qXWv.js +0 -1
  419. package/dist/client/_nuxt/DVLwECkk.js +0 -1
  420. package/dist/client/_nuxt/DVfdqzEq.js +0 -1
  421. package/dist/client/_nuxt/DVxyIIKo.js +0 -1
  422. package/dist/client/_nuxt/DXFkqnOI.js +0 -816
  423. package/dist/client/_nuxt/DXT9h7v2.js +0 -1
  424. package/dist/client/_nuxt/DY7_9Ga-.js +0 -1
  425. package/dist/client/_nuxt/DYI1rfmx.js +0 -25
  426. package/dist/client/_nuxt/DZLoTQm4.js +0 -1
  427. package/dist/client/_nuxt/DbK06e1c.js +0 -21
  428. package/dist/client/_nuxt/Dble9ECP.js +0 -1
  429. package/dist/client/_nuxt/Dch3xQiY.js +0 -699
  430. package/dist/client/_nuxt/Dd6f7Z5P.js +0 -1
  431. package/dist/client/_nuxt/DfeQjIbs.js +0 -5
  432. package/dist/client/_nuxt/Dg0DGYq4.js +0 -14
  433. package/dist/client/_nuxt/DhFF74a2.js +0 -1
  434. package/dist/client/_nuxt/Dit6kIrv.js +0 -11
  435. package/dist/client/_nuxt/DmDrTTlz.js +0 -1
  436. package/dist/client/_nuxt/DrnZp123.js +0 -40
  437. package/dist/client/_nuxt/Du6_OKDb.js +0 -159
  438. package/dist/client/_nuxt/DvyTQcux.js +0 -1
  439. package/dist/client/_nuxt/Dwo2i-71.js +0 -1
  440. package/dist/client/_nuxt/DwuVtWc2.js +0 -518
  441. package/dist/client/_nuxt/DzwdaLuO.js +0 -223
  442. package/dist/client/_nuxt/ECt0lbkd.js +0 -16
  443. package/dist/client/_nuxt/Eh5U-gDp.js +0 -52
  444. package/dist/client/_nuxt/Ksn5IXup.js +0 -1
  445. package/dist/client/_nuxt/PWN5J14X.js +0 -1
  446. package/dist/client/_nuxt/PifQWv0n.js +0 -1
  447. package/dist/client/_nuxt/QZ3jNtnE.js +0 -515
  448. package/dist/client/_nuxt/RCJZWN-0.js +0 -81
  449. package/dist/client/_nuxt/RE3ujT-k.js +0 -1
  450. package/dist/client/_nuxt/RqY_Nz63.js +0 -1
  451. package/dist/client/_nuxt/Sfo2eW0G.js +0 -274
  452. package/dist/client/_nuxt/T9ysyp6P.js +0 -62
  453. package/dist/client/_nuxt/Urb1RsFe.js +0 -1
  454. package/dist/client/_nuxt/VQMr7AbF.js +0 -1
  455. package/dist/client/_nuxt/WfFM8TlZ.js +0 -1
  456. package/dist/client/_nuxt/builds/meta/5876a781-42f1-459e-a560-bbe16edad6b7.json +0 -1
  457. package/dist/client/_nuxt/cw46T5ID.js +0 -61
  458. package/dist/client/_nuxt/dIHJ9UdL.js +0 -1
  459. package/dist/client/_nuxt/eJfcURhx.js +0 -1
  460. package/dist/client/_nuxt/entry.BJu2ITzA.css +0 -1
  461. package/dist/client/_nuxt/error-404.B3wjZPBT.css +0 -1
  462. package/dist/client/_nuxt/error-500.Dxoa4Ooo.css +0 -1
  463. package/dist/client/_nuxt/i0IPvypD.js +0 -1
  464. package/dist/client/_nuxt/kuh6G-Sk.js +0 -9
  465. package/dist/client/_nuxt/nclm9rTJ.js +0 -266
  466. package/dist/client/_nuxt/vMsNTMhM.js +0 -5
  467. package/dist/client/_nuxt/wChcbJ1V.js +0 -37
  468. package/dist/client/_nuxt/xettH10j.js +0 -131
  469. package/dist/client/_nuxt/yX2IItqj.js +0 -1
@@ -1,544 +0,0 @@
1
- const e=Object.freeze({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+([0-9]+(?:\\.[0-9]+)*\\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[0-9]+(?:\\.[0-9]+)*\\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(?: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*\\()",name:"support.function.swift"},{comment:"Member functions in the standard library in Swift 2 only",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*\\()",name:"support.function.swift"}]},"builtin-global-functions":{patterns:[{begin:"\\b(type)(\\()\\s*(of)(:)",beginCaptures:{1:{name:"support.function.dynamic-type.swift"},2:{name:"punctuation.definition.arguments.begin.swift"},3:{name:"support.variable.parameter.swift"},4:{name:"punctuation.separator.argument-label.begin.swift"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.arguments.end.swift"}},patterns:[{include:"#expressions"}]},{comment:"Global functions available in Swift 3 which may be used with trailing closures and no parentheses",match:"\\b(?:anyGenerator|autoreleasepool)(?=\\s*[({])\\b",name:"support.function.swift"},{comment:"Global functions available in Swift 3",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*\\()",name:"support.function.swift"},{comment:"Global functions available in Swift 2 only",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*\\()",name:"support.function.swift"}]},"builtin-properties":{patterns:[{comment:"The simpler (?<=\\bProcess\\.|\\bCommandLine\\.) breaks VS Code / Atom, see https://github.com/textmate/swift.tmbundle/issues/29",match:"(?<=^Process\\.|\\WProcess\\.|^CommandLine\\.|\\WCommandLine\\.)(arguments|argc|unsafeArgv)",name:"support.variable.swift"},{comment:"Properties in the standard library in Swift 3",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",name:"support.variable.swift"},{comment:"Properties in the standard library in Swift 2 only",match:"(?<=\\.)(?:boolValue|disposition|end|objectIdentifier|quickLookObject|start|valueType)\\b",name:"support.variable.swift"},{comment:"Enum cases in the standard library - note that there is some overlap between these and the properties",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",name:"support.variable.swift"}]},"builtin-types":{comment:"Types provided in the standard library",patterns:[{include:"#builtin-types-builtin-class-type"},{include:"#builtin-types-builtin-enum-type"},{include:"#builtin-types-builtin-protocol-type"},{include:"#builtin-types-builtin-struct-type"},{include:"#builtin-types-builtin-typealias"},{match:"\\bAny\\b",name:"support.type.any.swift"}]},"builtin-types-builtin-class-type":{comment:"Builtin class types",match:"\\b(Managed(Buffer|ProtoBuffer)|NonObjectiveCBase|AnyGenerator)\\b",name:"support.class.swift"},"builtin-types-builtin-enum-type":{patterns:[{comment:"CommandLine is an enum, but it acts like a constant",match:"\\b(?:CommandLine|Process(?=\\.))\\b",name:"support.constant.swift"},{comment:"The return type of a function that never returns",match:"\\bNever\\b",name:"support.constant.never.swift"},{comment:"Enum types in the standard library in Swift 3",match:"\\b(?:ImplicitlyUnwrappedOptional|Representation|MemoryLayout|FloatingPointClassification|SetIndexRepresentation|SetIteratorRepresentation|FloatingPointRoundingRule|UnicodeDecodingResult|Optional|DictionaryIndexRepresentation|AncestorRepresentation|DisplayStyle|PlaygroundQuickLook|Never|FloatingPointSign|Bit|DictionaryIteratorRepresentation)\\b",name:"support.type.swift"},{comment:"Enum types in the standard library in Swift 2 only",match:"\\b(?:MirrorDisposition|QuickLookObject)\\b",name:"support.type.swift"}]},"builtin-types-builtin-protocol-type":{patterns:[{comment:"Protocols in the standard library in Swift 3",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",name:"support.type.swift"},{comment:"Protocols in the standard library in Swift 2 only",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",name:"support.type.swift"}]},"builtin-types-builtin-struct-type":{patterns:[{comment:"Structs in the standard library in Swift 3",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",name:"support.type.swift"},{comment:"Structs in the standard library in Swift 2 only",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",name:"support.type.swift"}]},"builtin-types-builtin-typealias":{patterns:[{comment:"Typealiases in the standard library in Swift 3",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",name:"support.type.swift"},{comment:"Typealiases in the standard library in Swift 2 only",match:"\\b(?:Generator|PlaygroundQuickLook|UWord|Word)\\b",name:"support.type.swift"}]},"code-block":{begin:"\\{",beginCaptures:{0:{name:"punctuation.section.scope.begin.swift"}},end:"\\}",endCaptures:{0:{name:"punctuation.section.scope.end.swift"}},patterns:[{include:"$self"}]},comments:{patterns:[{captures:{1:{name:"punctuation.definition.comment.swift"}},match:"\\A^(#!).*$\\n?",name:"comment.line.number-sign.swift"},{begin:"/\\*\\*(?!/)",beginCaptures:{0:{name:"punctuation.definition.comment.begin.swift"}},end:"\\*/",endCaptures:{0:{name:"punctuation.definition.comment.end.swift"}},name:"comment.block.documentation.swift",patterns:[{include:"#comments-nested"}]},{begin:"/\\*:",beginCaptures:{0:{name:"punctuation.definition.comment.begin.swift"}},end:"\\*/",endCaptures:{0:{name:"punctuation.definition.comment.end.swift"}},name:"comment.block.documentation.playground.swift",patterns:[{include:"#comments-nested"}]},{begin:"/\\*",beginCaptures:{0:{name:"punctuation.definition.comment.begin.swift"}},end:"\\*/",endCaptures:{0:{name:"punctuation.definition.comment.end.swift"}},name:"comment.block.swift",patterns:[{include:"#comments-nested"}]},{match:"\\*/",name:"invalid.illegal.unexpected-end-of-block-comment.swift"},{begin:"(^[ \\t]+)?(?=//)",beginCaptures:{1:{name:"punctuation.whitespace.comment.leading.swift"}},end:"(?!\\G)",patterns:[{begin:"///",beginCaptures:{0:{name:"punctuation.definition.comment.swift"}},end:"$",name:"comment.line.triple-slash.documentation.swift"},{begin:"//:",beginCaptures:{0:{name:"punctuation.definition.comment.swift"}},end:"$",name:"comment.line.double-slash.documentation.swift"},{begin:"//",beginCaptures:{0:{name:"punctuation.definition.comment.swift"}},end:"$",name:"comment.line.double-slash.swift"}]}]},"comments-nested":{begin:"/\\*",end:"\\*/",patterns:[{include:"#comments-nested"}]},"compiler-control":{patterns:[{begin:"^\\s*(#)(if|elseif)\\s+(false)\\b.*?(?=$|//|/\\*)",beginCaptures:{0:{name:"meta.preprocessor.conditional.swift"},1:{name:"punctuation.definition.preprocessor.swift"},2:{name:"keyword.control.import.preprocessor.conditional.swift"},3:{name:"constant.language.boolean.swift"}},contentName:"comment.block.preprocessor.swift",end:"(?=^\\s*(#(elseif|else|endif)\\b))"},{begin:"^\\s*(#)(if|elseif)\\s+",captures:{1:{name:"punctuation.definition.preprocessor.swift"},2:{name:"keyword.control.import.preprocessor.conditional.swift"}},end:"(?=\\s*(?://|/\\*))|$",name:"meta.preprocessor.conditional.swift",patterns:[{match:"(&&|\\|\\|)",name:"keyword.operator.logical.swift"},{match:"\\b(true|false)\\b",name:"constant.language.boolean.swift"},{captures:{1:{name:"keyword.other.condition.swift"},2:{name:"punctuation.definition.parameters.begin.swift"},3:{name:"support.constant.platform.architecture.swift"},4:{name:"punctuation.definition.parameters.end.swift"}},match:"\\b(arch)\\s*(\\()\\s*(?:(arm|arm64|powerpc64|powerpc64le|i386|x86_64|s390x)|\\w+)\\s*(\\))"},{captures:{1:{name:"keyword.other.condition.swift"},2:{name:"punctuation.definition.parameters.begin.swift"},3:{name:"support.constant.platform.os.swift"},4:{name:"punctuation.definition.parameters.end.swift"}},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"},3:{name:"entity.name.type.module.swift"},4:{name:"punctuation.definition.parameters.end.swift"}},match:"\\b(canImport)\\s*(\\()([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)(\\))"},{begin:"\\b(targetEnvironment)\\s*(\\()",beginCaptures:{1:{name:"keyword.other.condition.swift"},2:{name:"punctuation.definition.parameters.begin.swift"}},end:"(\\))|$",endCaptures:{1:{name:"punctuation.definition.parameters.end.swift"}},patterns:[{match:"\\b(simulator|UIKitForMac)\\b",name:"support.constant.platform.environment.swift"}]},{begin:"\\b(swift|compiler)\\s*(\\()",beginCaptures:{1:{name:"keyword.other.condition.swift"},2:{name:"punctuation.definition.parameters.begin.swift"}},end:"(\\))|$",endCaptures:{1:{name:"punctuation.definition.parameters.end.swift"}},patterns:[{match:">=|<",name:"keyword.operator.comparison.swift"},{match:"\\b[0-9]+(?:\\.[0-9]+)*\\b",name:"constant.numeric.swift"}]}]},{captures:{1:{name:"punctuation.definition.preprocessor.swift"},2:{name:"keyword.control.import.preprocessor.conditional.swift"},3:{patterns:[{match:"\\S+",name:"invalid.illegal.character-not-allowed-here.swift"}]}},match:"^\\s*(#)(else|endif)(.*?)(?=$|//|/\\*)",name:"meta.preprocessor.conditional.swift"},{captures:{1:{name:"punctuation.definition.preprocessor.swift"},2:{name:"keyword.control.import.preprocessor.sourcelocation.swift"},4:{name:"punctuation.definition.parameters.begin.swift"},5:{patterns:[{begin:'(file)\\s*(:)\\s*(?=")',beginCaptures:{1:{name:"support.variable.parameter.swift"},2:{name:"punctuation.separator.key-value.swift"}},end:"(?!\\G)",patterns:[{include:"#literals"}]},{captures:{1:{name:"support.variable.parameter.swift"},2:{name:"punctuation.separator.key-value.swift"},3:{name:"constant.numeric.integer.swift"}},match:"(line)\\s*(:)\\s*([0-9]+)"},{match:",",name:"punctuation.separator.parameters.swift"},{match:"\\S+",name:"invalid.illegal.character-not-allowed-here.swift"}]},6:{name:"punctuation.definition.parameters.begin.swift"},7:{patterns:[{match:"\\S+",name:"invalid.illegal.character-not-allowed-here.swift"}]}},match:"^\\s*(#)(sourceLocation)((\\()([^)]*)(\\)))(.*?)(?=$|//|/\\*)",name:"meta.preprocessor.sourcelocation.swift"}]},conditionals:{patterns:[{begin:"(?<!\\.)\\b(if|guard|switch|for)\\b",beginCaptures:{1:{patterns:[{include:"#keywords"}]}},end:"(?=\\{)",patterns:[{include:"#expressions-without-trailing-closures"}]},{begin:"(?<!\\.)\\b(while)\\b",beginCaptures:{1:{patterns:[{include:"#keywords"}]}},comment:"while can be the end of a repeat-while statement so doesn't necessarily have braces after it",end:"(?=\\{)|$",patterns:[{include:"#expressions-without-trailing-closures"}]}]},declarations:{patterns:[{include:"#declarations-function"},{include:"#declarations-function-initializer"},{include:"#declarations-function-subscript"},{include:"#declarations-typed-variable-declaration"},{include:"#declarations-import"},{include:"#declarations-operator"},{include:"#declarations-precedencegroup"},{include:"#declarations-protocol"},{include:"#declarations-type"},{include:"#declarations-extension"},{include:"#declarations-typealias"},{include:"#declarations-macro"}]},"declarations-available-types":{patterns:[{include:"#comments"},{include:"#builtin-types"},{include:"#attributes"},{match:"\\basync\\b",name:"storage.modifier.async.swift"},{match:"\\b(?:throws|rethrows)\\b",name:"storage.modifier.exception.swift"},{match:"\\bsome\\b",name:"keyword.other.operator.type.opaque.swift"},{match:"\\bany\\b",name:"keyword.other.operator.type.existential.swift"},{match:"\\b(?:repeat|each)\\b",name:"keyword.control.loop.swift"},{match:"\\b(?:inout|isolated|borrowing|consuming)\\b",name:"storage.modifier.swift"},{match:"\\bSelf\\b",name:"variable.language.swift"},{captures:{1:{name:"keyword.operator.type.function.swift"}},match:"(?<![/=\\-+!*%<>&|\\^~.])(->)(?![/=\\-+!*%<>&|\\^~.])"},{captures:{1:{name:"keyword.operator.type.composition.swift"}},comment:"Swift 3: A & B",match:"(?<![/=\\-+!*%<>&|\\^~.])(&)(?![/=\\-+!*%<>&|\\^~.])"},{match:"[?!]",name:"keyword.operator.type.optional.swift"},{match:"\\.\\.\\.",name:"keyword.operator.function.variadic-parameter.swift"},{comment:"Swift 2: protocol<A, B>",match:"\\bprotocol\\b",name:"keyword.other.type.composition.swift"},{match:"(?<=\\.)(?:Protocol|Type)\\b",name:"keyword.other.type.metatype.swift"},{include:"#declarations-available-types-tuple-type"},{include:"#declarations-available-types-collection-type"},{include:"#declarations-generic-argument-clause"}]},"declarations-available-types-collection-type":{begin:"\\[",beginCaptures:{0:{name:"punctuation.section.collection-type.begin.swift"}},comment:"array and dictionary types [Value] and [Key: Value]",end:"\\]|(?=[>){}])",endCaptures:{0:{name:"punctuation.section.collection-type.end.swift"}},patterns:[{include:"#declarations-available-types"},{begin:":",beginCaptures:{0:{name:"punctuation.separator.key-value.swift"}},end:"(?=\\]|[>){}])",patterns:[{match:":",name:"invalid.illegal.extra-colon-in-dictionary-type.swift"},{include:"#declarations-available-types"}]}]},"declarations-available-types-tuple-type":{begin:"\\(",beginCaptures:{0:{name:"punctuation.section.tuple-type.begin.swift"}},end:"\\)|(?=[>\\]{}])",endCaptures:{0:{name:"punctuation.section.tuple-type.end.swift"}},patterns:[{include:"#declarations-available-types"}]},"declarations-extension":{begin:"\\b(extension)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))",beginCaptures:{1:{name:"storage.type.$1.swift"},2:{name:"entity.name.type.swift",patterns:[{include:"#declarations-available-types"}]},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},end:"(?<=\\})",name:"meta.definition.type.$1.swift",patterns:[{include:"#comments"},{comment:"SE-0143: Conditional Conformances",include:"#declarations-generic-where-clause"},{include:"#declarations-inheritance-clause"},{begin:"\\{",beginCaptures:{0:{name:"punctuation.definition.type.begin.swift"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.type.end.swift"}},name:"meta.definition.type.body.swift",patterns:[{include:"$self"}]}]},"declarations-function":{begin:`(?x)
2
- \\b
3
- (func)
4
- \\s+
5
- (
6
- (?<q>\`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)
7
- | (?:
8
- (
9
- (?<oph>
10
- [/=\\-+!*%<>&|^~?]
11
- | [\\x{00A1}-\\x{00A7}]
12
- | [\\x{00A9}\\x{00AB}]
13
- | [\\x{00AC}\\x{00AE}]
14
- | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]
15
- | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]
16
- | [\\x{2030}-\\x{203E}]
17
- | [\\x{2041}-\\x{2053}]
18
- | [\\x{2055}-\\x{205E}]
19
- | [\\x{2190}-\\x{23FF}]
20
- | [\\x{2500}-\\x{2775}]
21
- | [\\x{2794}-\\x{2BFF}]
22
- | [\\x{2E00}-\\x{2E7F}]
23
- | [\\x{3001}-\\x{3003}]
24
- | [\\x{3008}-\\x{3030}]
25
- )
26
- (
27
- \\g<oph>
28
- | (?<opc>
29
- [\\x{0300}-\\x{036F}]
30
- | [\\x{1DC0}-\\x{1DFF}]
31
- | [\\x{20D0}-\\x{20FF}]
32
- | [\\x{FE00}-\\x{FE0F}]
33
- | [\\x{FE20}-\\x{FE2F}]
34
- | [\\x{E0100}-\\x{E01EF}]
35
- )
36
- )*
37
- )
38
- | ( \\. ( \\g<oph> | \\g<opc> | \\. )+ )
39
- )
40
- )
41
- \\s*
42
- (?=\\(|<)`,beginCaptures:{1:{name:"storage.type.function.swift"},2:{name:"entity.name.function.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},end:"(?<=\\})|$(?# functions in protocol declarations or generated interfaces have no body)",name:"meta.definition.function.swift",patterns:[{include:"#comments"},{include:"#declarations-generic-parameter-clause"},{include:"#declarations-parameter-clause"},{include:"#declarations-function-result"},{include:"#async-throws"},{comment:"Swift 3: generic constraints after the parameters and return type",include:"#declarations-generic-where-clause"},{begin:"(\\{)",beginCaptures:{1:{name:"punctuation.section.function.begin.swift"}},end:"(\\})",endCaptures:{1:{name:"punctuation.section.function.end.swift"}},name:"meta.definition.function.body.swift",patterns:[{include:"$self"}]}]},"declarations-function-initializer":{begin:"(?<!\\.)\\b(init[?!]*(?# only one is valid, but we want the in⇥ snippet to produce something that looks good))\\s*(?=\\(|<)",beginCaptures:{1:{name:"storage.type.function.swift",patterns:[{match:"(?<=[?!])[?!]+",name:"invalid.illegal.character-not-allowed-here.swift"}]}},end:"(?<=\\})|$",name:"meta.definition.function.initializer.swift",patterns:[{include:"#comments"},{include:"#declarations-generic-parameter-clause"},{include:"#declarations-parameter-clause"},{include:"#async-throws"},{comment:"Swift 3: generic constraints after the parameters and return type",include:"#declarations-generic-where-clause"},{begin:"(\\{)",beginCaptures:{1:{name:"punctuation.section.function.begin.swift"}},end:"(\\})",endCaptures:{1:{name:"punctuation.section.function.end.swift"}},name:"meta.definition.function.body.swift",patterns:[{include:"$self"}]}]},"declarations-function-result":{begin:"(?<![/=\\-+!*%<>&|\\^~.])(->)(?![/=\\-+!*%<>&|\\^~.])\\s*",beginCaptures:{1:{name:"keyword.operator.function-result.swift"}},end:"(?!\\G)(?=\\{|\\bwhere\\b|;|=)|$",name:"meta.function-result.swift",patterns:[{include:"#declarations-available-types"}]},"declarations-function-subscript":{begin:"(?<!\\.)\\b(subscript)\\s*(?=\\(|<)",beginCaptures:{1:{name:"storage.type.function.swift"}},end:"(?<=\\})|$",name:"meta.definition.function.subscript.swift",patterns:[{include:"#comments"},{include:"#declarations-generic-parameter-clause"},{include:"#declarations-parameter-clause"},{include:"#declarations-function-result"},{include:"#async-throws"},{include:"#declarations-generic-where-clause"},{begin:"(\\{)",beginCaptures:{1:{name:"punctuation.section.function.begin.swift"}},end:"(\\})",endCaptures:{1:{name:"punctuation.section.function.end.swift"}},name:"meta.definition.function.body.swift",patterns:[{include:"$self"}]}]},"declarations-generic-argument-clause":{begin:"<",beginCaptures:{0:{name:"punctuation.separator.generic-argument-clause.begin.swift"}},end:">|(?=[)\\]{}])",endCaptures:{0:{name:"punctuation.separator.generic-argument-clause.end.swift"}},name:"meta.generic-argument-clause.swift",patterns:[{include:"#declarations-available-types"}]},"declarations-generic-parameter-clause":{begin:"<",beginCaptures:{0:{name:"punctuation.separator.generic-parameter-clause.begin.swift"}},end:">|(?=[^\\w\\d:<>\\s,=&`])(?# characters besides these are never valid in a generic param list -- even if it's not really a valid clause, we should stop trying to parse it if we see one of them.)",endCaptures:{0:{name:"punctuation.separator.generic-parameter-clause.end.swift"}},name:"meta.generic-parameter-clause.swift",patterns:[{include:"#comments"},{comment:"Swift 2: constraints inside the generic param list",include:"#declarations-generic-where-clause"},{match:"\\beach\\b",name:"keyword.control.loop.swift"},{captures:{1:{name:"variable.language.generic-parameter.swift"}},match:"\\b((?!\\d)\\w[\\w\\d]*)\\b"},{match:",",name:"punctuation.separator.generic-parameters.swift"},{begin:"(:)\\s*",beginCaptures:{1:{name:"punctuation.separator.generic-parameter-constraint.swift"}},end:"(?=[,>]|(?!\\G)\\bwhere\\b)",name:"meta.generic-parameter-constraint.swift",patterns:[{begin:"\\G",end:"(?=[,>]|(?!\\G)\\bwhere\\b)",name:"entity.other.inherited-class.swift",patterns:[{include:"#declarations-type-identifier"},{include:"#declarations-type-operators"}]}]}]},"declarations-generic-where-clause":{begin:"\\b(where)\\b\\s*",beginCaptures:{1:{name:"keyword.other.generic-constraint-introducer.swift"}},end:"(?!\\G)$|(?=[>{};\\n]|//|/\\*)",name:"meta.generic-where-clause.swift",patterns:[{include:"#comments"},{include:"#declarations-generic-where-clause-requirement-list"}]},"declarations-generic-where-clause-requirement-list":{begin:"\\G|,\\s*",end:"(?=[,>{};\\n]|//|/\\*)",patterns:[{include:"#comments"},{include:"#constraint"},{include:"#declarations-available-types"},{begin:"(?<![/=\\-+!*%<>&|\\^~.])(==)(?![/=\\-+!*%<>&|\\^~.])",beginCaptures:{1:{name:"keyword.operator.generic-constraint.same-type.swift"}},end:"(?=\\s*[,>{};\\n]|//|/\\*)",name:"meta.generic-where-clause.same-type-requirement.swift",patterns:[{include:"#declarations-available-types"}]},{begin:"(?<![/=\\-+!*%<>&|\\^~.])(:)(?![/=\\-+!*%<>&|\\^~.])",beginCaptures:{1:{name:"keyword.operator.generic-constraint.conforms-to.swift"}},end:"(?=\\s*[,>{};\\n]|//|/\\*)",name:"meta.generic-where-clause.conformance-requirement.swift",patterns:[{begin:"\\G\\s*",contentName:"entity.other.inherited-class.swift",end:"(?=\\s*[,>{};\\n]|//|/\\*)",patterns:[{include:"#declarations-available-types"}]}]}]},"declarations-import":{begin:"(?<!\\.)\\b(import)\\s+",beginCaptures:{1:{name:"keyword.control.import.swift"}},end:"(;)|$\\n?|(?=//|/\\*)",endCaptures:{1:{name:"punctuation.terminator.statement.swift"}},name:"meta.import.swift",patterns:[{begin:"\\G(?!;|$|//|/\\*)(?:(typealias|struct|class|actor|enum|protocol|var|func)\\s+)?",beginCaptures:{1:{name:"storage.modifier.swift"}},end:"(?=;|$|//|/\\*)",patterns:[{captures:{1:{name:"punctuation.definition.identifier.swift"},2:{name:"punctuation.definition.identifier.swift"}},match:`(?x)
43
- (?<=\\G|\\.)
44
- (?<q>\`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)`,name:"entity.name.type.swift"},{match:`(?x)
45
- (?<=\\G|\\.)
46
- \\$[0-9]+`,name:"entity.name.type.swift"},{captures:{1:{patterns:[{match:"\\.",name:"invalid.illegal.dot-not-allowed-here.swift"}]}},match:`(?x)
47
- (?<=\\G|\\.)
48
- (?:
49
- (
50
- (?<oph>
51
- [/=\\-+!*%<>&|^~?]
52
- | [\\x{00A1}-\\x{00A7}]
53
- | [\\x{00A9}\\x{00AB}]
54
- | [\\x{00AC}\\x{00AE}]
55
- | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]
56
- | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]
57
- | [\\x{2030}-\\x{203E}]
58
- | [\\x{2041}-\\x{2053}]
59
- | [\\x{2055}-\\x{205E}]
60
- | [\\x{2190}-\\x{23FF}]
61
- | [\\x{2500}-\\x{2775}]
62
- | [\\x{2794}-\\x{2BFF}]
63
- | [\\x{2E00}-\\x{2E7F}]
64
- | [\\x{3001}-\\x{3003}]
65
- | [\\x{3008}-\\x{3030}]
66
- )
67
- (
68
- \\g<oph>
69
- | (?<opc>
70
- [\\x{0300}-\\x{036F}]
71
- | [\\x{1DC0}-\\x{1DFF}]
72
- | [\\x{20D0}-\\x{20FF}]
73
- | [\\x{FE00}-\\x{FE0F}]
74
- | [\\x{FE20}-\\x{FE2F}]
75
- | [\\x{E0100}-\\x{E01EF}]
76
- )
77
- )*
78
- )
79
- | ( \\. ( \\g<oph> | \\g<opc> | \\. )+ )
80
- )
81
- (?=\\.|;|$|//|/\\*|\\s)`,name:"entity.name.type.swift"},{match:"\\.",name:"punctuation.separator.import.swift"},{begin:"(?!\\s*(;|$|//|/\\*))",end:"(?=\\s*(;|$|//|/\\*))",name:"invalid.illegal.character-not-allowed-here.swift"}]}]},"declarations-inheritance-clause":{begin:"(:)(?=\\s*\\{)|(:)\\s*",beginCaptures:{1:{name:"invalid.illegal.empty-inheritance-clause.swift"},2:{name:"punctuation.separator.inheritance-clause.swift"}},end:"(?!\\G)$|(?=[={}]|(?!\\G)\\bwhere\\b)",name:"meta.inheritance-clause.swift",patterns:[{begin:"\\bclass\\b",beginCaptures:{0:{name:"storage.type.class.swift"}},end:"(?=[={}]|(?!\\G)\\bwhere\\b)",patterns:[{include:"#comments"},{include:"#declarations-inheritance-clause-more-types"}]},{begin:"\\G",end:"(?!\\G)$|(?=[={}]|(?!\\G)\\bwhere\\b)",patterns:[{include:"#comments"},{include:"#declarations-inheritance-clause-inherited-type"},{include:"#declarations-inheritance-clause-more-types"},{include:"#declarations-type-operators"}]}]},"declarations-inheritance-clause-inherited-type":{begin:"(?=[`\\p{L}_])",end:"(?!\\G)",name:"entity.other.inherited-class.swift",patterns:[{include:"#declarations-type-identifier"}]},"declarations-inheritance-clause-more-types":{begin:",\\s*",end:"(?!\\G)(?!//|/\\*)|(?=[,={}]|(?!\\G)\\bwhere\\b)",name:"meta.inheritance-list.more-types",patterns:[{include:"#comments"},{include:"#declarations-inheritance-clause-inherited-type"},{include:"#declarations-inheritance-clause-more-types"},{include:"#declarations-type-operators"}]},"declarations-macro":{begin:`(?x)
82
- \\b
83
- (macro)
84
- \\s+
85
- ((?<q>\`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))
86
- \\s*
87
- (?=\\(|<|=)`,beginCaptures:{1:{name:"storage.type.function.swift"},2:{name:"entity.name.function.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},end:"$|(?=;|//|/\\*|\\}|=)",name:"meta.definition.macro.swift",patterns:[{include:"#comments"},{include:"#declarations-generic-parameter-clause"},{include:"#declarations-parameter-clause"},{include:"#declarations-function-result"},{include:"#async-throws"},{comment:"Swift 3: generic constraints after the parameters and return type",include:"#declarations-generic-where-clause"}]},"declarations-operator":{begin:`(?x)
88
- (?:
89
- \\b(prefix|infix|postfix)
90
- \\s+
91
- )?
92
- \\b
93
- (operator)
94
- \\s+
95
- (
96
- (
97
- (?<oph>
98
- [/=\\-+!*%<>&|^~?]
99
- | [\\x{00A1}-\\x{00A7}]
100
- | [\\x{00A9}\\x{00AB}]
101
- | [\\x{00AC}\\x{00AE}]
102
- | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]
103
- | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]
104
- | [\\x{2030}-\\x{203E}]
105
- | [\\x{2041}-\\x{2053}]
106
- | [\\x{2055}-\\x{205E}]
107
- | [\\x{2190}-\\x{23FF}]
108
- | [\\x{2500}-\\x{2775}]
109
- | [\\x{2794}-\\x{2BFF}]
110
- | [\\x{2E00}-\\x{2E7F}]
111
- | [\\x{3001}-\\x{3003}]
112
- | [\\x{3008}-\\x{3030}]
113
- )
114
- (
115
- \\g<oph>
116
- | \\.
117
- | (?<opc>
118
- [\\x{0300}-\\x{036F}]
119
- | [\\x{1DC0}-\\x{1DFF}]
120
- | [\\x{20D0}-\\x{20FF}]
121
- | [\\x{FE00}-\\x{FE0F}]
122
- | [\\x{FE20}-\\x{FE2F}]
123
- | [\\x{E0100}-\\x{E01EF}]
124
- )
125
- )*+
126
- )
127
- | ( \\. ( \\g<oph> | \\g<opc> | \\. )++ )
128
- )
129
- \\s*`,beginCaptures:{1:{name:"storage.modifier.swift"},2:{name:"storage.type.function.operator.swift"},3:{name:"entity.name.function.operator.swift"},4:{comment:"workaround for https://github.com/microsoft/vscode-textmate/issues/140#issuecomment-1793610346",name:"entity.name.function.operator.swift",patterns:[{match:"\\.",name:"invalid.illegal.dot-not-allowed-here.swift"}]}},end:"(;)|$\\n?|(?=//|/\\*)",endCaptures:{1:{name:"punctuation.terminator.statement.swift"}},name:"meta.definition.operator.swift",patterns:[{include:"#declarations-operator-swift2"},{include:"#declarations-operator-swift3"},{match:"((?!$|;|//|/\\*)\\S)+",name:"invalid.illegal.character-not-allowed-here.swift"}]},"declarations-operator-swift2":{begin:"\\G(\\{)",beginCaptures:{1:{name:"punctuation.definition.operator.begin.swift"}},end:"(\\})",endCaptures:{1:{name:"punctuation.definition.operator.end.swift"}},patterns:[{include:"#comments"},{captures:{1:{name:"storage.modifier.swift"},2:{name:"keyword.other.operator.associativity.swift"}},match:"\\b(associativity)\\s+(left|right)\\b"},{captures:{1:{name:"storage.modifier.swift"},2:{name:"constant.numeric.integer.swift"}},match:"\\b(precedence)\\s+([0-9]+)\\b"},{captures:{1:{name:"storage.modifier.swift"}},match:"\\b(assignment)\\b"}]},"declarations-operator-swift3":{captures:{2:{name:"entity.other.inherited-class.swift",patterns:[{include:"#declarations-types-precedencegroup"}]},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},match:"\\G(:)\\s*((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))"},"declarations-parameter-clause":{begin:"(\\()",beginCaptures:{1:{name:"punctuation.definition.parameters.begin.swift"}},end:"(\\))(?:\\s*(async)\\b)?",endCaptures:{1:{name:"punctuation.definition.parameters.end.swift"},2:{name:"storage.modifier.async.swift"}},name:"meta.parameter-clause.swift",patterns:[{include:"#declarations-parameter-list"}]},"declarations-parameter-list":{patterns:[{captures:{1:{name:"entity.name.function.swift"},2:{name:"punctuation.definition.identifier.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"variable.parameter.function.swift"},5:{name:"punctuation.definition.identifier.swift"},6:{name:"punctuation.definition.identifier.swift"}},comment:"External parameter labels are considered part of the function name",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*:)"},{captures:{1:{name:"variable.parameter.function.swift"},2:{name:"entity.name.function.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},comment:"If no external label is given, the name is both the external label and the internal variable name",match:"(((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)))(?=\\s*:)"},{begin:":\\s*(?!\\s)",end:"(?=[,)])",patterns:[{include:"#declarations-available-types"},{match:":",name:"invalid.illegal.extra-colon-in-parameter-list.swift"},{begin:"=",beginCaptures:{0:{name:"keyword.operator.assignment.swift"}},comment:"a parameter's default value",end:"(?=[,)])",patterns:[{include:"#expressions"}]}]}]},"declarations-precedencegroup":{begin:"\\b(precedencegroup)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(?=\\{)",beginCaptures:{1:{name:"storage.type.precedencegroup.swift"},2:{name:"entity.name.type.precedencegroup.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},end:"(?!\\G)",name:"meta.definition.precedencegroup.swift",patterns:[{begin:"\\{",beginCaptures:{0:{name:"punctuation.definition.precedencegroup.begin.swift"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.precedencegroup.end.swift"}},patterns:[{include:"#comments"},{captures:{1:{name:"storage.modifier.swift"},2:{name:"entity.other.inherited-class.swift",patterns:[{include:"#declarations-types-precedencegroup"}]},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},match:"\\b(higherThan|lowerThan)\\s*:\\s*((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))"},{captures:{1:{name:"storage.modifier.swift"},2:{name:"keyword.other.operator.associativity.swift"}},match:"\\b(associativity)\\b(?:\\s*:\\s*(right|left|none)\\b)?"},{captures:{1:{name:"storage.modifier.swift"},2:{name:"constant.language.boolean.swift"}},match:"\\b(assignment)\\b(?:\\s*:\\s*(true|false)\\b)?"}]}]},"declarations-protocol":{begin:"\\b(protocol)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))",beginCaptures:{1:{name:"storage.type.$1.swift"},2:{name:"entity.name.type.$1.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},end:"(?<=\\})",name:"meta.definition.type.protocol.swift",patterns:[{include:"#comments"},{include:"#declarations-inheritance-clause"},{comment:"SE-0142: Permit where clauses to constrain associated types",include:"#declarations-generic-where-clause"},{begin:"\\{",beginCaptures:{0:{name:"punctuation.definition.type.begin.swift"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.type.end.swift"}},name:"meta.definition.type.body.swift",patterns:[{include:"#declarations-protocol-protocol-method"},{include:"#declarations-protocol-protocol-initializer"},{include:"#declarations-protocol-associated-type"},{include:"$self"}]}]},"declarations-protocol-associated-type":{begin:"\\b(associatedtype)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*",beginCaptures:{1:{name:"keyword.other.declaration-specifier.swift"},2:{name:"variable.language.associatedtype.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},end:"(?!\\G)$|(?=[;}]|$)",name:"meta.definition.associatedtype.swift",patterns:[{include:"#declarations-inheritance-clause"},{comment:"SE-0142: Permit where clauses to constrain associated types",include:"#declarations-generic-where-clause"},{include:"#declarations-typealias-assignment"}]},"declarations-protocol-protocol-initializer":{begin:"(?<!\\.)\\b(init[?!]*(?# only one is valid, but we want the in⇥ snippet to produce something that looks good))\\s*(?=\\(|<)",beginCaptures:{1:{name:"storage.type.function.swift",patterns:[{match:"(?<=[?!])[?!]+",name:"invalid.illegal.character-not-allowed-here.swift"}]}},end:"$|(?=;|//|/\\*|\\})",name:"meta.definition.function.initializer.swift",patterns:[{include:"#comments"},{include:"#declarations-generic-parameter-clause"},{include:"#declarations-parameter-clause"},{include:"#async-throws"},{comment:"Swift 3: generic constraints after the parameters and return type",include:"#declarations-generic-where-clause"},{begin:"\\{",beginCaptures:{0:{name:"punctuation.section.function.begin.swift"}},end:"\\}",endCaptures:{0:{name:"punctuation.section.function.end.swift"}},name:"invalid.illegal.function-body-not-allowed-in-protocol.swift",patterns:[{include:"$self"}]}]},"declarations-protocol-protocol-method":{begin:`(?x)
130
- \\b
131
- (func)
132
- \\s+
133
- (
134
- (?<q>\`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)
135
- | (?:
136
- (
137
- (?<oph>
138
- [/=\\-+!*%<>&|^~?]
139
- | [\\x{00A1}-\\x{00A7}]
140
- | [\\x{00A9}\\x{00AB}]
141
- | [\\x{00AC}\\x{00AE}]
142
- | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]
143
- | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]
144
- | [\\x{2030}-\\x{203E}]
145
- | [\\x{2041}-\\x{2053}]
146
- | [\\x{2055}-\\x{205E}]
147
- | [\\x{2190}-\\x{23FF}]
148
- | [\\x{2500}-\\x{2775}]
149
- | [\\x{2794}-\\x{2BFF}]
150
- | [\\x{2E00}-\\x{2E7F}]
151
- | [\\x{3001}-\\x{3003}]
152
- | [\\x{3008}-\\x{3030}]
153
- )
154
- (
155
- \\g<oph>
156
- | (?<opc>
157
- [\\x{0300}-\\x{036F}]
158
- | [\\x{1DC0}-\\x{1DFF}]
159
- | [\\x{20D0}-\\x{20FF}]
160
- | [\\x{FE00}-\\x{FE0F}]
161
- | [\\x{FE20}-\\x{FE2F}]
162
- | [\\x{E0100}-\\x{E01EF}]
163
- )
164
- )*
165
- )
166
- | ( \\. ( \\g<oph> | \\g<opc> | \\. )+ )
167
- )
168
- )
169
- \\s*
170
- (?=\\(|<)`,beginCaptures:{1:{name:"storage.type.function.swift"},2:{name:"entity.name.function.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},end:"$|(?=;|//|/\\*|\\})",name:"meta.definition.function.swift",patterns:[{include:"#comments"},{include:"#declarations-generic-parameter-clause"},{include:"#declarations-parameter-clause"},{include:"#declarations-function-result"},{include:"#async-throws"},{comment:"Swift 3: generic constraints after the parameters and return type",include:"#declarations-generic-where-clause"},{begin:"\\{",beginCaptures:{0:{name:"punctuation.section.function.begin.swift"}},end:"\\}",endCaptures:{0:{name:"punctuation.section.function.end.swift"}},name:"invalid.illegal.function-body-not-allowed-in-protocol.swift",patterns:[{include:"$self"}]}]},"declarations-type":{patterns:[{begin:"\\b(class(?!\\s+(?:func|var|let)\\b)|struct|actor)\\b\\s*((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))",beginCaptures:{1:{name:"storage.type.$1.swift"},2:{name:"entity.name.type.$1.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},end:"(?<=\\})",name:"meta.definition.type.$1.swift",patterns:[{include:"#comments"},{include:"#declarations-generic-parameter-clause"},{comment:"Swift 3: generic constraints after the generic param list",include:"#declarations-generic-where-clause"},{include:"#declarations-inheritance-clause"},{begin:"\\{",beginCaptures:{0:{name:"punctuation.definition.type.begin.swift"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.type.end.swift"}},name:"meta.definition.type.body.swift",patterns:[{include:"$self"}]}]},{include:"#declarations-type-enum"}]},"declarations-type-enum":{begin:"\\b(enum)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))",beginCaptures:{1:{name:"storage.type.$1.swift"},2:{name:"entity.name.type.$1.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},end:"(?<=\\})",name:"meta.definition.type.$1.swift",patterns:[{include:"#comments"},{include:"#declarations-generic-parameter-clause"},{comment:"Swift 3: generic constraints after the generic param list",include:"#declarations-generic-where-clause"},{include:"#declarations-inheritance-clause"},{begin:"\\{",beginCaptures:{0:{name:"punctuation.definition.type.begin.swift"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.type.end.swift"}},name:"meta.definition.type.body.swift",patterns:[{include:"#declarations-type-enum-enum-case-clause"},{include:"$self"}]}]},"declarations-type-enum-associated-values":{begin:"\\G\\(",beginCaptures:{0:{name:"punctuation.definition.parameters.begin.swift"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.parameters.end.swift"}},patterns:[{include:"#comments"},{begin:`(?x)
171
- (?:(_)|((?<q1>\`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q1>))
172
- \\s+
173
- (((?<q2>\`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q2>))
174
- \\s*(:)`,beginCaptures:{1:{name:"entity.name.function.swift"},2:{name:"invalid.illegal.distinct-labels-not-allowed.swift"},5:{name:"variable.parameter.function.swift"},7:{name:"punctuation.separator.argument-label.swift"}},end:"(?=[,)\\]])",patterns:[{include:"#declarations-available-types"}]},{begin:"(((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q>))\\s*(:)",beginCaptures:{1:{name:"entity.name.function.swift"},2:{name:"variable.parameter.function.swift"},4:{name:"punctuation.separator.argument-label.swift"}},end:"(?=[,)\\]])",patterns:[{include:"#declarations-available-types"}]},{begin:"(?![,)\\]])(?=\\S)",comment:"an element without a label (i.e. anything else)",end:"(?=[,)\\]])",patterns:[{include:"#declarations-available-types"},{match:":",name:"invalid.illegal.extra-colon-in-parameter-list.swift"}]}]},"declarations-type-enum-enum-case":{begin:"(?x)((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*",beginCaptures:{1:{name:"variable.other.enummember.swift"}},end:"(?<=\\))|(?![=(])",patterns:[{include:"#comments"},{include:"#declarations-type-enum-associated-values"},{include:"#declarations-type-enum-raw-value-assignment"}]},"declarations-type-enum-enum-case-clause":{begin:"\\b(case)\\b\\s*",beginCaptures:{1:{name:"storage.type.enum.case.swift"}},end:"(?=[;}])|(?!\\G)(?!//|/\\*)(?=[^\\s,])",patterns:[{include:"#comments"},{include:"#declarations-type-enum-enum-case"},{include:"#declarations-type-enum-more-cases"}]},"declarations-type-enum-more-cases":{begin:",\\s*",end:"(?!\\G)(?!//|/\\*)(?=[;}]|[^\\s,])",name:"meta.enum-case.more-cases",patterns:[{include:"#comments"},{include:"#declarations-type-enum-enum-case"},{include:"#declarations-type-enum-more-cases"}]},"declarations-type-enum-raw-value-assignment":{begin:"(=)\\s*",beginCaptures:{1:{name:"keyword.operator.assignment.swift"}},end:"(?!\\G)",patterns:[{include:"#comments"},{include:"#literals"}]},"declarations-type-identifier":{begin:"((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*",beginCaptures:{1:{name:"meta.type-name.swift",patterns:[{include:"#builtin-types"}]},2:{name:"punctuation.definition.identifier.swift"},3:{name:"punctuation.definition.identifier.swift"}},end:"(?!<)",patterns:[{begin:"(?=<)",end:"(?!\\G)",patterns:[{include:"#declarations-generic-argument-clause"}]}]},"declarations-type-operators":{patterns:[{captures:{1:{name:"keyword.operator.type.composition.swift"}},comment:"Swift 3: A & B",match:"(?<![/=\\-+!*%<>&|\\^~.])(&)(?![/=\\-+!*%<>&|\\^~.])"},{captures:{1:{name:"keyword.operator.type.requirement-suppression.swift"}},comment:"SE-0390: Noncopyable structs and enums",match:"(?<![/=\\-+!*%<>&|\\^~.])(~)(?![/=\\-+!*%<>&|\\^~.])"}]},"declarations-typealias":{begin:"\\b(typealias)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*",beginCaptures:{1:{name:"keyword.other.declaration-specifier.swift"},2:{name:"entity.name.type.typealias.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.identifier.swift"}},end:"(?!\\G)$|(?=;|//|/\\*|$)",name:"meta.definition.typealias.swift",patterns:[{begin:"\\G(?=<)",end:"(?!\\G)",patterns:[{include:"#declarations-generic-parameter-clause"}]},{include:"#declarations-typealias-assignment"}]},"declarations-typealias-assignment":{begin:"(=)\\s*",beginCaptures:{1:{name:"keyword.operator.assignment.swift"}},end:"(?!\\G)$|(?=;|//|/\\*|$)",patterns:[{include:"#declarations-available-types"}]},"declarations-typed-variable-declaration":{begin:`(?x)
175
- \\b(?:(async)\\s+)?(let|var)\\b\\s+
176
- (?<q>\`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\\s*
177
- :`,beginCaptures:{1:{name:"storage.modifier.async.swift"},2:{name:"keyword.other.declaration-specifier.swift"}},end:"(?=$|[={])",patterns:[{include:"#declarations-available-types"}]},"declarations-types-precedencegroup":{patterns:[{comment:"Precedence groups in the standard library",match:"\\b(?:BitwiseShift|Assignment|RangeFormation|Casting|Addition|NilCoalescing|Comparison|LogicalConjunction|LogicalDisjunction|Default|Ternary|Multiplication|FunctionArrow)Precedence\\b",name:"support.type.swift"}]},expressions:{comment:"trailing closures need to be parsed before other member references",patterns:[{include:"#expressions-without-trailing-closures-or-member-references"},{include:"#expressions-trailing-closure"},{include:"#member-reference"}]},"expressions-trailing-closure":{patterns:[{captures:{1:{name:"support.function.any-method.swift"},2:{name:"punctuation.definition.identifier.swift"},3:{name:"punctuation.definition.identifier.swift"}},comment:"foo { body } -- a call with a trailing closure and no argument clause",match:"(#?(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))(?=\\s*\\{)",name:"meta.function-call.trailing-closure-only.swift"},{captures:{1:{name:"support.function.any-method.trailing-closure-label.swift"},2:{name:"punctuation.definition.identifier.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.separator.argument-label.swift"}},comment:"foo: { body } -- labeled-trailing-closure (SE-0279)",match:"((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(:)(?=\\s*\\{)"}]},"expressions-without-trailing-closures":{patterns:[{include:"#expressions-without-trailing-closures-or-member-references"},{include:"#member-references"}]},"expressions-without-trailing-closures-or-member-references":{patterns:[{include:"#comments"},{include:"#code-block"},{include:"#attributes"},{include:"#expressions-without-trailing-closures-or-member-references-closure-parameter"},{include:"#literals"},{include:"#operators"},{include:"#builtin-types"},{include:"#builtin-functions"},{include:"#builtin-global-functions"},{include:"#builtin-properties"},{include:"#expressions-without-trailing-closures-or-member-references-compound-name"},{include:"#conditionals"},{include:"#keywords"},{include:"#expressions-without-trailing-closures-or-member-references-availability-condition"},{include:"#expressions-without-trailing-closures-or-member-references-function-or-macro-call-expression"},{include:"#expressions-without-trailing-closures-or-member-references-macro-expansion"},{include:"#expressions-without-trailing-closures-or-member-references-subscript-expression"},{include:"#expressions-without-trailing-closures-or-member-references-parenthesized-expression"},{match:"\\b_\\b",name:"support.variable.discard-value.swift"}]},"expressions-without-trailing-closures-or-member-references-availability-condition":{begin:"\\B(#(?:un)?available)(\\()",beginCaptures:{1:{name:"support.function.availability-condition.swift"},2:{name:"punctuation.definition.arguments.begin.swift"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.arguments.end.swift"}},patterns:[{captures:{1:{name:"keyword.other.platform.os.swift"},2:{name:"constant.numeric.swift"}},match:"\\s*\\b((?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))"},{captures:{1:{name:"keyword.other.platform.all.swift"},2:{name:"invalid.illegal.character-not-allowed-here.swift"}},match:"(\\*)\\s*(.*?)(?=[,)])"},{match:"[^\\s,)]+",name:"invalid.illegal.character-not-allowed-here.swift"}]},"expressions-without-trailing-closures-or-member-references-closure-parameter":{match:"\\$[0-9]+",name:"variable.language.closure-parameter.swift"},"expressions-without-trailing-closures-or-member-references-compound-name":{captures:{1:{name:"entity.name.function.compound-name.swift"},2:{name:"punctuation.definition.entity.swift"},3:{name:"punctuation.definition.entity.swift"},4:{patterns:[{captures:{1:{name:"punctuation.definition.entity.swift"},2:{name:"punctuation.definition.entity.swift"}},match:"(?<q>`?)(?!_:)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>):",name:"entity.name.function.compound-name.swift"}]}},comment:"a reference to a function with disambiguating argument labels, such as foo(_:), foo(bar:), etc.",match:`(?x)
178
- ((?<q1>\`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q1>))
179
- \\(
180
- (
181
- (
182
- ((?<q2>\`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q2>))
183
- :
184
- )+
185
- )
186
- \\)`},"expressions-without-trailing-closures-or-member-references-expression-element-list":{patterns:[{include:"#comments"},{begin:"((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(:)",beginCaptures:{1:{name:"support.function.any-method.swift"},2:{name:"punctuation.definition.identifier.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.separator.argument-label.swift"}},comment:"an element with a label",end:"(?=[,)\\]])",patterns:[{include:"#expressions"}]},{begin:"(?![,)\\]])(?=\\S)",comment:"an element without a label (i.e. anything else)",end:"(?=[,)\\]])",patterns:[{include:"#expressions"}]}]},"expressions-without-trailing-closures-or-member-references-function-or-macro-call-expression":{patterns:[{begin:"(#?(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(\\()",beginCaptures:{1:{name:"support.function.any-method.swift"},2:{name:"punctuation.definition.identifier.swift"},3:{name:"punctuation.definition.identifier.swift"},4:{name:"punctuation.definition.arguments.begin.swift"}},comment:"foo(args) -- a call whose callee is a highlightable name",end:"\\)",endCaptures:{0:{name:"punctuation.definition.arguments.end.swift"}},name:"meta.function-call.swift",patterns:[{include:"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]},{begin:"(?<=[`\\])}>\\p{L}_\\p{N}\\p{M}])\\s*(\\()",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.swift"}},comment:"[Int](args) -- a call whose callee is a more complicated expression",end:"\\)",endCaptures:{0:{name:"punctuation.definition.arguments.end.swift"}},name:"meta.function-call.swift",patterns:[{include:"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]}]},"expressions-without-trailing-closures-or-member-references-macro-expansion":{match:"(#(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))",name:"support.function.any-method.swift"},"expressions-without-trailing-closures-or-member-references-parenthesized-expression":{begin:"\\(",beginCaptures:{0:{name:"punctuation.section.tuple.begin.swift"}},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',end:"(\\))\\s*((?:\\b(?:async|throws|rethrows)\\s)*)",endCaptures:{1:{name:"punctuation.section.tuple.end.swift"},2:{patterns:[{match:"\\brethrows\\b",name:"invalid.illegal.rethrows-only-allowed-on-function-declarations.swift"},{include:"#async-throws"}]}},patterns:[{include:"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]},"expressions-without-trailing-closures-or-member-references-subscript-expression":{begin:"(?<=[`\\p{L}_\\p{N}\\p{M}])\\s*(\\[)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.swift"}},end:"\\]",endCaptures:{0:{name:"punctuation.definition.arguments.end.swift"}},name:"meta.subscript-expression.swift",patterns:[{include:"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]},keywords:{patterns:[{match:"(?<!\\.)\\b(?:if|else|guard|where|switch|case|default|fallthrough)\\b",name:"keyword.control.branch.swift"},{match:"(?<!\\.)\\b(?:continue|break|fallthrough|return)\\b",name:"keyword.control.transfer.swift"},{match:"(?<!\\.)\\b(?:while|for|in|each)\\b",name:"keyword.control.loop.swift"},{match:"\\bany\\b(?=\\s*`?[\\p{L}_])",name:"keyword.other.operator.type.existential.swift"},{captures:{1:{name:"keyword.control.loop.swift"},2:{name:"punctuation.whitespace.trailing.repeat.swift"}},comment:"extra scopes for repeat-while snippet",match:"(?<!\\.)\\b(repeat)\\b(\\s*)"},{match:"(?<!\\.)\\bdefer\\b",name:"keyword.control.defer.swift"},{captures:{1:{name:"invalid.illegal.try-must-precede-await.swift"},2:{name:"keyword.control.await.swift"}},match:"(?<!\\.)\\b(?:(await\\s+try)|(await))\\b"},{match:"(?<!\\.)\\b(?:catch|throw|try)\\b|\\btry[?!]\\B",name:"keyword.control.exception.swift"},{match:"(?<!\\.)\\b(?:throws|rethrows)\\b",name:"storage.modifier.exception.swift"},{captures:{1:{name:"keyword.control.exception.swift"},2:{name:"punctuation.whitespace.trailing.do.swift"}},comment:"extra scopes for do-catch snippet",match:"(?<!\\.)\\b(do)\\b(\\s*)"},{captures:{1:{name:"storage.modifier.async.swift"},2:{name:"keyword.other.declaration-specifier.swift"}},match:"(?<!\\.)\\b(?:(async)\\s+)?(let|var)\\b"},{match:"(?<!\\.)\\b(?:associatedtype|operator|typealias)\\b",name:"keyword.other.declaration-specifier.swift"},{match:"(?<!\\.)\\b(class|enum|extension|precedencegroup|protocol|struct|actor)\\b(?=\\s*`?[\\p{L}_])",name:"storage.type.$1.swift"},{match:"(?<!\\.)\\b(?:inout|static|final|lazy|mutating|nonmutating|optional|indirect|required|override|dynamic|convenience|infix|prefix|postfix|distributed|nonisolated|borrowing|consuming)\\b",name:"storage.modifier.swift"},{match:"\\binit[?!]|\\binit\\b|(?<!\\.)\\b(?:func|deinit|subscript|didSet|get|set|willSet)\\b",name:"storage.type.function.swift"},{match:"(?<!\\.)\\b(?:fileprivate|private|internal|public|open|package)\\b",name:"keyword.other.declaration-specifier.accessibility.swift"},{comment:"matches weak, unowned, unowned(safe), unowned(unsafe)",match:"(?<!\\.)\\bunowned\\((?:safe|unsafe)\\)|(?<!\\.)\\b(?:weak|unowned)\\b",name:"keyword.other.capture-specifier.swift"},{captures:{1:{name:"keyword.other.type.swift"},2:{name:"keyword.other.type.metatype.swift"}},match:"(?<=\\.)(?:(dynamicType|self)|(Protocol|Type))\\b"},{match:"(?<!\\.)\\b(?:super|self|Self)\\b",name:"variable.language.swift"},{match:"\\B(?:#file|#filePath|#fileID|#line|#column|#function|#dsohandle)\\b|\\b(?:__FILE__|__LINE__|__COLUMN__|__FUNCTION__|__DSO_HANDLE__)\\b",name:"support.variable.swift"},{match:"(?<!\\.)\\bimport\\b",name:"keyword.control.import.swift"},{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"',match:"(?<!\\.)\\bconsume(?=\\s+`?[\\p{L}_])",name:"keyword.control.consume.swift"},{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"',match:"(?<!\\.)\\bcopy(?=\\s+`?[\\p{L}_])",name:"keyword.control.copy.swift"}]},literals:{patterns:[{include:"#literals-boolean"},{include:"#literals-numeric"},{include:"#literals-string"},{match:"\\bnil\\b",name:"constant.language.nil.swift"},{comment:'object "literals" used in playgrounds',match:"\\B#(colorLiteral|imageLiteral|fileLiteral)\\b",name:"support.function.object-literal.swift"},{match:"\\B#externalMacro\\b",name:"support.function.builtin-macro.swift"},{match:"\\B#keyPath\\b",name:"support.function.key-path.swift"},{begin:"\\B(#selector)(\\()(?:\\s*(getter|setter)\\s*(:))?",beginCaptures:{1:{name:"support.function.selector-reference.swift"},2:{name:"punctuation.definition.arguments.begin.swift"},3:{name:"support.variable.parameter.swift"},4:{name:"punctuation.separator.argument-label.swift"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.arguments.end.swift"}},patterns:[{include:"#expressions"}]},{include:"#literals-regular-expression-literal"}]},"literals-boolean":{match:"\\b(true|false)\\b",name:"constant.language.boolean.swift"},"literals-numeric":{patterns:[{comment:"0.1, -4_2.5, 6.022e23, 10E-5",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])",name:"constant.numeric.float.decimal.swift"},{comment:"-0x1.ap2_3, 0x31p-4",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])",name:"constant.numeric.float.hexadecimal.swift"},{comment:"0x1p, 0x1p_2, 0x1.5pa, 0x1.1p+1f, 0x1pz",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])",name:"invalid.illegal.numeric.float.invalid-exponent.swift"},{comment:"0x1.5w (note that 0x1.f may be a valid expression)",match:"(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)\\.[0-9][\\w.]*",name:"invalid.illegal.numeric.float.missing-exponent.swift"},{comment:"-.5, .2f (note that 1.-.5 may be a valid expression)",match:"(?<=\\s|^)\\-?\\.[0-9][\\w.]*",name:"invalid.illegal.numeric.float.missing-leading-zero.swift"},{comment:"0b_0_1, 0x_1p+3q",match:"(\\B\\-|\\b)0[box]_[0-9a-fA-F_]*(?:[pPeE][+-]?\\w+)?[\\w.]+",name:"invalid.illegal.numeric.leading-underscore.swift"},{comment:"tuple positional member: not really a numeric literal, but not invalid",match:"(?<=[\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9]+\\b"},{comment:"0b010, 0b1_0",match:"(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0b[01][01_]*\\b(?!\\.[0-9])",name:"constant.numeric.integer.binary.swift"},{comment:"0o1, 0o7_3",match:"(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0o[0-7][0-7_]*\\b(?!\\.[0-9])",name:"constant.numeric.integer.octal.swift"},{comment:"02, 3_456",match:"(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9][0-9_]*\\b(?!\\.[0-9])",name:"constant.numeric.integer.decimal.swift"},{comment:"0x4, 0xF_7",match:"(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0x[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\.[0-9])",name:"constant.numeric.integer.hexadecimal.swift"},{match:"(\\B\\-|\\b)[0-9][\\w.]*",name:"invalid.illegal.numeric.other.swift"}]},"literals-regular-expression-literal":{comment:"SE-0354 & SE-0355",patterns:[{begin:"(#+)/\\n",end:"/\\1",name:"string.regexp.block.swift",patterns:[{include:"#literals-regular-expression-literal-regex-guts"},{include:"#literals-regular-expression-literal-line-comment"}]},{captures:{0:{patterns:[{include:"#literals-regular-expression-literal-regex-guts"}]},1:{name:"punctuation.definition.string.begin.regexp.swift"},12:{name:"punctuation.definition.string.end.regexp.swift"},13:{name:"invalid.illegal.returns-not-allowed.regexp"}},comment:`Single-line regular expression literals must be matched all in one go
187
- in order to avoid ambiguities with operators, and to adhere to certain
188
- parsing rules in SE-0354/SE-0355, such as:
189
- - A regex literal will not be parsed if it contains an unbalanced ).
190
- - A regex may end with a space only if it began with an escaped space`,match:`(?x)
191
- (((\\#+)?)/)
192
- (?(3)|(?!/))
193
- (?(3)|(?!\\s))
194
- (\\\\\\s)?
195
- (?<guts>
196
- (?>
197
- (?:
198
- \\\\Q
199
- (?:(?!\\\\E)(?!/\\2).)*+
200
- (?:\\\\E
201
-
202
- | (?(3)|(?<!\\s))(?=/\\2)
203
- )
204
- | \\\\.
205
- | \\(\\?\\#[^)]*\\)
206
- | \\(\\?
207
-
208
- \\{(?<g1>\\{)?+(?<g2>\\{)?+(?<g3>\\{)?+(?<g4>\\{)?+(?<g5>\\{)?+
209
- .+?
210
- \\}(?(<g1>)\\})(?(<g2>)\\})(?(<g3>)\\})(?(<g4>)\\})(?(<g5>)\\})
211
- (?:\\[(?!\\d)\\w+\\])?
212
- [X<>]?
213
- \\)
214
- | (?<class>\\[ (?:\\\\. | [^\\[\\]] | \\g<class>)+ \\])
215
- | \\(\\g<guts>?+\\)
216
- | (?:(?!/\\2)[^()\\[\\\\])+
217
- )+
218
- )
219
- )?+
220
- # may end with a space only if it is an extended literal or contains only a single escaped space
221
- (?(3)|(?(5)(?<!\\s)))
222
- (/\\2)
223
- | \\#+/.+(\\n)`,name:"string.regexp.line.swift"}]},"literals-regular-expression-literal-backreference-or-subpattern":{comment:"These patterns are separated to work around issues like https://github.com/microsoft/vscode-textmate/issues/164",patterns:[{captures:{1:{name:"constant.character.escape.backslash.regexp"},2:{name:"variable.other.group-name.regexp"},3:{name:"keyword.operator.recursion-level.regexp"},4:{name:"constant.numeric.integer.decimal.regexp"},5:{name:"constant.numeric.integer.decimal.regexp"},6:{name:"keyword.operator.recursion-level.regexp"},7:{name:"constant.numeric.integer.decimal.regexp"},8:{name:"constant.character.escape.backslash.regexp"}},comment:"'\\g{' NamedOrNumberRef '}'",match:"(?x)(\\\\g\\{) (?: ((?!\\d)\\w+) (?:([+-])(\\d+))? | ([+-]?\\d+) (?:([+-])(\\d+))? ) (\\})"},{captures:{1:{name:"constant.character.escape.backslash.regexp"},2:{name:"constant.numeric.integer.decimal.regexp"},3:{name:"keyword.operator.recursion-level.regexp"},4:{name:"constant.numeric.integer.decimal.regexp"}},comment:"'\\g' NumberRef",match:"(?x)(\\\\g) ([+-]?\\d+) (?:([+-])(\\d+))?"},{captures:{1:{name:"constant.character.escape.backslash.regexp"},3:{name:"variable.other.group-name.regexp"},4:{name:"keyword.operator.recursion-level.regexp"},5:{name:"constant.numeric.integer.decimal.regexp"},6:{name:"constant.numeric.integer.decimal.regexp"},7:{name:"keyword.operator.recursion-level.regexp"},8:{name:"constant.numeric.integer.decimal.regexp"},9:{name:"constant.character.escape.backslash.regexp"}},comment:`'\\k<' NamedOrNumberRef '>'
224
- "\\k'" NamedOrNumberRef "'"
225
- '\\g<' NamedOrNumberRef '>'
226
- "\\g'" NamedOrNumberRef "'"`,match:"(?x)(\\\\[gk](<)|\\\\[gk]') (?: ((?!\\d)\\w+) (?:([+-])(\\d+))? | ([+-]?\\d+) (?:([+-])(\\d+))? ) ((?(2)>|'))"},{captures:{1:{name:"constant.character.escape.backslash.regexp"},2:{name:"variable.other.group-name.regexp"},3:{name:"keyword.operator.recursion-level.regexp"},4:{name:"constant.numeric.integer.decimal.regexp"},5:{name:"constant.character.escape.backslash.regexp"}},comment:"'\\k{' NamedRef '}'",match:"(?x)(\\\\k\\{) ((?!\\d)\\w+) (?:([+-])(\\d+))? (\\})"},{match:"\\\\[1-9][0-9]+",name:"keyword.other.back-reference.regexp"},{captures:{1:{name:"keyword.other.back-reference.regexp"},2:{name:"variable.other.group-name.regexp"},3:{name:"keyword.operator.recursion-level.regexp"},4:{name:"constant.numeric.integer.decimal.regexp"},5:{name:"keyword.other.back-reference.regexp"}},comment:"'(?P=' NamedRef ')'",match:"(?x)(\\(\\?(?:P[=>]|&)) ((?!\\d)\\w+) (?:([+-])(\\d+))? (\\))"},{match:"\\(\\?R\\)",name:"keyword.other.back-reference.regexp"},{captures:{1:{name:"keyword.other.back-reference.regexp"},2:{name:"constant.numeric.integer.decimal.regexp"},3:{name:"keyword.operator.recursion-level.regexp"},4:{name:"constant.numeric.integer.decimal.regexp"},5:{name:"keyword.other.back-reference.regexp"}},comment:"'(?' NumberRef ')'",match:"(?x)(\\(\\?) ([+-]?\\d+) (?:([+-])(\\d+))? (\\))"}]},"literals-regular-expression-literal-backtracking-directive-or-global-matching-option":{captures:{1:{name:"keyword.control.directive.regexp"},2:{name:"keyword.control.directive.regexp"},3:{name:"keyword.control.directive.regexp"},4:{name:"variable.language.tag.regexp"},5:{name:"keyword.control.directive.regexp"},6:{name:"keyword.operator.assignment.regexp"},7:{name:"constant.numeric.integer.decimal.regexp"},8:{name:"keyword.control.directive.regexp"},9:{name:"keyword.control.directive.regexp"}},match:`(?x)
227
- (\\(\\*)
228
- (?:
229
- (ACCEPT|FAIL|F|MARK(?=:)|(?=:)|COMMIT|PRUNE|SKIP|THEN)
230
- (?:(:)([^)]+))?
231
- | (?:(LIMIT_(?:DEPTH|HEAP|MATCH))(=)(\\d+))
232
- | (
233
- CRLF | CR | ANYCRLF | ANY | LF | NUL
234
- | BSR_ANYCRLF | BSR_UNICODE
235
- | NOTEMPTY_ATSTART | NOTEMPTY
236
- | NO_AUTO_POSSESS | NO_DOTSTAR_ANCHOR
237
- | NO_JIT | NO_START_OPT | UTF | UCP
238
- )
239
- )
240
- (\\))`},"literals-regular-expression-literal-callout":{captures:{1:{name:"punctuation.definition.group.regexp"},2:{name:"keyword.control.callout.regexp"},3:{name:"constant.numeric.integer.decimal.regexp"},4:{name:"entity.name.function.callout.regexp"},5:{name:"entity.name.function.callout.regexp"},6:{name:"entity.name.function.callout.regexp"},7:{name:"entity.name.function.callout.regexp"},8:{name:"entity.name.function.callout.regexp"},9:{name:"entity.name.function.callout.regexp"},10:{name:"entity.name.function.callout.regexp"},11:{name:"entity.name.function.callout.regexp"},12:{name:"punctuation.definition.group.regexp"},13:{name:"punctuation.definition.group.regexp"},14:{name:"keyword.control.callout.regexp"},15:{name:"entity.name.function.callout.regexp"},16:{name:"variable.language.tag-name.regexp"},17:{name:"punctuation.definition.group.regexp"},18:{name:"punctuation.definition.group.regexp"},19:{name:"keyword.control.callout.regexp"},26:{name:"variable.language.tag-name.regexp"},27:{name:"keyword.control.callout.regexp"},28:{name:"punctuation.definition.group.regexp"}},match:`(?x)
241
- # PCRECallout
242
- (\\()(?<keyw>\\?C)
243
- (?:
244
- (?<num>\\d+)
245
- | \`(?<name>(?:[^\`]|\`\`)*)\`
246
- | '(?<name>(?:[^']|'')*)'
247
- | "(?<name>(?:[^"]|"")*)"
248
- | \\^(?<name>(?:[^\\^]|\\^\\^)*)\\^
249
- | %(?<name>(?:[^%]|%%)*)%
250
- | \\#(?<name>(?:[^#]|\\#\\#)*)\\#
251
- | \\$(?<name>(?:[^$]|\\$\\$)*)\\$
252
- | \\{(?<name>(?:[^}]|\\}\\})*)\\}
253
- )?
254
- (\\))
255
- # NamedCallout
256
- | (\\()(?<keyw>\\*)
257
- (?<name>(?!\\d)\\w+)
258
- (?:\\[(?<tag>(?!\\d)\\w+)\\])?
259
- (?:\\{ [^,}]+ (?:,[^,}]+)* \\})?
260
- (\\))
261
- # InterpolatedCallout
262
- | (\\()(?<keyw>\\?)
263
-
264
- (\\{(?<g1>\\{)?+(?<g2>\\{)?+(?<g3>\\{)?+(?<g4>\\{)?+(?<g5>\\{)?+) .+? \\}(?(<g1>)\\})(?(<g2>)\\})(?(<g3>)\\})(?(<g4>)\\})(?(<g5>)\\})
265
- (?:\\[(?<tag>(?!\\d)\\w+)\\])?
266
- (?<keyw>[X<>]?)
267
- (\\))`,name:"meta.callout.regexp"},"literals-regular-expression-literal-character-properties":{captures:{1:{name:"support.variable.character-property.regexp"},2:{name:"punctuation.definition.character-class.regexp"},3:{name:"support.variable.character-property.regexp"},4:{name:"punctuation.definition.character-class.regexp"}},match:`(?x)
268
- \\\\[pP]\\{ ([\\s\\w-]+(?:=[\\s\\w-]+)?) \\}
269
- | (\\[:) ([\\s\\w-]+(?:=[\\s\\w-]+)?) (:\\])`,name:"constant.other.character-class.set.regexp"},"literals-regular-expression-literal-custom-char-class":{patterns:[{begin:"(\\[)(\\^)?",beginCaptures:{1:{name:"punctuation.definition.character-class.regexp"},2:{name:"keyword.operator.negation.regexp"}},end:"\\]",endCaptures:{0:{name:"punctuation.definition.character-class.regexp"}},name:"constant.other.character-class.set.regexp",patterns:[{include:"#literals-regular-expression-literal-custom-char-class-members"}]}]},"literals-regular-expression-literal-custom-char-class-members":{comment:"TODO: should also include atoms?",patterns:[{comment:"\\b inside a character class represents a backspace",match:"\\\\b",name:"constant.character.escape.backslash.regexp"},{include:"#literals-regular-expression-literal-custom-char-class"},{include:"#literals-regular-expression-literal-quote"},{include:"#literals-regular-expression-literal-set-operators"},{include:"#literals-regular-expression-literal-unicode-scalars"},{include:"#literals-regular-expression-literal-character-properties"}]},"literals-regular-expression-literal-group-option-toggle":{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',match:`(?x)
270
- \\(\\?
271
- (?:
272
- \\^(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*
273
- | (?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})+
274
- | (?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})* - (?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*
275
- )
276
- \\)`,name:"keyword.other.option-toggle.regexp"},"literals-regular-expression-literal-group-or-conditional":{patterns:[{begin:"(\\()(\\?~)",beginCaptures:{1:{name:"punctuation.definition.group.regexp"},2:{name:"keyword.control.conditional.absent.regexp"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.group.regexp"}},name:"meta.group.absent.regexp",patterns:[{include:"#literals-regular-expression-literal-regex-guts"}]},{begin:`(?x)
277
- # KnownConditionalStart
278
- (\\() (?<cond>\\?\\()
279
- (?:
280
- (?<NumberRef> (?<num>[+-]?\\d+)(?:(?<op>[+-])(?<num>\\d+))? )
281
- | (?<cond>R) \\g<NumberRef>?
282
- | (?<cond>R&) (?<NamedRef> (?<name>(?!\\d)\\w+) (?:(?<op>[+-])(?<num>\\d+))? )
283
- | (?<cond><) (?:\\g<NamedRef>|\\g<NumberRef>) (?<cond>>)
284
- | (?<cond>') (?:\\g<NamedRef>|\\g<NumberRef>) (?<cond>')
285
- | (?<cond>DEFINE)
286
- | (?<cond>VERSION)(?<compar>>?=)(?<num>\\d+\\.\\d+)
287
- )
288
- (?<cond>\\))
289
- | (\\()(?<cond>\\?)(?=\\()`,beginCaptures:{1:{name:"punctuation.definition.group.regexp"},2:{name:"keyword.control.conditional.regexp"},4:{name:"constant.numeric.integer.decimal.regexp"},5:{name:"keyword.operator.recursion-level.regexp"},6:{name:"constant.numeric.integer.decimal.regexp"},7:{name:"keyword.control.conditional.regexp"},8:{name:"keyword.control.conditional.regexp"},10:{name:"variable.other.group-name.regexp"},11:{name:"keyword.operator.recursion-level.regexp"},12:{name:"constant.numeric.integer.decimal.regexp"},13:{name:"keyword.control.conditional.regexp"},14:{name:"keyword.control.conditional.regexp"},15:{name:"keyword.control.conditional.regexp"},16:{name:"keyword.control.conditional.regexp"},17:{name:"keyword.control.conditional.regexp"},18:{name:"keyword.control.conditional.regexp"},19:{name:"keyword.operator.comparison.regexp"},20:{name:"constant.numeric.integer.decimal.regexp"},21:{name:"keyword.control.conditional.regexp"},22:{name:"punctuation.definition.group.regexp"},23:{name:"keyword.control.conditional.regexp"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.group.regexp"}},name:"meta.group.conditional.regexp",patterns:[{include:"#literals-regular-expression-literal-regex-guts"}]},{begin:`(?x)
290
- (\\()
291
- (
292
-
293
- (\\?)
294
- (?:
295
- ([:|>=!*] | <[=!*])
296
-
297
- | P?< (?:((?!\\d)\\w+) (-))? ((?!\\d)\\w+) >
298
- | ' (?:((?!\\d)\\w+) (-))? ((?!\\d)\\w+) '
299
-
300
- | (?:
301
- \\^(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*
302
- | (?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})+
303
- | (?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})* - (?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*
304
- ):
305
- )
306
-
307
- | \\*(
308
- atomic
309
- |pla|positive_lookahead
310
- |nla|negative_lookahead
311
- |plb|positive_lookbehind
312
- |nlb|negative_lookbehind
313
- |napla|non_atomic_positive_lookahead
314
- |naplb|non_atomic_positive_lookbehind
315
- |sr|script_run
316
- |asr|atomic_script_run
317
- ):
318
- )?+`,beginCaptures:{1:{name:"punctuation.definition.group.regexp"},2:{name:"keyword.other.group-options.regexp"},3:{name:"punctuation.definition.group.regexp"},4:{name:"punctuation.definition.group.regexp"},5:{name:"variable.other.group-name.regexp"},6:{name:"keyword.operator.balancing-group.regexp"},7:{name:"variable.other.group-name.regexp"},8:{name:"variable.other.group-name.regexp"},9:{name:"keyword.operator.balancing-group.regexp"},10:{name:"variable.other.group-name.regexp"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.group.regexp"}},name:"meta.group.regexp",patterns:[{include:"#literals-regular-expression-literal-regex-guts"}]}]},"literals-regular-expression-literal-line-comment":{captures:{1:{name:"punctuation.definition.comment.regexp"}},match:"(\\#).*$",name:"comment.line.regexp"},"literals-regular-expression-literal-quote":{begin:"\\\\Q",beginCaptures:{0:{name:"constant.character.escape.backslash.regexp"}},end:"\\\\E|(\\n)",endCaptures:{0:{name:"constant.character.escape.backslash.regexp"},1:{name:"invalid.illegal.returns-not-allowed.regexp"}},name:"string.quoted.other.regexp.swift"},"literals-regular-expression-literal-regex-guts":{patterns:[{include:"#literals-regular-expression-literal-quote"},{begin:"\\(\\?\\#",beginCaptures:{0:{name:"punctuation.definition.comment.begin.regexp"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.comment.end.regexp"}},name:"comment.block.regexp"},{begin:"<\\{",beginCaptures:{0:{name:"punctuation.section.embedded.begin.regexp"}},end:"\\}>",endCaptures:{0:{name:"punctuation.section.embedded.end.regexp"}},name:"meta.embedded.expression.regexp"},{include:"#literals-regular-expression-literal-unicode-scalars"},{include:"#literals-regular-expression-literal-character-properties"},{match:"[$^]|\\\\[AbBGyYzZ]|\\\\K",name:"keyword.control.anchor.regexp"},{include:"#literals-regular-expression-literal-backtracking-directive-or-global-matching-option"},{include:"#literals-regular-expression-literal-callout"},{include:"#literals-regular-expression-literal-backreference-or-subpattern"},{match:"\\.|\\\\[CdDhHNORsSvVwWX]",name:"constant.character.character-class.regexp"},{match:"\\\\c.",name:"constant.character.entity.control-character.regexp"},{match:"\\\\[^c]",name:"constant.character.escape.backslash.regexp"},{match:"\\|",name:"keyword.operator.or.regexp"},{match:"[*+?]",name:"keyword.operator.quantifier.regexp"},{match:"\\{\\s*\\d+\\s*(?:,\\s*\\d*\\s*)?\\}|\\{\\s*,\\s*\\d+\\s*\\}",name:"keyword.operator.quantifier.regexp"},{include:"#literals-regular-expression-literal-custom-char-class"},{include:"#literals-regular-expression-literal-group-option-toggle"},{include:"#literals-regular-expression-literal-group-or-conditional"}]},"literals-regular-expression-literal-set-operators":{patterns:[{match:"&&",name:"keyword.operator.intersection.regexp.swift"},{match:"--",name:"keyword.operator.subtraction.regexp.swift"},{match:"\\~\\~",name:"keyword.operator.symmetric-difference.regexp.swift"}]},"literals-regular-expression-literal-unicode-scalars":{match:`(?x)
319
- \\\\u\\{\\s*(?:[0-9a-fA-F]+\\s*)+\\}
320
- | \\\\u[0-9a-fA-F]{4}
321
- | \\\\x\\{[0-9a-fA-F]+\\}
322
- | \\\\x[0-9a-fA-F]{0,2}
323
- | \\\\U[0-9a-fA-F]{8}
324
- | \\\\o\\{[0-7]+\\}
325
- | \\\\0[0-7]{0,3}
326
- | \\\\N\\{(?:U\\+[0-9a-fA-F]{1,8} | [\\s\\w-]+)\\}`,name:"constant.character.numeric.regexp"},"literals-string":{patterns:[{begin:'"""',beginCaptures:{0:{name:"punctuation.definition.string.begin.swift"}},comment:"SE-0168: Multi-Line String Literals",end:'"""(#*)',endCaptures:{0:{name:"punctuation.definition.string.end.swift"},1:{name:"invalid.illegal.extra-closing-delimiter.swift"}},name:"string.quoted.double.block.swift",patterns:[{match:'\\G.+(?=""")|\\G.+',name:"invalid.illegal.content-after-opening-delimiter.swift"},{match:"\\\\\\s*\\n",name:"constant.character.escape.newline.swift"},{include:"#literals-string-string-guts"},{comment:'Allow \\("""...""") to appear inside a block string',match:'\\S((?!\\\\\\().)*(?=""")',name:"invalid.illegal.content-before-closing-delimiter.swift"}]},{begin:'#"""',beginCaptures:{0:{name:"punctuation.definition.string.begin.swift"}},end:'"""#(#*)',endCaptures:{0:{name:"punctuation.definition.string.end.swift"},1:{name:"invalid.illegal.extra-closing-delimiter.swift"}},name:"string.quoted.double.block.raw.swift",patterns:[{match:'\\G.+(?=""")|\\G.+',name:"invalid.illegal.content-after-opening-delimiter.swift"},{match:"\\\\#\\s*\\n",name:"constant.character.escape.newline.swift"},{include:"#literals-string-raw-string-guts"},{comment:'Allow \\("""...""") to appear inside a block string',match:'\\S((?!\\\\#\\().)*(?=""")',name:"invalid.illegal.content-before-closing-delimiter.swift"}]},{begin:'(##+)"""',beginCaptures:{0:{name:"punctuation.definition.string.begin.swift"}},end:'"""\\1(#*)',endCaptures:{0:{name:"punctuation.definition.string.end.swift"},1:{name:"invalid.illegal.extra-closing-delimiter.swift"}},name:"string.quoted.double.block.raw.swift",patterns:[{match:'\\G.+(?=""")|\\G.+',name:"invalid.illegal.content-after-opening-delimiter.swift"}]},{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.swift"}},end:'"(#*)',endCaptures:{0:{name:"punctuation.definition.string.end.swift"},1:{name:"invalid.illegal.extra-closing-delimiter.swift"}},name:"string.quoted.double.single-line.swift",patterns:[{match:"\\r|\\n",name:"invalid.illegal.returns-not-allowed.swift"},{include:"#literals-string-string-guts"}]},{begin:'(##+)"',beginCaptures:{0:{name:"punctuation.definition.string.begin.raw.swift"}},comment:"SE-0168: raw string literals (more than one #, grammar limitations prevent us from supporting escapes)",end:'"\\1(#*)',endCaptures:{0:{name:"punctuation.definition.string.end.raw.swift"},1:{name:"invalid.illegal.extra-closing-delimiter.swift"}},name:"string.quoted.double.single-line.raw.swift",patterns:[{match:"\\r|\\n",name:"invalid.illegal.returns-not-allowed.swift"}]},{begin:'#"',beginCaptures:{0:{name:"punctuation.definition.string.begin.raw.swift"}},comment:"SE-0168: raw string literals (one #, escapes supported)",end:'"#(#*)',endCaptures:{0:{name:"punctuation.definition.string.end.raw.swift"},1:{name:"invalid.illegal.extra-closing-delimiter.swift"}},name:"string.quoted.double.single-line.raw.swift",patterns:[{match:"\\r|\\n",name:"invalid.illegal.returns-not-allowed.swift"},{include:"#literals-string-raw-string-guts"}]}]},"literals-string-raw-string-guts":{comment:"the same as #string-guts but with # in escapes",patterns:[{match:`\\\\#[0\\\\tnr"']`,name:"constant.character.escape.swift"},{match:"\\\\#u\\{[0-9a-fA-F]{1,8}\\}",name:"constant.character.escape.unicode.swift"},{begin:"\\\\#\\(",beginCaptures:{0:{name:"punctuation.section.embedded.begin.swift"}},contentName:"source.swift",end:"(\\))",endCaptures:{0:{name:"punctuation.section.embedded.end.swift"},1:{name:"source.swift"}},name:"meta.embedded.line.swift",patterns:[{include:"$self"},{begin:"\\(",comment:"Nested parens",end:"\\)"}]},{match:"\\\\#.",name:"invalid.illegal.escape-not-recognized"}]},"literals-string-string-guts":{patterns:[{match:`\\\\[0\\\\tnr"']`,name:"constant.character.escape.swift"},{match:"\\\\u\\{[0-9a-fA-F]{1,8}\\}",name:"constant.character.escape.unicode.swift"},{begin:"\\\\\\(",beginCaptures:{0:{name:"punctuation.section.embedded.begin.swift"}},contentName:"source.swift",end:"(\\))",endCaptures:{0:{name:"punctuation.section.embedded.end.swift"},1:{name:"source.swift"}},name:"meta.embedded.line.swift",patterns:[{include:"$self"},{begin:"\\(",comment:"Nested parens",end:"\\)"}]},{match:"\\\\.",name:"invalid.illegal.escape-not-recognized"}]},"member-reference":{patterns:[{captures:{1:{name:"variable.other.swift"},2:{name:"punctuation.definition.identifier.swift"},3:{name:"punctuation.definition.identifier.swift"}},match:"(?<=\\.)((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))"}]},operators:{patterns:[{comment:"Type casting",match:"\\b(is\\b|as([!?]\\B|\\b))",name:"keyword.operator.type-casting.swift"},{begin:`(?x)
327
- (?=
328
- (?<oph>
329
- [/=\\-+!*%<>&|^~?]
330
- | [\\x{00A1}-\\x{00A7}]
331
- | [\\x{00A9}\\x{00AB}]
332
- | [\\x{00AC}\\x{00AE}]
333
- | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]
334
- | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]
335
- | [\\x{2030}-\\x{203E}]
336
- | [\\x{2041}-\\x{2053}]
337
- | [\\x{2055}-\\x{205E}]
338
- | [\\x{2190}-\\x{23FF}]
339
- | [\\x{2500}-\\x{2775}]
340
- | [\\x{2794}-\\x{2BFF}]
341
- | [\\x{2E00}-\\x{2E7F}]
342
- | [\\x{3001}-\\x{3003}]
343
- | [\\x{3008}-\\x{3030}]
344
- )
345
- | \\.
346
- (
347
- \\g<oph>
348
- | \\.
349
- | [\\x{0300}-\\x{036F}]
350
- | [\\x{1DC0}-\\x{1DFF}]
351
- | [\\x{20D0}-\\x{20FF}]
352
- | [\\x{FE00}-\\x{FE0F}]
353
- | [\\x{FE20}-\\x{FE2F}]
354
- | [\\x{E0100}-\\x{E01EF}]
355
- )
356
- )`,comment:"This rule helps us speed up the matching.",end:"(?!\\G)",patterns:[{captures:{0:{patterns:[{match:"\\G(\\+\\+|\\-\\-)$",name:"keyword.operator.increment-or-decrement.swift"},{match:"\\G(\\+|\\-)$",name:"keyword.operator.arithmetic.unary.swift"},{match:"\\G!$",name:"keyword.operator.logical.not.swift"},{match:"\\G~$",name:"keyword.operator.bitwise.not.swift"},{match:".+",name:"keyword.operator.custom.prefix.swift"}]}},comment:"Prefix unary operator",match:`(?x)
357
- \\G
358
-
359
- (?<=^|[\\s(\\[{,;:])
360
- (
361
- (?!(//|/\\*|\\*/))
362
- (
363
- [/=\\-+!*%<>&|^~?]
364
- | [\\x{00A1}-\\x{00A7}]
365
- | [\\x{00A9}\\x{00AB}]
366
- | [\\x{00AC}\\x{00AE}]
367
- | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]
368
- | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]
369
- | [\\x{2030}-\\x{203E}]
370
- | [\\x{2041}-\\x{2053}]
371
- | [\\x{2055}-\\x{205E}]
372
- | [\\x{2190}-\\x{23FF}]
373
- | [\\x{2500}-\\x{2775}]
374
- | [\\x{2794}-\\x{2BFF}]
375
- | [\\x{2E00}-\\x{2E7F}]
376
- | [\\x{3001}-\\x{3003}]
377
- | [\\x{3008}-\\x{3030}]
378
-
379
- | [\\x{0300}-\\x{036F}]
380
- | [\\x{1DC0}-\\x{1DFF}]
381
- | [\\x{20D0}-\\x{20FF}]
382
- | [\\x{FE00}-\\x{FE0F}]
383
- | [\\x{FE20}-\\x{FE2F}]
384
- | [\\x{E0100}-\\x{E01EF}]
385
- )
386
- )++
387
- (?![\\s)\\]},;:]|\\z)`},{captures:{0:{patterns:[{match:"\\G(\\+\\+|\\-\\-)$",name:"keyword.operator.increment-or-decrement.swift"},{match:"\\G!$",name:"keyword.operator.increment-or-decrement.swift"},{match:".+",name:"keyword.operator.custom.postfix.swift"}]}},comment:"Postfix unary operator",match:`(?x)
388
- \\G
389
-
390
- (?<!^|[\\s(\\[{,;:])
391
- (
392
- (?!(//|/\\*|\\*/))
393
- (
394
- [/=\\-+!*%<>&|^~?]
395
- | [\\x{00A1}-\\x{00A7}]
396
- | [\\x{00A9}\\x{00AB}]
397
- | [\\x{00AC}\\x{00AE}]
398
- | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]
399
- | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]
400
- | [\\x{2030}-\\x{203E}]
401
- | [\\x{2041}-\\x{2053}]
402
- | [\\x{2055}-\\x{205E}]
403
- | [\\x{2190}-\\x{23FF}]
404
- | [\\x{2500}-\\x{2775}]
405
- | [\\x{2794}-\\x{2BFF}]
406
- | [\\x{2E00}-\\x{2E7F}]
407
- | [\\x{3001}-\\x{3003}]
408
- | [\\x{3008}-\\x{3030}]
409
-
410
- | [\\x{0300}-\\x{036F}]
411
- | [\\x{1DC0}-\\x{1DFF}]
412
- | [\\x{20D0}-\\x{20FF}]
413
- | [\\x{FE00}-\\x{FE0F}]
414
- | [\\x{FE20}-\\x{FE2F}]
415
- | [\\x{E0100}-\\x{E01EF}]
416
- )
417
- )++
418
- (?=[\\s)\\]},;:]|\\z)`},{captures:{0:{patterns:[{match:"\\G=$",name:"keyword.operator.assignment.swift"},{match:"\\G(\\+|\\-|\\*|/|%|<<|>>|&|\\^|\\||&&|\\|\\|)=$",name:"keyword.operator.assignment.compound.swift"},{match:"\\G(\\+|\\-|\\*|/)$",name:"keyword.operator.arithmetic.swift"},{match:"\\G&(\\+|\\-|\\*)$",name:"keyword.operator.arithmetic.overflow.swift"},{match:"\\G%$",name:"keyword.operator.arithmetic.remainder.swift"},{match:"\\G(==|!=|>|<|>=|<=|~=)$",name:"keyword.operator.comparison.swift"},{match:"\\G\\?\\?$",name:"keyword.operator.coalescing.swift"},{match:"\\G(&&|\\|\\|)$",name:"keyword.operator.logical.swift"},{match:"\\G(&|\\||\\^|<<|>>)$",name:"keyword.operator.bitwise.swift"},{match:"\\G(===|!==)$",name:"keyword.operator.bitwise.swift"},{match:"\\G\\?$",name:"keyword.operator.ternary.swift"},{match:".+",name:"keyword.operator.custom.infix.swift"}]}},comment:"Infix operator",match:`(?x)
419
- \\G
420
-
421
- (
422
- (?!(//|/\\*|\\*/))
423
- (
424
- [/=\\-+!*%<>&|^~?]
425
- | [\\x{00A1}-\\x{00A7}]
426
- | [\\x{00A9}\\x{00AB}]
427
- | [\\x{00AC}\\x{00AE}]
428
- | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]
429
- | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]
430
- | [\\x{2030}-\\x{203E}]
431
- | [\\x{2041}-\\x{2053}]
432
- | [\\x{2055}-\\x{205E}]
433
- | [\\x{2190}-\\x{23FF}]
434
- | [\\x{2500}-\\x{2775}]
435
- | [\\x{2794}-\\x{2BFF}]
436
- | [\\x{2E00}-\\x{2E7F}]
437
- | [\\x{3001}-\\x{3003}]
438
- | [\\x{3008}-\\x{3030}]
439
-
440
- | [\\x{0300}-\\x{036F}]
441
- | [\\x{1DC0}-\\x{1DFF}]
442
- | [\\x{20D0}-\\x{20FF}]
443
- | [\\x{FE00}-\\x{FE0F}]
444
- | [\\x{FE20}-\\x{FE2F}]
445
- | [\\x{E0100}-\\x{E01EF}]
446
- )
447
- )++`},{captures:{0:{patterns:[{match:".+",name:"keyword.operator.custom.prefix.dot.swift"}]}},comment:"Dot prefix unary operator",match:`(?x)
448
- \\G
449
-
450
- (?<=^|[\\s(\\[{,;:])
451
- \\.
452
- (
453
- (?!(//|/\\*|\\*/))
454
- (
455
- \\.
456
- | [/=\\-+!*%<>&|^~?]
457
- | [\\x{00A1}-\\x{00A7}]
458
- | [\\x{00A9}\\x{00AB}]
459
- | [\\x{00AC}\\x{00AE}]
460
- | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]
461
- | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]
462
- | [\\x{2030}-\\x{203E}]
463
- | [\\x{2041}-\\x{2053}]
464
- | [\\x{2055}-\\x{205E}]
465
- | [\\x{2190}-\\x{23FF}]
466
- | [\\x{2500}-\\x{2775}]
467
- | [\\x{2794}-\\x{2BFF}]
468
- | [\\x{2E00}-\\x{2E7F}]
469
- | [\\x{3001}-\\x{3003}]
470
- | [\\x{3008}-\\x{3030}]
471
-
472
- | [\\x{0300}-\\x{036F}]
473
- | [\\x{1DC0}-\\x{1DFF}]
474
- | [\\x{20D0}-\\x{20FF}]
475
- | [\\x{FE00}-\\x{FE0F}]
476
- | [\\x{FE20}-\\x{FE2F}]
477
- | [\\x{E0100}-\\x{E01EF}]
478
- )
479
- )++
480
- (?![\\s)\\]},;:]|\\z)`},{captures:{0:{patterns:[{match:".+",name:"keyword.operator.custom.postfix.dot.swift"}]}},comment:"Dot postfix unary operator",match:`(?x)
481
- \\G
482
-
483
- (?<!^|[\\s(\\[{,;:])
484
- \\.
485
- (
486
- (?!(//|/\\*|\\*/))
487
- (
488
- \\.
489
- | [/=\\-+!*%<>&|^~?]
490
- | [\\x{00A1}-\\x{00A7}]
491
- | [\\x{00A9}\\x{00AB}]
492
- | [\\x{00AC}\\x{00AE}]
493
- | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]
494
- | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]
495
- | [\\x{2030}-\\x{203E}]
496
- | [\\x{2041}-\\x{2053}]
497
- | [\\x{2055}-\\x{205E}]
498
- | [\\x{2190}-\\x{23FF}]
499
- | [\\x{2500}-\\x{2775}]
500
- | [\\x{2794}-\\x{2BFF}]
501
- | [\\x{2E00}-\\x{2E7F}]
502
- | [\\x{3001}-\\x{3003}]
503
- | [\\x{3008}-\\x{3030}]
504
-
505
- | [\\x{0300}-\\x{036F}]
506
- | [\\x{1DC0}-\\x{1DFF}]
507
- | [\\x{20D0}-\\x{20FF}]
508
- | [\\x{FE00}-\\x{FE0F}]
509
- | [\\x{FE20}-\\x{FE2F}]
510
- | [\\x{E0100}-\\x{E01EF}]
511
- )
512
- )++
513
- (?=[\\s)\\]},;:]|\\z)`},{captures:{0:{patterns:[{match:"\\G\\.\\.[.<]$",name:"keyword.operator.range.swift"},{match:".+",name:"keyword.operator.custom.infix.dot.swift"}]}},comment:"Dot infix operator",match:`(?x)
514
- \\G
515
-
516
- \\.
517
- (
518
- (?!(//|/\\*|\\*/))
519
- (
520
- \\.
521
- | [/=\\-+!*%<>&|^~?]
522
- | [\\x{00A1}-\\x{00A7}]
523
- | [\\x{00A9}\\x{00AB}]
524
- | [\\x{00AC}\\x{00AE}]
525
- | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]
526
- | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]
527
- | [\\x{2030}-\\x{203E}]
528
- | [\\x{2041}-\\x{2053}]
529
- | [\\x{2055}-\\x{205E}]
530
- | [\\x{2190}-\\x{23FF}]
531
- | [\\x{2500}-\\x{2775}]
532
- | [\\x{2794}-\\x{2BFF}]
533
- | [\\x{2E00}-\\x{2E7F}]
534
- | [\\x{3001}-\\x{3003}]
535
- | [\\x{3008}-\\x{3030}]
536
-
537
- | [\\x{0300}-\\x{036F}]
538
- | [\\x{1DC0}-\\x{1DFF}]
539
- | [\\x{20D0}-\\x{20FF}]
540
- | [\\x{FE00}-\\x{FE0F}]
541
- | [\\x{FE20}-\\x{FE2F}]
542
- | [\\x{E0100}-\\x{E01EF}]
543
- )
544
- )++`}]},{match:":",name:"keyword.operator.ternary.swift"}]},root:{patterns:[{include:"#compiler-control"},{include:"#declarations"},{include:"#expressions"}]}},scopeName:"source.swift"});var n=[e];export{n as default};