@kong-ui-public/documentation 0.7.52 → 0.7.54

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 (213) hide show
  1. package/dist/{_basePickBy-QP7f0_NS-CQRclG56.js → _basePickBy-BdieChar-OkpwE92k.js} +2 -2
  2. package/dist/{_baseUniq--2u8HDhR-BwnJW2qv.js → _baseUniq-DvGKNxK2-CrFHB0Va.js} +1 -1
  3. package/dist/{arc-Ce--zaCu-CaP3a_s2.js → arc-HkQ-gbKN-DMqNZP0P.js} +1 -1
  4. package/dist/architecture-I3QFYML2-BnL0CBhZ-OwkgZ4Jc.js +5 -0
  5. package/dist/{architectureDiagram-V6B76FHG-BGugf6s4-DQPRLlmL.js → architectureDiagram-V6B76FHG-CF7LIMcO-Bi3o7tPD.js} +4 -4
  6. package/dist/astro-Ct9uJo-c-nfJFy9of.js +27 -0
  7. package/dist/{blockDiagram-EN3ZKWFM-DMDRogP_-FsitMOJs.js → blockDiagram-EN3ZKWFM-Ce9sI6p0-BSW7PVPT.js} +6 -6
  8. package/dist/c-DKDB_XIB-DKDB_XIB.js +7 -0
  9. package/dist/{c4Diagram-THADGKDP-DVq6u9iK-DjZCguGM.js → c4Diagram-THADGKDP-BTW1RdWp-B-P4jJEG.js} +2 -2
  10. package/dist/{channel-CkGtrtc_-5heXrfaz.js → channel-BExz2QEe-D87SiV4g.js} +1 -1
  11. package/dist/{chunk-2JBRQKJ5-8eJOTr0j-CXWIVrSH.js → chunk-2JBRQKJ5-OM-qdEYq-BtmlqXNP.js} +2 -2
  12. package/dist/{chunk-2RYQ3QTB-D01RVSPw-CNvvITx2.js → chunk-2RYQ3QTB-CEsfCBgx-CFtk4OUl.js} +1 -1
  13. package/dist/{chunk-BAVOGKFW-BkFOjSb5-DRz12j82.js → chunk-BAVOGKFW-BsKga6TS-OmijSWzp.js} +1 -1
  14. package/dist/{chunk-DUMQOTYW-C8gjn_h8-Buk9AtY0.js → chunk-DUMQOTYW-702X_yPX-jq37ikuA.js} +1 -1
  15. package/dist/{chunk-OQCM5LHU-BsyD81F3-CLn0WK5y.js → chunk-OQCM5LHU-DvAgHiz1-EenYCxhh.js} +1 -1
  16. package/dist/{chunk-UGV5ZQQN-B1Fqn8HR-D2F042zI.js → chunk-UGV5ZQQN-DLJfHEQ--CXU97g-q.js} +2 -2
  17. package/dist/{chunk-XVOYOM2C-BNhATlkH-E6jfDmvo.js → chunk-XVOYOM2C-BuvytsGy-DwxxmTeO.js} +1 -1
  18. package/dist/{chunk-YWFND7JV-CjJOWloQ-yAuS5TWl.js → chunk-YWFND7JV-BX4eJVvR-BCwDeDNF.js} +1 -1
  19. package/dist/{classDiagram-4BHYIK4I-DAFaw6kk-B9-nvdz4.js → classDiagram-4BHYIK4I-DABOljRL-DAS3U8qp.js} +4 -4
  20. package/dist/{classDiagram-v2-FI7KE7WJ-2KIw4eDL-1VSIGqaX.js → classDiagram-v2-FI7KE7WJ-DyhJS9wI-CeDC1SJu.js} +7 -7
  21. package/dist/{clone-BHELfLb3-YErh3h4H.js → clone-BqJCgI_t-D6TZM9U-.js} +1 -1
  22. package/dist/coffee-CiEmwUV9-D5Oe8742.js +9 -0
  23. package/dist/cpp-BphENtVr-DqhLnmUg.js +29 -0
  24. package/dist/csharp-hvsHIX1x-hvsHIX1x.js +7 -0
  25. package/dist/css-twoVIb3q-twoVIb3q.js +7 -0
  26. package/dist/csv-CyuxiNSX-CyuxiNSX.js +7 -0
  27. package/dist/{dagre-P3YPLUS5-Crxg5gw6-B-8XBOXu.js → dagre-P3YPLUS5-C2sB48dB-TVHqbdM9.js} +4 -4
  28. package/dist/{diagram-QS5GVLUX-CxXnEhMp-Bu1H9vNA.js → diagram-QS5GVLUX-CPjjc7oB-xgDgLBUy.js} +3 -3
  29. package/dist/diff-BprZv9Bx-BprZv9Bx.js +7 -0
  30. package/dist/docker-UByH5rch-UByH5rch.js +7 -0
  31. package/dist/documentation.es.js +1 -1
  32. package/dist/documentation.umd.js +103 -438
  33. package/dist/{erDiagram-62CBQV5Y-D6jClMyv-BIzTc7kD.js → erDiagram-62CBQV5Y-BWvC3B70-B5ci7Tyo.js} +3 -3
  34. package/dist/{flowDiagram-JSIZSE4D-BcOWyjMb-BwgaE-hH.js → flowDiagram-JSIZSE4D-C6fUTYCs-CC8M6lTH.js} +4 -4
  35. package/dist/{ganttDiagram-ASEIQ4P5-By38uZLn-Btn4Z6zy.js → ganttDiagram-ASEIQ4P5-C4T3npMC-CkOmHDDH.js} +2 -2
  36. package/dist/git-commit-BpBta0-H-D9ROUaA_.js +9 -0
  37. package/dist/git-rebase-nCu0qkM8-BcHBAqRM.js +9 -0
  38. package/dist/gitGraph-YCYPL57B-BrNA4-wo-DSu9FUv_.js +5 -0
  39. package/dist/{gitGraphDiagram-UL5UFKDR-BqG1nzMk-DWQU5SPN.js → gitGraphDiagram-UL5UFKDR-DUEiISlX-D9YHU22K.js} +4 -4
  40. package/dist/go-CVQIWj2N-CVQIWj2N.js +7 -0
  41. package/dist/{graph-DvHk9sAd-BZSyIJKm.js → graph-sjVS6xcE-C5RdEsAN.js} +2 -2
  42. package/dist/graphql-7X52cHqc-CLBzimQB.js +15 -0
  43. package/dist/haml-28-Av65f-Dih0P9tR.js +19 -0
  44. package/dist/handlebars-TFjvroEi-07H8_eE0.js +15 -0
  45. package/dist/haskell-DJah2Vxp-DJah2Vxp.js +7 -0
  46. package/dist/html-B9SDyQ6N-D-ZKCIRM.js +11 -0
  47. package/dist/html-derivative-Dst04Arf-DrM5NWms.js +9 -0
  48. package/dist/http-nOIbjTbF-C51IpTrN.js +15 -0
  49. package/dist/{index-D2OA6SS9.js → index-BVoTdxnp.js} +3518 -3518
  50. package/dist/info-46DW6VJ7-Bej2n0c3-C-Lc5xdL.js +5 -0
  51. package/dist/{infoDiagram-7APDZ6AT-CLwNpg22-C0vqPVuM.js → infoDiagram-7APDZ6AT-CkczlyAg-BlJfGN5d.js} +2 -2
  52. package/dist/ini-CgO4T9Us-CgO4T9Us.js +7 -0
  53. package/dist/java-Bd9vXGhZ-Bd9vXGhZ.js +7 -0
  54. package/dist/javascript-CGvwHrzr-CGvwHrzr.js +7 -0
  55. package/dist/{journeyDiagram-G5LC7W2K-BOoH_p8r-DCGW5mIU.js → journeyDiagram-G5LC7W2K-CGKx4opc-DgSw5OEZ.js} +3 -3
  56. package/dist/json-B86kHl_g-B86kHl_g.js +7 -0
  57. package/dist/{json-ChK2l_mW-CF8DlcBe.js → json-c0WkG_Y9-DE96BGkz.js} +4 -4
  58. package/dist/json5-GB6TimgH-GB6TimgH.js +7 -0
  59. package/dist/jsonc-CP3QVoXc-CP3QVoXc.js +7 -0
  60. package/dist/jsonl-C2ofTLY8-C2ofTLY8.js +7 -0
  61. package/dist/jsx-ZpKf1TSy-ZpKf1TSy.js +7 -0
  62. package/dist/kotlin-CAtfTEpr-CAtfTEpr.js +7 -0
  63. package/dist/latex-14aRsJKm-mj9Fild6.js +62 -0
  64. package/dist/{layout-CjQzaBWv-COvZUbbb.js → layout-BT6DeXbr-BANlZ5gi.js} +4 -4
  65. package/dist/less-0UFuQRv0-0UFuQRv0.js +7 -0
  66. package/dist/{linear-DT_Q8rLU-DeClWtNR.js → linear-Dz3m-tA--DoWdTVVU.js} +1 -1
  67. package/dist/liquid-Uq0DwV7I-CRvdDbph.js +15 -0
  68. package/dist/lua-BEgWEgjO-DU5YUtUR.js +9 -0
  69. package/dist/make-BDMxblcP-BDMxblcP.js +7 -0
  70. package/dist/markdown-CzCkSBhS-CzCkSBhS.js +7 -0
  71. package/dist/material-theme-lighter-CnKSyNS5-CnKSyNS5.js +4 -0
  72. package/dist/material-theme-palenight-BaYUoLXq-BaYUoLXq.js +4 -0
  73. package/dist/mdc-BA3wmBe6-BAlBXF37.js +13 -0
  74. package/dist/mdx-KaGu4TbO-KaGu4TbO.js +7 -0
  75. package/dist/mermaid-DZVJOJE0-DZVJOJE0.js +7 -0
  76. package/dist/{mermaid-parser.core-BQiMVCUD-BKOHdVsR.js → mermaid-parser.core-CHAbAGk3-c1XgG0S5.js} +9 -9
  77. package/dist/{mindmap-definition-FCEC46F3-DVehALvP-BU5jW1Pg.js → mindmap-definition-FCEC46F3-Bc0Z0Iij-DjhnZX8i.js} +1 -1
  78. package/dist/nginx-zxRCFE-h-BypGKuox.js +9 -0
  79. package/dist/objective-c-D6w3apbj-D6w3apbj.js +7 -0
  80. package/dist/packet-W2GHVCYJ-ZKPevIRt-QgrlrfSF.js +5 -0
  81. package/dist/pascal-DenYIYz2-DenYIYz2.js +7 -0
  82. package/dist/perl-D3yLJL---Dh53Z1Ch.js +17 -0
  83. package/dist/php-CotrzT_K-Bao4rTV9.js +19 -0
  84. package/dist/pie-BEWT4RHE-DylShr8x-d1G_mdRP.js +5 -0
  85. package/dist/{pieDiagram-OZX6XH5M-NcRJ5yD0-DGLoTnOO.js → pieDiagram-OZX6XH5M-CXiGhbiR-DRla_XQL.js} +4 -4
  86. package/dist/plsql-DH6aemMc-DH6aemMc.js +7 -0
  87. package/dist/postcss-Cf6moWPa-Cf6moWPa.js +7 -0
  88. package/dist/powershell-HbR4eE6x-HbR4eE6x.js +7 -0
  89. package/dist/proto-FnD6HNAf-FnD6HNAf.js +7 -0
  90. package/dist/pug-BQlVJUDw-CHRWHsZp.js +21 -0
  91. package/dist/python-DmuMvCM0-DmuMvCM0.js +7 -0
  92. package/dist/{quadrantDiagram-VG34DGKC-BEBZpKwg-E0UALIdM.js → quadrantDiagram-VG34DGKC-CbM6hf5T-BkpDE-dh.js} +2 -2
  93. package/dist/r-Bc6kwNk5-Bc6kwNk5.js +7 -0
  94. package/dist/reg-D7nGELoM-D7nGELoM.js +7 -0
  95. package/dist/{requirementDiagram-FPZB6IJI-CV6ngUwt-ZNVFxha1.js → requirementDiagram-FPZB6IJI-B_JGEuRG-CfrFuiOp.js} +3 -3
  96. package/dist/rst-CaIq10fc-5Y1LeNh2.js +26 -0
  97. package/dist/ruby-DeHccIAO-BcoQ2TvH.js +23 -0
  98. package/dist/rust-DUjrmsiV-DUjrmsiV.js +7 -0
  99. package/dist/{sankeyDiagram-KMMQDL5K-C0IklDBz-DXNZHn1D.js → sankeyDiagram-KMMQDL5K-BdxnO3f5-GG9bgFTU.js} +1 -1
  100. package/dist/sass-CLufkToV-CLufkToV.js +7 -0
  101. package/dist/scss-CnxrcEK_-CATc0Lba.js +9 -0
  102. package/dist/{sequenceDiagram-PQT5PN7B-RdiTSnGD-dImpFpXC.js → sequenceDiagram-PQT5PN7B-HSmTG3uL-DCRTrdd_.js} +3 -3
  103. package/dist/shellscript-CLi_Jlup-CLi_Jlup.js +7 -0
  104. package/dist/shellsession-BgOGDEE0-D_whUPK9.js +9 -0
  105. package/dist/splunk-ZWH3T4YR-ZWH3T4YR.js +7 -0
  106. package/dist/sql-CqEjJWk_-CqEjJWk_.js +7 -0
  107. package/dist/ssh-config-cxjN15Iq-cxjN15Iq.js +7 -0
  108. package/dist/{stateDiagram-TQSDS2D4-BSONsero-BGr__pIw.js → stateDiagram-TQSDS2D4-BK8lu_Tc-UxdkYbwz.js} +5 -5
  109. package/dist/{stateDiagram-v2-J5TZWJW5-CUBEYx5P-MOayZIW2.js → stateDiagram-v2-J5TZWJW5-Bz5m2MnO-YNqSfPWL.js} +3 -3
  110. package/dist/stylus-BqSAqkqK-BqSAqkqK.js +7 -0
  111. package/dist/svelte-Yn79bR_P-TdNy3USA.js +29 -0
  112. package/dist/swift-Cii5mold-Cii5mold.js +7 -0
  113. package/dist/{timeline-definition-KYQAIZUX-DQZuhTw8-Dnb6t1_t.js → timeline-definition-KYQAIZUX-XLrO7vFH-BE_yP5t-.js} +2 -2
  114. package/dist/toml-BrnHWKvZ-BrnHWKvZ.js +7 -0
  115. package/dist/tsx-RDJgLpEg-RDJgLpEg.js +7 -0
  116. package/dist/twig-CyzrzZ6V-CLfeQShi.js +19 -0
  117. package/dist/typescript-BRQxorCF-BRQxorCF.js +7 -0
  118. package/dist/v-CBsEUX4x-CBsEUX4x.js +7 -0
  119. package/dist/vb-BCQhaxZY-BCQhaxZY.js +7 -0
  120. package/dist/viml-DUDcfQ_j-DUDcfQ_j.js +7 -0
  121. package/dist/vue-DNFIPpe6-BpXPyld-.js +68 -0
  122. package/dist/vue-html-DkB4x9kz-BBbMk49e.js +11 -0
  123. package/dist/wasm-KuMlursr-KuMlursr.js +7 -0
  124. package/dist/wgsl-CXztftdQ-CXztftdQ.js +7 -0
  125. package/dist/xml-D46nbCSr-BYMRGyuH.js +9 -0
  126. package/dist/xsl--U1R63rG-D8P_gDHK.js +9 -0
  127. package/dist/{xychartDiagram-LESROZAQ-Aueu0ah5-Kf1LjwqY.js → xychartDiagram-LESROZAQ-CFA62kNt-Cw_jtdeV.js} +2 -2
  128. package/dist/yaml-BEQ1JqWb-BEQ1JqWb.js +7 -0
  129. package/package.json +6 -6
  130. package/dist/architecture-I3QFYML2-BAM2h37L-DDfRikFe.js +0 -5
  131. package/dist/astro-D_dsHkRz-CIu0TEak.js +0 -27
  132. package/dist/c-C9fY0Fge-C9fY0Fge.js +0 -7
  133. package/dist/coffee-BpL5dmzR-BhgOYQS1.js +0 -9
  134. package/dist/cpp-B_ULsIyI-C_UYrD6f.js +0 -193
  135. package/dist/csharp--zf0MtDg--zf0MtDg.js +0 -7
  136. package/dist/css-pVblTdYL-pVblTdYL.js +0 -7
  137. package/dist/csv-D4BoHddH-D4BoHddH.js +0 -7
  138. package/dist/diff-MXcoXEIJ-MXcoXEIJ.js +0 -7
  139. package/dist/docker-B10O2enb-B10O2enb.js +0 -7
  140. package/dist/git-commit-Be8WquDH-CZYxUfnG.js +0 -9
  141. package/dist/git-rebase-CVYaGD_a-CeqfdoDX.js +0 -9
  142. package/dist/gitGraph-YCYPL57B-ON9gXqNe-M5hiPCVB.js +0 -5
  143. package/dist/go-D_ziJsY9-D_ziJsY9.js +0 -7
  144. package/dist/graphql-D6yuBR9q--iCoxDM1.js +0 -18
  145. package/dist/haml-Dw-qY2Lp-CUnH-KRl.js +0 -19
  146. package/dist/handlebars-C6aUQR_3-B3cgQNZD.js +0 -15
  147. package/dist/haskell-B_jwIsd_-B_jwIsd_.js +0 -12
  148. package/dist/html-CQnAgmm8-BAGVrVbX.js +0 -11
  149. package/dist/html-derivative-DLUduELB-cl3ZX13g.js +0 -9
  150. package/dist/http-BwHXQNrI-BcEttk54.js +0 -15
  151. package/dist/info-46DW6VJ7-CBnu53Ut-B4VUuwED.js +0 -5
  152. package/dist/ini-BsUFIxsI-BsUFIxsI.js +0 -7
  153. package/dist/java-NDwZ3lmy-NDwZ3lmy.js +0 -7
  154. package/dist/javascript-S4X9lPQ2-S4X9lPQ2.js +0 -7
  155. package/dist/json-BqEO2fcw-BqEO2fcw.js +0 -7
  156. package/dist/json5-B2g59Yxe-B2g59Yxe.js +0 -7
  157. package/dist/jsonc-CViUooyB-CViUooyB.js +0 -7
  158. package/dist/jsonl-D9QAvYu1-D9QAvYu1.js +0 -7
  159. package/dist/jsx-BSOdlo-z-BSOdlo-z.js +0 -7
  160. package/dist/kotlin-DkoSFfh7-DkoSFfh7.js +0 -7
  161. package/dist/latex-DM7T8eEg-WeIDVHW4.js +0 -76
  162. package/dist/less-CEm00fln-CEm00fln.js +0 -7
  163. package/dist/liquid-BBV8yFlz-CBzfhyj5.js +0 -28
  164. package/dist/lua-BprzqEnl-B-iqs6LK.js +0 -9
  165. package/dist/make-DluCIvvI-DluCIvvI.js +0 -7
  166. package/dist/markdown-Dcn_SydH-Dcn_SydH.js +0 -7
  167. package/dist/material-theme-lighter-CtwOYHJ5-CtwOYHJ5.js +0 -769
  168. package/dist/material-theme-palenight-LzvMi3a5-LzvMi3a5.js +0 -769
  169. package/dist/mdc-CGFjzho1-D-uNyHbu.js +0 -13
  170. package/dist/mdx-Br112W6P-Br112W6P.js +0 -7
  171. package/dist/mermaid-tJ3odWn1-tJ3odWn1.js +0 -7
  172. package/dist/nginx-CDt8dUbj-CwnYwJom.js +0 -9
  173. package/dist/objective-c-ZXLxIXFu-ZXLxIXFu.js +0 -7
  174. package/dist/packet-W2GHVCYJ-bTc8I4ko-Cvd0NjUM.js +0 -5
  175. package/dist/pascal-8g0cXXUV-8g0cXXUV.js +0 -7
  176. package/dist/perl-DYQ2PUOI-Ce95clZS.js +0 -17
  177. package/dist/php-HXa3A-PK-DYmFSyAv.js +0 -23
  178. package/dist/pie-BEWT4RHE-BQIhHO3S-p3QRx2Hf.js +0 -5
  179. package/dist/plsql-8SPzZKaa-8SPzZKaa.js +0 -7
  180. package/dist/postcss-CzMyUasl-CzMyUasl.js +0 -7
  181. package/dist/powershell-Ct3wtyyf-Ct3wtyyf.js +0 -7
  182. package/dist/proto-DOQNC0Re-DOQNC0Re.js +0 -7
  183. package/dist/pug-I4Ltn3Nw-D6M2fX7G.js +0 -21
  184. package/dist/python-S2LqejOW-S2LqejOW.js +0 -22
  185. package/dist/r-BaIwHWbj-BaIwHWbj.js +0 -7
  186. package/dist/reg-C2xsc1D3-C2xsc1D3.js +0 -7
  187. package/dist/rst-CqzqRSy_-xBaB1SMh.js +0 -26
  188. package/dist/ruby-CaLXGQMM-dbPBCkla.js +0 -49
  189. package/dist/rust-BuM_ypDG-BuM_ypDG.js +0 -7
  190. package/dist/sass-BHTHe1hw-BHTHe1hw.js +0 -8
  191. package/dist/scss-1lKx83lY-Dhq9feuo.js +0 -9
  192. package/dist/shellscript-D61Z39XV-D61Z39XV.js +0 -7
  193. package/dist/shellsession-BxewqD4o-JfAy6Scn.js +0 -9
  194. package/dist/splunk-DOc6RZxF-DOc6RZxF.js +0 -7
  195. package/dist/sql-BW1nANeH-BW1nANeH.js +0 -7
  196. package/dist/ssh-config-WxoJGDFj-WxoJGDFj.js +0 -7
  197. package/dist/stylus-DHtg4l9I-DHtg4l9I.js +0 -7
  198. package/dist/svelte-CxOAZSqx-D6_Dup1x.js +0 -29
  199. package/dist/swift-DXnxgc7L-DXnxgc7L.js +0 -14
  200. package/dist/toml-B3m4q8Sh-B3m4q8Sh.js +0 -7
  201. package/dist/tsx-DjpGf_zp-DjpGf_zp.js +0 -7
  202. package/dist/twig-BKVhsWVA-CAfti4AG.js +0 -29
  203. package/dist/typescript-CjtgCz_A-CjtgCz_A.js +0 -7
  204. package/dist/v-Ce9LUgL8-Ce9LUgL8.js +0 -7
  205. package/dist/vb-D9cF8Lsp-D9cF8Lsp.js +0 -7
  206. package/dist/viml-DF-rMx2H-DF-rMx2H.js +0 -7
  207. package/dist/vue-bdaBQoF--D_HkxBBu.js +0 -68
  208. package/dist/vue-html-DMY4c0OB-BuB6GPk-.js +0 -11
  209. package/dist/wasm-83spBAnA-83spBAnA.js +0 -7
  210. package/dist/wgsl-DiRwt5Uz-DiRwt5Uz.js +0 -7
  211. package/dist/xml-Dcc0Vp-Q-BB4kJUTf.js +0 -9
  212. package/dist/xsl-DW810WyZ-BNfp-grZ.js +0 -9
  213. package/dist/yaml-B-GyjzSe-B-GyjzSe.js +0 -7
@@ -1,14 +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+(\\d+(?:\\.\\d+)*\\b))?" }, { begin: "\\b(introduced|deprecated|obsoleted)\\s*(:)\\s*", beginCaptures: { 1: { name: "keyword.other.swift" }, 2: { name: "punctuation.separator.key-value.swift" } }, end: "(?!\\G)", patterns: [{ match: "\\b\\d+(?:\\.\\d+)*\\b", name: "constant.numeric.swift" }] }, { begin: '\\b(message|renamed)\\s*(:)\\s*(?=")', beginCaptures: { 1: { name: "keyword.other.swift" }, 2: { name: "punctuation.separator.key-value.swift" } }, end: "(?!\\G)", patterns: [{ include: "#literals" }] }, { captures: { 1: { name: "keyword.other.platform.all.swift" }, 2: { name: "keyword.other.swift" }, 3: { name: "invalid.illegal.character-not-allowed-here.swift" } }, match: "(?:(\\*)|\\b(deprecated|unavailable|noasync)\\b)\\s*(.*?)(?=[,)])" }] }, { begin: "((@)objc)(\\()", beginCaptures: { 1: { name: "storage.modifier.attribute.swift" }, 2: { name: "punctuation.definition.attribute.swift" }, 3: { name: "punctuation.definition.arguments.begin.swift" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.arguments.end.swift" } }, name: "meta.attribute.objc.swift", patterns: [{ captures: { 1: { name: "invalid.illegal.missing-colon-after-selector-piece.swift" } }, match: "\\w*(?::(?:\\w*:)*(\\w*))?", name: "entity.name.function.swift" }] }, { begin: "(@)(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)", beginCaptures: { 0: { name: "storage.modifier.attribute.swift" }, 1: { name: "punctuation.definition.attribute.swift" }, 2: { name: "punctuation.definition.identifier.swift" }, 3: { name: "punctuation.definition.identifier.swift" } }, comment: "any other attribute", end: "(?!\\G\\()", name: "meta.attribute.swift", patterns: [{ begin: "\\(", beginCaptures: { 0: { name: "punctuation.definition.arguments.begin.swift" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.arguments.end.swift" } }, name: "meta.arguments.attribute.swift", patterns: [{ include: "#expressions" }] }] }] }, "builtin-functions": { patterns: [{ comment: "Member functions in the standard library in Swift 3 which may be used with trailing closures and no parentheses", match: "(?<=\\.)(?:s(?:ort(?:ed)?|plit)|contains|index|partition|f(?:i(?:lter|rst)|orEach|latMap)|with(?:MutableCharacters|CString|U(?:nsafe(?:Mutable(?:BufferPointer|Pointer(?:s|To(?:Header|Elements)))|BufferPointer)|TF8Buffer))|m(?:in|a(?:p|x)))(?=\\s*[({])\\b", name: "support.function.swift" }, { comment: "Member functions in the standard library in Swift 3", match: "(?<=\\.)(?:s(?:ymmetricDifference|t(?:oreBytes|arts|ride)|ortInPlace|u(?:ccessor|ffix|btract(?:ing|InPlace|WithOverflow)?)|quareRoot|amePosition)|h(?:oldsUnique(?:Reference|OrPinnedReference)|as(?:Suffix|Prefix))|ne(?:gate(?:d)?|xt)|c(?:o(?:untByEnumerating|py(?:Bytes)?)|lamp(?:ed)?|reate)|t(?:o(?:IntMax|Opaque|UIntMax)|ake(?:RetainedValue|UnretainedValue)|r(?:uncatingRemainder|a(?:nscodedLength|ilSurrogate)))|i(?:s(?:MutableAndUniquelyReferenced(?:OrPinned)?|S(?:trictSu(?:perset(?:Of)?|bset(?:Of)?)|u(?:perset(?:Of)?|bset(?:Of)?))|Continuation|T(?:otallyOrdered|railSurrogate)|Disjoint(?:With)?|Unique(?: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\\d+(?:\\.\\d+)*\\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: "\\b(func)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)|(?:((?<oph>[/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}])(\\g<oph>|(?<opc>[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))*)|(\\.(\\g<oph>|\\g<opc>|\\.)+)))\\s*(?=\\(|<)", 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: { 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[?!]*)\\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,=&`])", 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: "(?<=\\G|\\.)(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)", name: "entity.name.type.swift" }, { match: "(?<=\\G|\\.)\\$\\d+", name: "entity.name.type.swift" }, { captures: { 1: { patterns: [{ match: "\\.", name: "invalid.illegal.dot-not-allowed-here.swift" }] } }, match: "(?<=\\G|\\.)(?:((?<oph>[/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}])(\\g<oph>|(?<opc>[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))*)|(\\.(\\g<oph>|\\g<opc>|\\.)+))(?=\\.|;|$|//|/\\*|\\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: "\\b(macro)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(?=\\(|<|=)", 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: "(?:\\b(prefix|infix|postfix)\\s+)?\\b(operator)\\s+(((?<oph>[/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}])(\\g<oph>|\\.|(?<opc>[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))*+)|(\\.(\\g<oph>|\\g<opc>|\\.)++))\\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+(\\d+)\\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[?!]*)\\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: "\\b(func)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)|(?:((?<oph>[/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}])(\\g<oph>|(?<opc>[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))*)|(\\.(\\g<oph>|\\g<opc>|\\.)+)))\\s*(?=\\(|<)", 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: "(?:(_)|((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q1>))\\s+(((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q2>))\\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: "((?<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: "\\b(?:(async)\\s+)?(let|var)\\b\\s+(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\\s*:", 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+(\\d+(?:\\.\\d+)*\\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: "\\$\\d+", 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: "((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q1>))\\(((((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q2>)):)+)\\)" }, "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}]\\.)\\d[0-9_]*(?=\\.\\d|[eE])(?:\\.\\d[0-9_]*)?(?:[eE][-+]?\\d[0-9_]*)?\\b(?!\\.\\d)", 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][-+]?\\d[0-9_]*\\b(?!\\.\\d)", 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(?!\\.\\d)", 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_]*)\\.\\d[\\w.]*", name: "invalid.illegal.numeric.float.missing-exponent.swift" }, { comment: "-.5, .2f (note that 1.-.5 may be a valid expression)", match: "(?<=\\s|^)-?\\.\\d[\\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}]\\.)\\d+\\b" }, { comment: "0b010, 0b1_0", match: "(\\B-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0b[01][01_]*\\b(?!\\.\\d)", 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(?!\\.\\d)", name: "constant.numeric.integer.octal.swift" }, { comment: "02, 3_456", match: "(\\B-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)\\d[0-9_]*\\b(?!\\.\\d)", 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(?!\\.\\d)", name: "constant.numeric.integer.hexadecimal.swift" }, { match: "(\\B-|\\b)\\d[\\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
2
- in order to avoid ambiguities with operators, and to adhere to certain
3
- parsing rules in SE-0354/SE-0355, such as:
4
- - A regex literal will not be parsed if it contains an unbalanced ).
5
- - A regex may end with a space only if it began with an escaped space`, match: "(((\\#+)?)/)(?(3)|(?!/))(?(3)|(?!\\s))(\\\\\\s)?(?<guts>(?>(?:\\\\Q(?:(?!\\\\E)(?!/\\2).)*+(?:\\\\E|(?(3)|(?<!\\s))(?=/\\2))|\\\\.|\\(\\?\\#[^)]*\\)|\\(\\?\\{(?<g1>\\{)?+(?<g2>\\{)?+(?<g3>\\{)?+(?<g4>\\{)?+(?<g5>\\{)?+.+?\\}(?(<g1>)\\})(?(<g2>)\\})(?(<g3>)\\})(?(<g4>)\\})(?(<g5>)\\})(?:\\[(?!\\d)\\w+\\])?[X<>]?\\)|(?<class>\\[(?:\\\\.|[^\\[\\]]|\\g<class>)+\\])|\\(\\g<guts>?+\\)|(?:(?!/\\2)[^()\\[\\\\])+)+))?+(?(3)|(?(5)(?<!\\s)))(/\\2)|\\#+/.+(\\n)", 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: "(\\\\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: "(\\\\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 '>'
6
- "\\k'" NamedOrNumberRef "'"
7
- '\\g<' NamedOrNumberRef '>'
8
- "\\g'" NamedOrNumberRef "'"`, match: "(\\\\[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: "(\\\\k\\{)((?!\\d)\\w+)(?:([+-])(\\d+))?(\\})" }, { match: "\\\\[1-9]\\d+", 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: "(\\(\\?(?: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: "(\\(\\?)([+-]?\\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: "(\\(\\*)(?:(ACCEPT|FAIL|F|MARK(?=:)|(?=:)|COMMIT|PRUNE|SKIP|THEN)(?:(:)([^)]+))?|(?:(LIMIT_(?:DEPTH|HEAP|MATCH))(=)(\\d+))|(CRLF|CR|ANYCRLF|ANY|LF|NUL|BSR_ANYCRLF|BSR_UNICODE|NOTEMPTY_ATSTART|NOTEMPTY|NO_AUTO_POSSESS|NO_DOTSTAR_ANCHOR|NO_JIT|NO_START_OPT|UTF|UCP))(\\))" }, "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: "(\\()(?<keyw>\\?C)(?:(?<num>\\d+)|`(?<name>(?:[^`]|``)*)`|'(?<name>(?:[^']|'')*)'|\"(?<name>(?:[^\"]|\"\")*)\"|\\^(?<name>(?:[^\\^]|\\^\\^)*)\\^|%(?<name>(?:[^%]|%%)*)%|\\#(?<name>(?:[^#]|\\#\\#)*)\\#|\\$(?<name>(?:[^$]|\\$\\$)*)\\$|\\{(?<name>(?:[^}]|\\}\\})*)\\})?(\\))|(\\()(?<keyw>\\*)(?<name>(?!\\d)\\w+)(?:\\[(?<tag>(?!\\d)\\w+)\\])?(?:\\{[^,}]+(?:,[^,}]+)*\\})?(\\))|(\\()(?<keyw>\\?)(\\{(?<g1>\\{)?+(?<g2>\\{)?+(?<g3>\\{)?+(?<g4>\\{)?+(?<g5>\\{)?+).+?\\}(?(<g1>)\\})(?(<g2>)\\})(?(<g3>)\\})(?(<g4>)\\})(?(<g5>)\\})(?:\\[(?<tag>(?!\\d)\\w+)\\])?(?<keyw>[X<>]?)(\\))", 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: "\\\\[pP]\\{([\\s\\w-]+(?:=[\\s\\w-]+)?)\\}|(\\[:)([\\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: "\\(\\?(?:\\^(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*|(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})+|(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*-(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*)\\)", 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: "(\\()(?<cond>\\?\\()(?:(?<NumberRef>(?<num>[+-]?\\d+)(?:(?<op>[+-])(?<num>\\d+))?)|(?<cond>R)\\g<NumberRef>?|(?<cond>R&)(?<NamedRef>(?<name>(?!\\d)\\w+)(?:(?<op>[+-])(?<num>\\d+))?)|(?<cond><)(?:\\g<NamedRef>|\\g<NumberRef>)(?<cond>>)|(?<cond>')(?:\\g<NamedRef>|\\g<NumberRef>)(?<cond>')|(?<cond>DEFINE)|(?<cond>VERSION)(?<compar>>?=)(?<num>\\d+\\.\\d+))(?<cond>\\))|(\\()(?<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: "(\\()((\\?)(?:([:|>=!*]|<[=!*])|P?<(?:((?!\\d)\\w+)(-))?((?!\\d)\\w+)>|'(?:((?!\\d)\\w+)(-))?((?!\\d)\\w+)'|(?:\\^(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*|(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})+|(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*-(?:[iJmnsUxwDPSW]|xx|y\\{[gw]\\})*):)|\\*(atomic|pla|positive_lookahead|nla|negative_lookahead|plb|positive_lookbehind|nlb|negative_lookbehind|napla|non_atomic_positive_lookahead|naplb|non_atomic_positive_lookbehind|sr|script_run|asr|atomic_script_run):)?+", 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: "\\\\u\\{\\s*(?:[0-9a-fA-F]+\\s*)+\\}|\\\\u[0-9a-fA-F]{4}|\\\\x\\{[0-9a-fA-F]+\\}|\\\\x[0-9a-fA-F]{0,2}|\\\\U[0-9a-fA-F]{8}|\\\\o\\{[0-7]+\\}|\\\\0[0-7]{0,3}|\\\\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: "(?=(?<oph>[/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}])|\\.(\\g<oph>|\\.|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))", 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: "\\G(?<=^|[\\s(\\[{,;:])((?!(//|/\\*|\\*/))([/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}]|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))++(?![\\s)\\]},;:]|\\z)" }, { 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: "\\G(?<!^|[\\s(\\[{,;:])((?!(//|/\\*|\\*/))([/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}]|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))++(?=[\\s)\\]},;:]|\\z)" }, { 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: "\\G((?!(//|/\\*|\\*/))([/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}]|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))++" }, { captures: { 0: { patterns: [{ match: ".+", name: "keyword.operator.custom.prefix.dot.swift" }] } }, comment: "Dot prefix unary operator", match: "\\G(?<=^|[\\s(\\[{,;:])\\.((?!(//|/\\*|\\*/))(\\.|[/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}]|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))++(?![\\s)\\]},;:]|\\z)" }, { captures: { 0: { patterns: [{ match: ".+", name: "keyword.operator.custom.postfix.dot.swift" }] } }, comment: "Dot postfix unary operator", match: "\\G(?<!^|[\\s(\\[{,;:])\\.((?!(//|/\\*|\\*/))(\\.|[/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}]|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))++(?=[\\s)\\]},;:]|\\z)" }, { captures: { 0: { patterns: [{ match: "\\G\\.\\.[.<]$", name: "keyword.operator.range.swift" }, { match: ".+", name: "keyword.operator.custom.infix.dot.swift" }] } }, comment: "Dot infix operator", match: "\\G\\.((?!(//|/\\*|\\*/))(\\.|[/=\\-+!*%<>&|^~?]|[\\x{00A1}-\\x{00A7}]|[\\x{00A9}\\x{00AB}]|[\\x{00AC}\\x{00AE}]|[\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]|[\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]|[\\x{2030}-\\x{203E}]|[\\x{2041}-\\x{2053}]|[\\x{2055}-\\x{205E}]|[\\x{2190}-\\x{23FF}]|[\\x{2500}-\\x{2775}]|[\\x{2794}-\\x{2BFF}]|[\\x{2E00}-\\x{2E7F}]|[\\x{3001}-\\x{3003}]|[\\x{3008}-\\x{3030}]|[\\x{0300}-\\x{036F}]|[\\x{1DC0}-\\x{1DFF}]|[\\x{20D0}-\\x{20FF}]|[\\x{FE00}-\\x{FE0F}]|[\\x{FE20}-\\x{FE2F}]|[\\x{E0100}-\\x{E01EF}]))++" }] }, { match: ":", name: "keyword.operator.ternary.swift" }] }, root: { patterns: [{ include: "#compiler-control" }, { include: "#declarations" }, { include: "#expressions" }] } }, scopeName: "source.swift" });
9
- var t = [
10
- e
11
- ];
12
- export {
13
- t as default
14
- };
@@ -1,7 +0,0 @@
1
- const n = Object.freeze({ displayName: "TOML", fileTypes: ["toml"], name: "toml", patterns: [{ include: "#comments" }, { include: "#groups" }, { include: "#key_pair" }, { include: "#invalid" }], repository: { comments: { begin: "(^[ \\t]+)?(?=#)", beginCaptures: { 1: { name: "punctuation.whitespace.comment.leading.toml" } }, end: "(?!\\G)", patterns: [{ begin: "#", beginCaptures: { 0: { name: "punctuation.definition.comment.toml" } }, end: "\\n", name: "comment.line.number-sign.toml" }] }, groups: { patterns: [{ captures: { 1: { name: "punctuation.definition.section.begin.toml" }, 2: { patterns: [{ match: "[^\\s.]+", name: "entity.name.section.toml" }] }, 3: { name: "punctuation.definition.section.begin.toml" } }, match: "^\\s*(\\[)([^\\[\\]]*)(\\])", name: "meta.group.toml" }, { captures: { 1: { name: "punctuation.definition.section.begin.toml" }, 2: { patterns: [{ match: "[^\\s.]+", name: "entity.name.section.toml" }] }, 3: { name: "punctuation.definition.section.begin.toml" } }, match: "^\\s*(\\[\\[)([^\\[\\]]*)(\\]\\])", name: "meta.group.double.toml" }] }, invalid: { match: "\\S+(\\s*(?=\\S))?", name: "invalid.illegal.not-allowed-here.toml" }, key_pair: { patterns: [{ begin: "([A-Za-z0-9_-]+)\\s*(=)\\s*", captures: { 1: { name: "variable.other.key.toml" }, 2: { name: "punctuation.separator.key-value.toml" } }, end: "(?<=\\S)(?<!=)|$", patterns: [{ include: "#primatives" }] }, { begin: '((")(.*?)("))\\s*(=)\\s*', captures: { 1: { name: "variable.other.key.toml" }, 2: { name: "punctuation.definition.variable.begin.toml" }, 3: { patterns: [{ match: '\\\\([btnfr"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})', name: "constant.character.escape.toml" }, { match: '\\\\[^btnfr"\\\\]', name: "invalid.illegal.escape.toml" }, { match: '"', name: "invalid.illegal.not-allowed-here.toml" }] }, 4: { name: "punctuation.definition.variable.end.toml" }, 5: { name: "punctuation.separator.key-value.toml" } }, end: "(?<=\\S)(?<!=)|$", patterns: [{ include: "#primatives" }] }, { begin: "((')([^']*)('))\\s*(=)\\s*", captures: { 1: { name: "variable.other.key.toml" }, 2: { name: "punctuation.definition.variable.begin.toml" }, 4: { name: "punctuation.definition.variable.end.toml" }, 5: { name: "punctuation.separator.key-value.toml" } }, end: "(?<=\\S)(?<!=)|$", patterns: [{ include: "#primatives" }] }, { begin: `(((?:[A-Za-z0-9_-]+|"(?:[^"\\\\]|\\\\.)*"|'[^']*')(?:\\s*\\.\\s*|(?=\\s*=))){2,})\\s*(=)\\s*`, captures: { 1: { name: "variable.other.key.toml", patterns: [{ match: "\\.", name: "punctuation.separator.variable.toml" }, { captures: { 1: { name: "punctuation.definition.variable.begin.toml" }, 2: { patterns: [{ match: '\\\\([btnfr"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})', name: "constant.character.escape.toml" }, { match: '\\\\[^btnfr"\\\\]', name: "invalid.illegal.escape.toml" }] }, 3: { name: "punctuation.definition.variable.end.toml" } }, match: '(")((?:[^"\\\\]|\\\\.)*)(")' }, { captures: { 1: { name: "punctuation.definition.variable.begin.toml" }, 2: { name: "punctuation.definition.variable.end.toml" } }, match: "(')[^']*(')" }] }, 3: { name: "punctuation.separator.key-value.toml" } }, comment: "Dotted key", end: "(?<=\\S)(?<!=)|$", patterns: [{ include: "#primatives" }] }] }, primatives: { patterns: [{ begin: '\\G"""', beginCaptures: { 0: { name: "punctuation.definition.string.begin.toml" } }, end: '"{3,5}', endCaptures: { 0: { name: "punctuation.definition.string.end.toml" } }, name: "string.quoted.triple.double.toml", patterns: [{ match: '\\\\([btnfr"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})', name: "constant.character.escape.toml" }, { match: '\\\\[^btnfr"\\\\\\n]', name: "invalid.illegal.escape.toml" }] }, { begin: '\\G"', beginCaptures: { 0: { name: "punctuation.definition.string.begin.toml" } }, end: '"', endCaptures: { 0: { name: "punctuation.definition.string.end.toml" } }, name: "string.quoted.double.toml", patterns: [{ match: '\\\\([btnfr"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})', name: "constant.character.escape.toml" }, { match: '\\\\[^btnfr"\\\\]', name: "invalid.illegal.escape.toml" }] }, { begin: "\\G'''", beginCaptures: { 0: { name: "punctuation.definition.string.begin.toml" } }, end: "'{3,5}", endCaptures: { 0: { name: "punctuation.definition.string.end.toml" } }, name: "string.quoted.triple.single.toml" }, { begin: "\\G'", beginCaptures: { 0: { name: "punctuation.definition.string.begin.toml" } }, end: "'", endCaptures: { 0: { name: "punctuation.definition.string.end.toml" } }, name: "string.quoted.single.toml" }, { match: "\\G\\d{4}-(0[1-9]|1[012])-(?!00|3[2-9])[0-3]\\d([Tt ](?!2[5-9])[0-2]\\d:[0-5]\\d:(?!6[1-9])[0-6]\\d(\\.\\d+)?(Z|[+-](?!2[5-9])[0-2]\\d:[0-5]\\d)?)?", name: "constant.other.date.toml" }, { match: "\\G(?!2[5-9])[0-2]\\d:[0-5]\\d:(?!6[1-9])[0-6]\\d(\\.\\d+)?", name: "constant.other.time.toml" }, { match: "\\G(true|false)", name: "constant.language.boolean.toml" }, { match: "\\G0x\\h(\\h|_\\h)*", name: "constant.numeric.hex.toml" }, { match: "\\G0o[0-7]([0-7]|_[0-7])*", name: "constant.numeric.octal.toml" }, { match: "\\G0b[01]([01]|_[01])*", name: "constant.numeric.binary.toml" }, { match: "\\G[+-]?(inf|nan)", name: "constant.numeric.toml" }, { match: "\\G([+-]?(0|([1-9]((\\d|_\\d)+)?)))(?=[.eE])(\\.(\\d((\\d|_\\d)+)?))?([eE]([+-]?\\d((\\d|_\\d)+)?))?", name: "constant.numeric.float.toml" }, { match: "\\G([+-]?(0|([1-9]((\\d|_\\d)+)?)))", name: "constant.numeric.integer.toml" }, { begin: "\\G\\[", beginCaptures: { 0: { name: "punctuation.definition.array.begin.toml" } }, end: "\\]", endCaptures: { 0: { name: "punctuation.definition.array.end.toml" } }, name: "meta.array.toml", patterns: [{ begin: `(?=["'']|[+-]?\\d|[+-]?(inf|nan)|true|false|\\[|\\{)`, end: ",|(?=])", endCaptures: { 0: { name: "punctuation.separator.array.toml" } }, patterns: [{ include: "#primatives" }, { include: "#comments" }, { include: "#invalid" }] }, { include: "#comments" }, { include: "#invalid" }] }, { begin: "\\G\\{", beginCaptures: { 0: { name: "punctuation.definition.inline-table.begin.toml" } }, end: "\\}", endCaptures: { 0: { name: "punctuation.definition.inline-table.end.toml" } }, name: "meta.inline-table.toml", patterns: [{ begin: "(?=\\S)", end: ",|(?=})", endCaptures: { 0: { name: "punctuation.separator.inline-table.toml" } }, patterns: [{ include: "#key_pair" }] }, { include: "#comments" }] }] } }, scopeName: "source.toml" });
2
- var e = [
3
- n
4
- ];
5
- export {
6
- e as default
7
- };