@aquera/nile-elements 0.0.104 → 0.0.105

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 (249) hide show
  1. package/README.md +5 -0
  2. package/dist/apl-21d06901.cjs.js +2 -0
  3. package/dist/apl-21d06901.cjs.js.map +1 -0
  4. package/dist/apl-d16c7537.esm.js +1 -0
  5. package/dist/{asciidoc-e0d3b314.cjs.js → asciidoc-001fd7c1.cjs.js} +2 -2
  6. package/dist/{asciidoc-e0d3b314.cjs.js.map → asciidoc-001fd7c1.cjs.js.map} +1 -1
  7. package/dist/{asciidoc-6be99424.esm.js → asciidoc-0966d4dc.esm.js} +1 -1
  8. package/dist/{blade-3208a46d.esm.js → blade-11ab018c.esm.js} +1 -1
  9. package/dist/{blade-edfc0fdd.cjs.js → blade-8db809ca.cjs.js} +2 -2
  10. package/dist/blade-8db809ca.cjs.js.map +1 -0
  11. package/dist/c-8cfe7ebc.esm.js +1 -0
  12. package/dist/c-b1a3514f.cjs.js +2 -0
  13. package/dist/c-b1a3514f.cjs.js.map +1 -0
  14. package/dist/codeql-48a19368.cjs.js +2 -0
  15. package/dist/codeql-48a19368.cjs.js.map +1 -0
  16. package/dist/codeql-535d71a2.esm.js +1 -0
  17. package/dist/cpp-62f58e5c.cjs.js +2 -0
  18. package/dist/cpp-62f58e5c.cjs.js.map +1 -0
  19. package/dist/cpp-ee96ee92.esm.js +1 -0
  20. package/dist/crystal-4277175c.cjs.js +2 -0
  21. package/dist/crystal-4277175c.cjs.js.map +1 -0
  22. package/dist/crystal-c89e4ade.esm.js +1 -0
  23. package/dist/{csharp-fe9efa9d.cjs.js → csharp-36e7912d.cjs.js} +2 -2
  24. package/dist/csharp-36e7912d.cjs.js.map +1 -0
  25. package/dist/{csharp-2f739c17.esm.js → csharp-78bc1c6a.esm.js} +1 -1
  26. package/dist/dream-maker-19eb7025.esm.js +1 -0
  27. package/dist/dream-maker-8dcd65d8.cjs.js +2 -0
  28. package/dist/dream-maker-8dcd65d8.cjs.js.map +1 -0
  29. package/dist/elixir-971d0fb3.esm.js +1 -0
  30. package/dist/elixir-de3ce4da.cjs.js +2 -0
  31. package/dist/elixir-de3ce4da.cjs.js.map +1 -0
  32. package/dist/{elm-0c5dbed5.cjs.js → elm-53838edc.cjs.js} +2 -2
  33. package/dist/{elm-0c5dbed5.cjs.js.map → elm-53838edc.cjs.js.map} +1 -1
  34. package/dist/{elm-3dbc06e2.esm.js → elm-9874a65c.esm.js} +1 -1
  35. package/dist/emacs-lisp-acd28b05.esm.js +1 -0
  36. package/dist/emacs-lisp-cfcfbca4.cjs.js +2 -0
  37. package/dist/emacs-lisp-cfcfbca4.cjs.js.map +1 -0
  38. package/dist/{erb-c397c5b8.cjs.js → erb-a42121e2.cjs.js} +2 -2
  39. package/dist/{erb-c397c5b8.cjs.js.map → erb-a42121e2.cjs.js.map} +1 -1
  40. package/dist/{erb-3df2a1e4.esm.js → erb-f580df2b.esm.js} +1 -1
  41. package/dist/{fortran-fixed-form-5221c659.cjs.js → fortran-fixed-form-a480dd28.cjs.js} +2 -2
  42. package/dist/{fortran-fixed-form-5221c659.cjs.js.map → fortran-fixed-form-a480dd28.cjs.js.map} +1 -1
  43. package/dist/{fortran-fixed-form-de2fa930.esm.js → fortran-fixed-form-f1691b9f.esm.js} +1 -1
  44. package/dist/fortran-free-form-a777429e.esm.js +1 -0
  45. package/dist/fortran-free-form-ffdde287.cjs.js +2 -0
  46. package/dist/fortran-free-form-ffdde287.cjs.js.map +1 -0
  47. package/dist/{fsharp-f129bbeb.esm.js → fsharp-69c4fb5c.esm.js} +1 -1
  48. package/dist/{fsharp-09a5f785.cjs.js → fsharp-d59a3c1f.cjs.js} +2 -2
  49. package/dist/{fsharp-09a5f785.cjs.js.map → fsharp-d59a3c1f.cjs.js.map} +1 -1
  50. package/dist/{git-rebase-1f689746.cjs.js → git-rebase-7589e873.cjs.js} +2 -2
  51. package/dist/{git-rebase-1f689746.cjs.js.map → git-rebase-7589e873.cjs.js.map} +1 -1
  52. package/dist/{git-rebase-a3a21dac.esm.js → git-rebase-bb01fb7b.esm.js} +1 -1
  53. package/dist/{glsl-f391b342.esm.js → glsl-1493bfc0.esm.js} +1 -1
  54. package/dist/{glsl-018c76d4.cjs.js → glsl-c588b399.cjs.js} +2 -2
  55. package/dist/{glsl-018c76d4.cjs.js.map → glsl-c588b399.cjs.js.map} +1 -1
  56. package/dist/{go-09393d7b.cjs.js → go-a05e58ea.cjs.js} +2 -2
  57. package/dist/go-a05e58ea.cjs.js.map +1 -0
  58. package/dist/{go-327b8b08.esm.js → go-ecfc5b99.esm.js} +1 -1
  59. package/dist/haml-2253a1bd.cjs.js +2 -0
  60. package/dist/haml-2253a1bd.cjs.js.map +1 -0
  61. package/dist/haml-43d9b125.esm.js +1 -0
  62. package/dist/hcl-595d9f51.cjs.js +2 -0
  63. package/dist/hcl-595d9f51.cjs.js.map +1 -0
  64. package/dist/hcl-6a14c75f.esm.js +1 -0
  65. package/dist/hjson-c3c357d7.cjs.js +2 -0
  66. package/dist/hjson-c3c357d7.cjs.js.map +1 -0
  67. package/dist/hjson-d42502da.esm.js +1 -0
  68. package/dist/{http-c5198897.esm.js → http-05cedc24.esm.js} +1 -1
  69. package/dist/{http-4370aef9.cjs.js → http-6aabe313.cjs.js} +2 -2
  70. package/dist/{http-4370aef9.cjs.js.map → http-6aabe313.cjs.js.map} +1 -1
  71. package/dist/{julia-5e4ea542.cjs.js → julia-24e685eb.cjs.js} +2 -2
  72. package/dist/{julia-5e4ea542.cjs.js.map → julia-24e685eb.cjs.js.map} +1 -1
  73. package/dist/{julia-e630ba73.esm.js → julia-944cceb2.esm.js} +1 -1
  74. package/dist/{latex-1adfa940.cjs.js → latex-bbf47f0d.cjs.js} +2 -2
  75. package/dist/{latex-1adfa940.cjs.js.map → latex-bbf47f0d.cjs.js.map} +1 -1
  76. package/dist/{latex-edebd2cc.esm.js → latex-c78294e0.esm.js} +1 -1
  77. package/dist/liquid-5e828fc2.cjs.js +2 -0
  78. package/dist/liquid-5e828fc2.cjs.js.map +1 -0
  79. package/dist/liquid-c0372db6.esm.js +1 -0
  80. package/dist/{lua-125b4f95.esm.js → lua-1393b713.esm.js} +1 -1
  81. package/dist/{lua-1990ffc7.cjs.js → lua-2512266d.cjs.js} +2 -2
  82. package/dist/{lua-1990ffc7.cjs.js.map → lua-2512266d.cjs.js.map} +1 -1
  83. package/dist/{markdown-9f728eba.esm.js → markdown-09aa0843.esm.js} +1 -1
  84. package/dist/{markdown-844e62a0.cjs.js → markdown-3ee08af9.cjs.js} +2 -2
  85. package/dist/{markdown-844e62a0.cjs.js.map → markdown-3ee08af9.cjs.js.map} +1 -1
  86. package/dist/matlab-534739f2.cjs.js +2 -0
  87. package/dist/matlab-534739f2.cjs.js.map +1 -0
  88. package/dist/matlab-97eddcfd.esm.js +1 -0
  89. package/dist/{mdc-89c1812c.cjs.js → mdc-7262ea7f.cjs.js} +2 -2
  90. package/dist/{mdc-89c1812c.cjs.js.map → mdc-7262ea7f.cjs.js.map} +1 -1
  91. package/dist/{mdc-78460ad2.esm.js → mdc-a46ebf55.esm.js} +1 -1
  92. package/dist/{nginx-d4fde8c7.cjs.js → nginx-33da8d52.cjs.js} +2 -2
  93. package/dist/{nginx-d4fde8c7.cjs.js.map → nginx-33da8d52.cjs.js.map} +1 -1
  94. package/dist/{nginx-4e240995.esm.js → nginx-9eb574b4.esm.js} +1 -1
  95. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  96. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  97. package/dist/nile-chip/nile-chip.esm.js +1 -1
  98. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  99. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  100. package/dist/nile-dialog/nile-dialog.css.cjs.js +1 -1
  101. package/dist/nile-dialog/nile-dialog.css.cjs.js.map +1 -1
  102. package/dist/nile-dialog/nile-dialog.css.esm.js +18 -3
  103. package/dist/nile-dialog/nile-dialog.esm.js +6 -4
  104. package/dist/nile-highlighter/nile-highlighter.cjs.js +1 -1
  105. package/dist/nile-highlighter/nile-highlighter.esm.js +1 -1
  106. package/dist/nile-loader/nile-loader.cjs.js +1 -1
  107. package/dist/nile-loader/nile-loader.cjs.js.map +1 -1
  108. package/dist/nile-loader/nile-loader.esm.js +5 -6
  109. package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
  110. package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
  111. package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
  112. package/dist/{nim-2d3e58bd.esm.js → nim-19ded5b2.esm.js} +1 -1
  113. package/dist/{nim-68123944.cjs.js → nim-d17fab7b.cjs.js} +2 -2
  114. package/dist/{nim-68123944.cjs.js.map → nim-d17fab7b.cjs.js.map} +1 -1
  115. package/dist/php-61f68171.esm.js +1 -0
  116. package/dist/php-cc873410.cjs.js +2 -0
  117. package/dist/php-cc873410.cjs.js.map +1 -0
  118. package/dist/{racket-7b394aba.cjs.js → racket-0c9d5c0f.cjs.js} +2 -2
  119. package/dist/{racket-7b394aba.cjs.js.map → racket-0c9d5c0f.cjs.js.map} +1 -1
  120. package/dist/{racket-81dda9e5.esm.js → racket-55a31f6b.esm.js} +1 -1
  121. package/dist/{razor-1b5232cc.cjs.js → razor-a2425731.cjs.js} +2 -2
  122. package/dist/{razor-1b5232cc.cjs.js.map → razor-a2425731.cjs.js.map} +1 -1
  123. package/dist/{razor-d377d825.esm.js → razor-b33c609c.esm.js} +1 -1
  124. package/dist/{rst-7ca0bc88.cjs.js → rst-328f0cf1.cjs.js} +2 -2
  125. package/dist/{rst-7ca0bc88.cjs.js.map → rst-328f0cf1.cjs.js.map} +1 -1
  126. package/dist/{rst-0c779bb4.esm.js → rst-c0bca969.esm.js} +1 -1
  127. package/dist/{ruby-a3bdb75e.esm.js → ruby-0ae8b3e3.esm.js} +1 -1
  128. package/dist/{ruby-951187c3.cjs.js → ruby-82f6fde2.cjs.js} +2 -2
  129. package/dist/{ruby-951187c3.cjs.js.map → ruby-82f6fde2.cjs.js.map} +1 -1
  130. package/dist/{scala-f087204d.esm.js → scala-09ae48a2.esm.js} +1 -1
  131. package/dist/{scala-b2ea8aa7.cjs.js → scala-44c4b612.cjs.js} +2 -2
  132. package/dist/{scala-b2ea8aa7.cjs.js.map → scala-44c4b612.cjs.js.map} +1 -1
  133. package/dist/{shellscript-ac23285d.esm.js → shellscript-279f3c20.esm.js} +1 -1
  134. package/dist/{shellscript-cd92245f.cjs.js → shellscript-fbbc671d.cjs.js} +2 -2
  135. package/dist/{shellscript-cd92245f.cjs.js.map → shellscript-fbbc671d.cjs.js.map} +1 -1
  136. package/dist/{shellsession-396c6681.esm.js → shellsession-c6d86b76.esm.js} +1 -1
  137. package/dist/{shellsession-223fd590.cjs.js → shellsession-d64b6377.cjs.js} +2 -2
  138. package/dist/{shellsession-223fd590.cjs.js.map → shellsession-d64b6377.cjs.js.map} +1 -1
  139. package/dist/src/nile-chip/nile-chip.js +10 -7
  140. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  141. package/dist/src/nile-dialog/nile-dialog.css.js +18 -3
  142. package/dist/src/nile-dialog/nile-dialog.css.js.map +1 -1
  143. package/dist/src/nile-dialog/nile-dialog.d.ts +1 -0
  144. package/dist/src/nile-dialog/nile-dialog.js +10 -2
  145. package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
  146. package/dist/src/nile-loader/nile-loader.js +0 -1
  147. package/dist/src/nile-loader/nile-loader.js.map +1 -1
  148. package/dist/src/nile-tab-group/nile-tab-group.js +4 -1
  149. package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
  150. package/dist/stata-149110fb.esm.js +1 -0
  151. package/dist/stata-b4a1937c.cjs.js +2 -0
  152. package/dist/stata-b4a1937c.cjs.js.map +1 -0
  153. package/dist/{svelte-70f34f63.esm.js → svelte-1048eb5a.esm.js} +1 -1
  154. package/dist/{svelte-fac37669.cjs.js → svelte-4fd29bd3.cjs.js} +2 -2
  155. package/dist/{svelte-fac37669.cjs.js.map → svelte-4fd29bd3.cjs.js.map} +1 -1
  156. package/dist/swift-502aad80.cjs.js +2 -0
  157. package/dist/{swift-73991d74.cjs.js.map → swift-502aad80.cjs.js.map} +1 -1
  158. package/dist/swift-c090b356.esm.js +1 -0
  159. package/dist/{templ-d3b439bb.esm.js → templ-628e79a2.esm.js} +1 -1
  160. package/dist/{templ-07af4f95.cjs.js → templ-d270ba1d.cjs.js} +2 -2
  161. package/dist/{templ-07af4f95.cjs.js.map → templ-d270ba1d.cjs.js.map} +1 -1
  162. package/dist/terraform-500d20b0.esm.js +1 -0
  163. package/dist/terraform-e5570e0d.cjs.js +2 -0
  164. package/dist/terraform-e5570e0d.cjs.js.map +1 -0
  165. package/dist/{ts-tags-dd626bee.esm.js → ts-tags-5da8755a.esm.js} +1 -1
  166. package/dist/{ts-tags-060f8b3f.cjs.js → ts-tags-df3e88d7.cjs.js} +2 -2
  167. package/dist/{ts-tags-060f8b3f.cjs.js.map → ts-tags-df3e88d7.cjs.js.map} +1 -1
  168. package/dist/tsconfig.tsbuildinfo +1 -1
  169. package/dist/twig-5bc34a9a.esm.js +1 -0
  170. package/dist/twig-af3abed5.cjs.js +2 -0
  171. package/dist/twig-af3abed5.cjs.js.map +1 -0
  172. package/dist/{vue-0bf65993.cjs.js → vue-09163277.cjs.js} +2 -2
  173. package/dist/{vue-0bf65993.cjs.js.map → vue-09163277.cjs.js.map} +1 -1
  174. package/dist/{vue-9a567043.esm.js → vue-dbfc25c6.esm.js} +1 -1
  175. package/dist/{vue-html-87c1aa08.cjs.js → vue-html-8d140150.cjs.js} +2 -2
  176. package/dist/{vue-html-87c1aa08.cjs.js.map → vue-html-8d140150.cjs.js.map} +1 -1
  177. package/dist/{vue-html-5432e63a.esm.js → vue-html-9284886a.esm.js} +1 -1
  178. package/dist/wasm-69304cd7.cjs.js +2 -0
  179. package/dist/{wasm-2b3accdb.cjs.js.map → wasm-69304cd7.cjs.js.map} +1 -1
  180. package/dist/{wasm-ec34668d.esm.js → wasm-aabb0cac.esm.js} +1 -1
  181. package/dist/{wikitext-bc11a136.cjs.js → wikitext-1ea78c25.cjs.js} +2 -2
  182. package/dist/{wikitext-bc11a136.cjs.js.map → wikitext-1ea78c25.cjs.js.map} +1 -1
  183. package/dist/{wikitext-0150fba4.esm.js → wikitext-3fe603e5.esm.js} +1 -1
  184. package/package.json +1 -1
  185. package/src/nile-chip/nile-chip.ts +13 -7
  186. package/src/nile-dialog/nile-dialog.css.ts +18 -3
  187. package/src/nile-dialog/nile-dialog.ts +8 -2
  188. package/src/nile-loader/nile-loader.ts +0 -1
  189. package/src/nile-tab-group/nile-tab-group.ts +2 -1
  190. package/dist/apl-41950f78.cjs.js +0 -2
  191. package/dist/apl-41950f78.cjs.js.map +0 -1
  192. package/dist/apl-c55a4361.esm.js +0 -1
  193. package/dist/blade-edfc0fdd.cjs.js.map +0 -1
  194. package/dist/c-3ee6456a.esm.js +0 -1
  195. package/dist/c-da3bb8a6.cjs.js +0 -2
  196. package/dist/c-da3bb8a6.cjs.js.map +0 -1
  197. package/dist/codeql-842eb6cf.esm.js +0 -1
  198. package/dist/codeql-d89527b8.cjs.js +0 -2
  199. package/dist/codeql-d89527b8.cjs.js.map +0 -1
  200. package/dist/cpp-08227984.esm.js +0 -1
  201. package/dist/cpp-cf2e9ff3.cjs.js +0 -2
  202. package/dist/cpp-cf2e9ff3.cjs.js.map +0 -1
  203. package/dist/crystal-38a7d086.cjs.js +0 -2
  204. package/dist/crystal-38a7d086.cjs.js.map +0 -1
  205. package/dist/crystal-39a9e1ea.esm.js +0 -1
  206. package/dist/csharp-fe9efa9d.cjs.js.map +0 -1
  207. package/dist/dream-maker-03e02970.cjs.js +0 -2
  208. package/dist/dream-maker-03e02970.cjs.js.map +0 -1
  209. package/dist/dream-maker-d074d317.esm.js +0 -1
  210. package/dist/elixir-677f91c1.cjs.js +0 -2
  211. package/dist/elixir-677f91c1.cjs.js.map +0 -1
  212. package/dist/elixir-e6f892c0.esm.js +0 -1
  213. package/dist/emacs-lisp-acc9d1bf.esm.js +0 -1
  214. package/dist/emacs-lisp-ba2192a6.cjs.js +0 -2
  215. package/dist/emacs-lisp-ba2192a6.cjs.js.map +0 -1
  216. package/dist/fortran-free-form-662642e8.cjs.js +0 -2
  217. package/dist/fortran-free-form-662642e8.cjs.js.map +0 -1
  218. package/dist/fortran-free-form-b8908a2e.esm.js +0 -1
  219. package/dist/go-09393d7b.cjs.js.map +0 -1
  220. package/dist/haml-44312b9e.cjs.js +0 -2
  221. package/dist/haml-44312b9e.cjs.js.map +0 -1
  222. package/dist/haml-ce8f521d.esm.js +0 -1
  223. package/dist/hcl-659b5ff4.esm.js +0 -1
  224. package/dist/hcl-93dee28c.cjs.js +0 -2
  225. package/dist/hcl-93dee28c.cjs.js.map +0 -1
  226. package/dist/hjson-e5dbb832.cjs.js +0 -2
  227. package/dist/hjson-e5dbb832.cjs.js.map +0 -1
  228. package/dist/hjson-ff155aeb.esm.js +0 -1
  229. package/dist/liquid-1369a009.cjs.js +0 -2
  230. package/dist/liquid-1369a009.cjs.js.map +0 -1
  231. package/dist/liquid-e48eb0ca.esm.js +0 -1
  232. package/dist/matlab-52886ffe.esm.js +0 -1
  233. package/dist/matlab-71a4c00e.cjs.js +0 -2
  234. package/dist/matlab-71a4c00e.cjs.js.map +0 -1
  235. package/dist/php-1beee6c8.esm.js +0 -1
  236. package/dist/php-580a8f27.cjs.js +0 -2
  237. package/dist/php-580a8f27.cjs.js.map +0 -1
  238. package/dist/stata-5d259eca.cjs.js +0 -2
  239. package/dist/stata-5d259eca.cjs.js.map +0 -1
  240. package/dist/stata-ce57a14a.esm.js +0 -1
  241. package/dist/swift-22135585.esm.js +0 -1
  242. package/dist/swift-73991d74.cjs.js +0 -2
  243. package/dist/terraform-5a5bfeae.esm.js +0 -1
  244. package/dist/terraform-73471876.cjs.js +0 -2
  245. package/dist/terraform-73471876.cjs.js.map +0 -1
  246. package/dist/twig-8f9f15f7.cjs.js +0 -2
  247. package/dist/twig-8f9f15f7.cjs.js.map +0 -1
  248. package/dist/twig-964ce7ee.esm.js +0 -1
  249. package/dist/wasm-2b3accdb.cjs.js +0 -2
@@ -1 +0,0 @@
1
- import t from"./sql-aa8ea56a.esm.js";var e=[...t,Object.freeze({displayName:"Stata",fileTypes:["do","ado","mata"],foldingStartMarker:"\\{\\s*$",foldingStopMarker:"^\\s*\\}",name:"stata",patterns:[{include:"#ascii-regex-functions"},{include:"#unicode-regex-functions"},{include:"#constants"},{include:"#functions"},{include:"#comments"},{include:"#subscripts"},{include:"#operators"},{include:"#macro-local"},{include:"#macro-global"},{include:"#string-compound"},{include:"#string-regular"},{include:"#builtin_variables"},{include:"#macro-commands"},{comment:"keywords that delimit flow conditionals",match:"\\b(if|else if|else)\\b",name:"keyword.control.conditional.stata"},{captures:{1:{name:"storage.type.scalar.stata"}},match:"^\\s*(sca(lar|la|l)?(\\s+de(fine|fin|fi|f)?)?)\\s+(?!(drop|dir?|l(ist|is|i)?)\\s+)"},{begin:"\\b(mer(ge|g)?)\\s+(1|m|n)(:)(1|m|n)",beginCaptures:{1:{name:"keyword.control.flow.stata"},3:{patterns:[{include:"#constants"},{match:"m|n",name:""}]},4:{name:"punctuation.separator.key-value"},5:{patterns:[{include:"#constants"},{match:"m|n",name:""}]}},end:"using",patterns:[{include:"#builtin_variables"},{include:"#macro-local"},{include:"#macro-global"},{include:"#comments"}]},{captures:{1:{name:"keyword.control.flow.stata"},2:{patterns:[{include:"#macro-local-identifiers"},{include:"#macro-local"},{include:"#macro-global"}]},3:{name:"keyword.control.flow.stata"}},match:"\\b(foreach)\\s+((?!in|of).+)\\s+(in|of var(list|lis|li|l)?|of new(list|lis|li|l)?|of num(list|lis|li|l)?)\\b"},{begin:"\\b(foreach)\\s+((?!in|of).+)\\s+(of loc(al|a)?|of glo(bal|ba|b)?)\\b\\s*",beginCaptures:{1:{name:"keyword.control.flow.stata"},2:{patterns:[{include:"#macro-local-identifiers"},{include:"#macro-local"},{include:"#macro-global"}]},3:{name:"keyword.control.flow.stata"}},end:"(?=\\s*\\{)",patterns:[{include:"#macro-local-identifiers"},{include:"#macro-local"},{include:"#macro-global"}]},{begin:"\\b(forvalues|forvalue|forvalu|forval|forva|forv)\\s*",beginCaptures:{1:{name:"keyword.control.flow.stata"}},end:"\\s*(=)\\s*([^{]+)\\s*|(?=\\n)",endCaptures:{1:{name:"keyword.operator.assignment.stata"},2:{patterns:[{include:"#constants"},{include:"#operators"},{include:"#macro-local"},{include:"#macro-global"}]}},patterns:[{include:"#macro-local-identifiers"},{include:"#macro-local"},{include:"#macro-global"}]},{comment:"keywords that delimit loops",match:"\\b(while|continue)\\b",name:"keyword.control.flow.stata"},{captures:{1:{name:"keyword.other.stata"}},comment:"keywords that haven't fit into other groups (yet).",match:"\\b(as|ass|asse|asser|assert)\\b"},{comment:"prefixes that require a colon",match:"\\b(by(sort|sor|so|s)?|statsby|rolling|bootstrap|jackknife|permute|simulate|svy|mi est(imate|imat|ima|im|i)?|nestreg|stepwise|xi|fp|mfp|vers(ion|io|i)?)\\b",name:"storage.type.function.stata"},{comment:"prefixes that don't need a colon",match:"\\b(qui(etly|etl|et|e)?|n(oisily|oisil|oisi|ois|oi|o)?|cap(ture|tur|tu|t)?)\\b:?",name:"keyword.control.flow.stata"},{captures:{1:{name:"storage.type.function.stata"},3:{name:"storage.type.function.stata"},7:{name:"entity.name.function.stata"}},match:"\\s*(pr(ogram|ogra|ogr|og|o)?)\\s+((di(r)?|drop|l(ist|is|i)?)\\s+)([\\w&&[^0-9]]\\w{0,31})"},{begin:"^\\s*(pr(ogram|ogra|ogr|og|o)?)\\s+(de(fine|fin|fi|f)?\\s+)?",beginCaptures:{1:{name:"storage.type.function.stata"},3:{name:"storage.type.function.stata"}},end:"(?=,|\\n|/)",patterns:[{include:"#macro-local"},{include:"#macro-global"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"entity.name.function.stata"},{match:"[^A-za-z_0-9,\\n/ ]+",name:"invalid.illegal.name.stata"}]},{captures:{1:"keyword.functions.data.stata.test"},match:"\\b(form(at|a)?)\\s*([\\w&&[^0-9]]\\w{0,31})*\\s*(%)(-)?(0)?(\\d+)(.)(\\d+)(e|f|g)(c)?"},{include:"#braces-with-error"},{begin:"(?=syntax)",end:"\\n",patterns:[{begin:"syntax",beginCaptures:{0:{name:"keyword.functions.program.stata"}},comment:"color before the comma",end:"(?=,|\\n)",patterns:[{begin:"///",end:"\\n",name:"comment.block.stata"},{match:"\\[",name:"punctuation.definition.parameters.begin.stata"},{match:"\\]",name:"punctuation.definition.parameters.end.stata"},{match:"\\b(varlist|varname|newvarlist|newvarname|namelist|name|anything)\\b",name:"entity.name.type.class.stata"},{captures:{2:{name:"entity.name.type.class.stata"},3:{name:"keyword.operator.arithmetic.stata"}},match:"\\b((if|in|using|fweight|aweight|pweight|iweight))\\b(/)?"},{captures:{1:{name:"keyword.operator.arithmetic.stata"},2:{name:"entity.name.type.class.stata"}},match:"(/)?(exp)"},{include:"#constants"},{include:"#operators"},{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#builtin_variables"}]},{begin:",",beginCaptures:{0:{name:"punctuation.definition.variable.begin.stata"}},comment:"things to color after the comma",end:"(?=\\n)",patterns:[{begin:"///",end:"\\n",name:"comment.block.stata"},{begin:"([^\\s\\[\\]]+)(\\()",beginCaptures:{1:{comment:"these are the names that become macros",patterns:[{include:"#macro-local-identifiers"},{include:"#macro-local"},{include:"#macro-global"}]},2:{name:"keyword.operator.parentheses.stata"}},comment:"color options with parentheses",end:"\\)",endCaptures:{0:{name:"keyword.operator.parentheses.stata"}},patterns:[{captures:{0:{name:"support.type.stata"}},comment:"the first word is often a type",match:"\\b(integer|intege|integ|inte|int|real|string|strin|stri|str)\\b"},{include:"#constants"},{include:"#operators"},{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#builtin_variables"}]},{include:"#macro-local-identifiers"},{include:"#constants"},{include:"#operators"},{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#builtin_variables"}]}]},{captures:{1:{name:"keyword.functions.data.stata"}},comment:"one-word commands",match:"\\b(sa(v|ve)|saveold|destring|tostring|u(se|s)?|note(s)?|form(at|a)?)\\b"},{comment:"programming commands",match:"\\b(exit|end)\\b",name:"keyword.functions.data.stata"},{captures:{1:{name:"keyword.functions.data.stata"},2:{patterns:[{include:"#macro-local"}]},4:{name:"invalid.illegal.name.stata"},5:{name:"keyword.operator.assignment.stata"}},match:"\\b(replace)\\s+([^=]+)\\s*((==)|(=))"},{captures:{1:{name:"keyword.functions.data.stata"},3:{name:"support.type.stata"},5:{patterns:[{include:"#reserved-names"},{include:"#macro-local"}]},7:{name:"invalid.illegal.name.stata"},8:{name:"keyword.operator.assignment.stata"}},match:"\\b(g(enerate|enerat|enera|ener|ene|en|e)?|egen)\\s+((byte|int|long|float|double|str[1-9]?\\d?\\d?\\d?|strL)\\s+)?([^=\\s]+)\\s*((==)|(=))"},{captures:{1:{name:"keyword.functions.data.stata"},3:{name:"support.type.stata"}},match:"\\b(set ty(pe|p)?)\\s+((byte|int|long|float|double|str[1-9]?\\d?\\d?\\d?|strL)?\\s+)\\b"},{captures:{1:{name:"keyword.functions.data.stata"},3:{name:"keyword.functions.data.stata"},6:{name:"punctuation.definition.string.begin.stata"},7:{patterns:[{include:"#string-compound"},{include:"#macro-local-escaped"},{include:"#macro-global-escaped"},{include:"#macro-local"},{include:"#macro-global"},{match:"[^`\\$]{81,}",name:"invalid.illegal.name.stata"},{match:".",name:"string.quoted.double.compound.stata"}]},8:{name:"punctuation.definition.string.begin.stata"}},match:'\\b(la(bel|be|b)?)\\s+(var(iable|iabl|iab|ia|i)?)\\s+([\\w&&[^0-9]]\\w{0,31})\\s+(`")(.+)("\')'},{captures:{1:{name:"keyword.functions.data.stata"},3:{name:"keyword.functions.data.stata"},6:{name:"punctuation.definition.string.begin.stata"},7:{patterns:[{include:"#macro-local-escaped"},{include:"#macro-global-escaped"},{include:"#macro-local"},{include:"#macro-global"},{match:"[^`\\$]{81,}",name:"invalid.illegal.name.stata"},{match:".",name:"string.quoted.double.stata"}]},8:{name:"punctuation.definition.string.begin.stata"}},match:'\\b(la(bel|be|b)?)\\s+(var(iable|iabl|iab|ia|i)?)\\s+([\\w&&[^0-9]]\\w{0,31})\\s+(")(.+)(")'},{captures:{1:{name:"keyword.functions.data.stata"},3:{name:"keyword.functions.data.stata"}},match:"\\b(la(bel|be|b)?)\\s+(da(ta|t)?|var(iable|iabl|iab|ia|i)?|de(f|fi|fin|fine)?|val(ues|ue|u)?|di(r)?|l(ist|is|i)?|copy|drop|save|lang(uage|uag|ua|u)?)\\b"},{begin:"\\b(drop|keep)\\b(?!\\s+(if|in)\\b)",beginCaptures:{1:{name:"keyword.functions.data.stata"}},end:"\\n",patterns:[{match:"\\b(if|in)\\b",name:"invalid.illegal.name.stata"},{include:"#comments"},{include:"#macro-local"},{include:"#macro-global"},{include:"#operators"}]},{captures:{1:{name:"keyword.functions.data.stata"},2:{name:"keyword.functions.data.stata"}},match:"\\b(drop|keep)\\s+(if|in)\\b"},{begin:"^\\s*mata:?\\s*$",comment:"won't match single-line Mata statements",end:"^\\s*end\\s*$\\n?",name:"meta.embedded.block.mata",patterns:[{match:"(?<![^$\\s])(version|pragma|if|else|for|while|do|break|continue|goto|return)(?=\\s)",name:"keyword.control.mata"},{captures:{1:{name:"storage.type.eltype.mata"},4:{name:"storage.type.orgtype.mata"}},match:"\\b(transmorphic|string|numeric|real|complex|(pointer(\\([^)]+\\))?))\\s+(matrix|vector|rowvector|colvector|scalar)\\b",name:"storage.type.mata"},{comment:"need to end with whitespace character here or last group doesn't match",match:"\\b(transmorphic|string|numeric|real|complex|(pointer(\\([^)]+\\))?))\\s",name:"storage.type.eltype.mata"},{match:"\\b(matrix|vector|rowvector|colvector|scalar)\\b",name:"storage.type.orgtype.mata"},{match:"!|\\+\\+|--|\\&|\\'|\\?|\\\\|::|\\,|\\.\\.|\\||=|==|>=|<=|<|>|!=|\\#|\\+|-|\\*|\\^|\\/",name:"keyword.operator.mata"},{include:"$self"}]},{begin:"\\b(odbc)\\b",beginCaptures:{0:{name:"keyword.control.flow.stata"}},end:"\\n",patterns:[{begin:"///",end:"\\n",name:"comment.block.stata"},{begin:'(exec?)(\\(")',beginCaptures:{1:{name:"support.function.builtin.stata"},2:{name:"punctuation.definition.parameters.begin.stata"}},end:'"\\)',endCaptures:{0:{name:"punctuation.definition.parameters.end.stata"}},patterns:[{include:"source.sql"}]},{include:"$self"}]},{include:"#commands-other"}],repository:{"ascii-regex-character-class":{patterns:[{match:"\\\\[\\*+?\\-\\.\\^$\\|\\[\\]()\\\\]",name:"constant.character.escape.backslash.stata"},{match:"\\.",name:"constant.character.character-class.stata"},{match:"\\\\.",name:"illegal.invalid.character-class.stata"},{begin:"(\\[)(\\^)?",beginCaptures:{1:{name:"punctuation.definition.character-class.stata"},2:{name:"keyword.operator.negation.stata"}},end:"(\\])",endCaptures:{1:{name:"punctuation.definition.character-class.stata"}},name:"constant.other.character-class.set.stata",patterns:[{include:"#ascii-regex-character-class"},{captures:{2:{name:"constant.character.escape.backslash.stata"},4:{name:"constant.character.escape.backslash.stata"}},match:"((\\\\.)|.)-((\\\\.)|[^\\]])",name:"constant.other.character-class.range.stata"}]}]},"ascii-regex-functions":{patterns:[{captures:{1:{name:"support.function.builtin.stata"},2:{name:"punctuation.definition.parameters.begin.stata"},3:{patterns:[{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#functions"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{include:"#comments-triple-slash"}]},4:{name:"punctuation.definition.variable.begin.stata"},5:{name:"punctuation.definition.string.begin.stata"},6:{patterns:[{include:"#ascii-regex-internals"}]},7:{name:"punctuation.definition.string.end.stata"},8:{name:"invalid.illegal.punctuation.stata"},9:{name:"punctuation.definition.parameters.end.stata"}},comment:'color regexm with regular quotes i.e. " ',match:'\\b(regexm)(\\()([^,]+)(,)\\s*(")([^"]+)("(\')?)\\s*(\\))'},{captures:{1:{name:"support.function.builtin.stata"},2:{name:"punctuation.definition.parameters.begin.stata"},3:{patterns:[{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#functions"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{include:"#comments-triple-slash"}]},4:{name:"punctuation.definition.variable.begin.stata"},5:{name:"punctuation.definition.string.begin.stata"},6:{patterns:[{include:"#ascii-regex-internals"}]},7:{name:"punctuation.definition.string.end.stata"},8:{name:"punctuation.definition.parameters.end.stata"}},comment:"color regexm with compound quotes",match:'\\b(regexm)(\\()([^,]+)(,)\\s*(`")([^"]+)("\')\\s*(\\))'},{captures:{1:{name:"support.function.builtin.stata"},2:{name:"punctuation.definition.parameters.begin.stata"},3:{patterns:[{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#functions"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{include:"#comments"}]},4:{name:"punctuation.definition.variable.begin.stata"},5:{name:"punctuation.definition.string.begin.stata"},6:{patterns:[{include:"#ascii-regex-internals"}]},7:{name:"punctuation.definition.string.end.stata"},8:{name:"invalid.illegal.punctuation.stata"},9:{patterns:[{match:",",name:"punctuation.definition.variable.begin.stata"},{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#functions"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{include:"#comments-triple-slash"}]},10:{name:"punctuation.definition.parameters.end.stata"}},comment:'color regexr with regular quotes i.e. " ',match:'\\b(regexr)(\\()([^,]+)(,)\\s*(")([^"]+)("(\')?)\\s*([^)]*)(\\))'},{captures:{1:{name:"support.function.builtin.stata"},2:{name:"punctuation.definition.parameters.begin.stata"},3:{patterns:[{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#functions"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{include:"#comments"}]},4:{name:"punctuation.definition.variable.begin.stata"},5:{name:"punctuation.definition.string.begin.stata"},6:{patterns:[{include:"#ascii-regex-internals"}]},7:{name:"punctuation.definition.string.end.stata"},8:{patterns:[{match:",",name:"punctuation.definition.variable.begin.stata"},{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#functions"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{include:"#comments-triple-slash"}]},9:{name:"punctuation.definition.parameters.end.stata"}},comment:'color regexr with compound quotes i.e. `"text"\' ',match:'\\b(regexr)(\\()([^,]+)(,)\\s*(`")([^"]+)("\')\\s*([^)]*)(\\))'}]},"ascii-regex-internals":{patterns:[{match:"\\^",name:"keyword.control.anchor.stata"},{comment:"matched when not a global, but must be ascii",match:"\\$(?![a-zA-Z_{])",name:"keyword.control.anchor.stata"},{match:"[?+\\*]",name:"keyword.control.quantifier.stata"},{match:"\\|",name:"keyword.control.or.stata"},{begin:"(\\()(?=\\?|\\*|\\+)",beginCaptures:{1:{name:"keyword.operator.group.stata"}},contentName:"invalid.illegal.regexm.stata",end:"\\)",endCaptures:{0:{name:"keyword.operator.group.stata"}}},{begin:"(\\()",beginCaptures:{1:{name:"keyword.operator.group.stata"}},end:"(\\))",endCaptures:{1:{name:"keyword.operator.group.stata"}},patterns:[{include:"#ascii-regex-internals"}]},{include:"#ascii-regex-character-class"},{include:"#macro-local"},{include:"#macro-global"},{comment:"NOTE: Error if I have .+ No idea why but it works fine it seems with just .",match:".",name:"string.quoted.stata"}]},"braces-with-error":{patterns:[{begin:"(\\{)\\s*([^\\n]*)(?=\\n)",beginCaptures:{1:{name:"keyword.control.block.begin.stata"},2:{patterns:[{include:"#comments"},{match:"[^\\n]+",name:"illegal.invalid.name.stata"}]}},comment:"correct with nothing else on the line but whitespace; before and after; before; after; correct",end:'^\\s*(\\})\\s*$|^\\s*([^\\*"}]+)\\s+(\\})\\s*([^\\*"}/\\n]+)|^\\s*([^"\\*}]+)\\s+(\\})|\\s*(\\})\\s*([^"\\*}/\\n]+)|(\\})$',endCaptures:{1:{name:"keyword.control.block.end.stata"},2:{name:"invalid.illegal.name.stata"},3:{name:"keyword.control.block.end.stata"},4:{name:"invalid.illegal.name.stata"},5:{name:"invalid.illegal.name.stata"},6:{name:"keyword.control.block.end.stata"},7:{name:"keyword.control.block.end.stata"},8:{name:"invalid.illegal.name.stata"},9:{name:"keyword.control.block.end.stata"}},patterns:[{include:"$self"}]}]},"braces-without-error":{patterns:[{begin:"\\{",beginCaptures:{0:{name:"keyword.control.block.begin.stata"}},end:"\\}",endCaptures:{0:{name:"keyword.control.block.end.stata"}}}]},builtin_types:{patterns:[{match:"\\b(byte|int|long|float|double|str[1-9]?\\d?\\d?\\d?|strL)\\b",name:"support.type.stata"}]},builtin_variables:{patterns:[{match:"\\b(_b|_coef|_cons|_n|_N|_rc|_se)\\b",name:"variable.object.stata"}]},"commands-other":{patterns:[{comment:"Add on commands",match:"\\b(reghdfe|ivreghdfe|ivreg2|outreg|gcollapse|gcontract|gegen|gisid|glevelsof|gquantiles)\\b",name:"keyword.control.flow.stata"},{comment:"Built in commands",match:"\\b(about|ac|acprplot|ado|adopath|adoupdate|alpha|ameans|an|ano|anov|anova|anova_terms|anovadef|aorder|ap|app|appe|appen|append|arch|arch_dr|arch_estat|arch_p|archlm|areg|areg_p|args|arima|arima_dr|arima_estat|arima_p|asmprobit|asmprobit_estat|asmprobit_lf|asmprobit_mfx__dlg|asmprobit_p|avplot|avplots|bcskew0|bgodfrey|binreg|bip0_lf|biplot|bipp_lf|bipr_lf|bipr_p|biprobit|bitest|bitesti|bitowt|blogit|bmemsize|boot|bootsamp|boxco_l|boxco_p|boxcox|boxcox_p|bprobit|br|break|brier|bro|brow|brows|browse|brr|brrstat|bs|bsampl_w|bsample|bsqreg|bstat|bstrap|ca|ca_estat|ca_p|cabiplot|camat|canon|canon_estat|canon_p|caprojection|cat|cc|cchart|cci|cd|censobs_table|centile|cf|char|chdir|checkdlgfiles|checkestimationsample|checkhlpfiles|checksum|chelp|ci|cii|cl|class|classutil|clear|cli|clis|clist|clog|clog_lf|clog_p|clogi|clogi_sw|clogit|clogit_lf|clogit_p|clogitp|clogl_sw|cloglog|clonevar|clslistarray|cluster|cluster_measures|cluster_stop|cluster_tree|cluster_tree_8|clustermat|cmdlog|cnr|cnre|cnreg|cnreg_p|cnreg_sw|cnsreg|codebook|collaps4|collapse|colormult_nb|colormult_nw|compare|compress|conf|confi|confir|confirm|conren|cons|const|constr|constra|constrai|constrain|constraint|contract|copy|copyright|copysource|cor|corc|corr|corr2data|corr_anti|corr_kmo|corr_smc|corre|correl|correla|correlat|correlate|corrgram|cou|coun|count|cprplot|crc|cret|cretu|cretur|creturn|cross|cs|cscript|cscript_log|csi|ct|ct_is|ctset|ctst_st|cttost|cumsp|cumul|cusum|cutil|d|datasig|datasign|datasigna|datasignat|datasignatu|datasignatur|datasignature|datetof|db|dbeta|de|dec|deco|decod|decode|deff|des|desc|descr|descri|describ|describe|dfbeta|dfgls|dfuller|di|di_g|dir|dirstats|dis|discard|disp|disp_res|disp_s|displ|displa|display|do|doe|doed|doedi|doedit|dotplot|dprobit|drawnorm|ds|ds_util|dstdize|duplicates|durbina|dwstat|dydx|ed|edi|edit|eivreg|emdef|en|enc|enco|encod|encode|eq|erase|ereg|ereg_lf|ereg_p|ereg_sw|ereghet|ereghet_glf|ereghet_glf_sh|ereghet_gp|ereghet_ilf|ereghet_ilf_sh|ereghet_ip|eret|eretu|eretur|ereturn|err|erro|error|est|est_cfexist|est_cfname|est_clickable|est_expand|est_hold|est_table|est_unhold|est_unholdok|estat|estat_default|estat_summ|estat_vce_only|esti|estimates|etodow|etof|etomdy|expand|expandcl|fac|fact|facto|factor|factor_estat|factor_p|factor_pca_rotated|factor_rotate|factormat|fcast|fcast_compute|fcast_graph|fdades|fdadesc|fdadescr|fdadescri|fdadescrib|fdadescribe|fdasav|fdasave|fdause|fh_st|file|filefilter|fillin|find_hlp_file|findfile|findit|fit|fl|fli|flis|flist|fpredict|frac_adj|frac_chk|frac_cox|frac_ddp|frac_dis|frac_dv|frac_in|frac_mun|frac_pp|frac_pq|frac_pv|frac_wgt|frac_xo|fracgen|fracplot|fracpoly|fracpred|fron_ex|fron_hn|fron_p|fron_tn|fron_tn2|frontier|ftodate|ftoe|ftomdy|ftowdate|gamhet_glf|gamhet_gp|gamhet_ilf|gamhet_ip|gamma|gamma_d2|gamma_p|gamma_sw|gammahet|gdi_hexagon|gdi_spokes|genrank|genstd|genvmean|gettoken|gladder|glim_l01|glim_l02|glim_l03|glim_l04|glim_l05|glim_l06|glim_l07|glim_l08|glim_l09|glim_l10|glim_l11|glim_l12|glim_lf|glim_mu|glim_nw1|glim_nw2|glim_nw3|glim_p|glim_v1|glim_v2|glim_v3|glim_v4|glim_v5|glim_v6|glim_v7|glm|glm_p|glm_sw|glmpred|glogit|glogit_p|gmeans|gnbre_lf|gnbreg|gnbreg_p|gomp_lf|gompe_sw|gomper_p|gompertz|gompertzhet|gomphet_glf|gomphet_glf_sh|gomphet_gp|gomphet_ilf|gomphet_ilf_sh|gomphet_ip|gphdot|gphpen|gphprint|gprefs|gprobi_p|gprobit|gr|gr7|gr_copy|gr_current|gr_db|gr_describe|gr_dir|gr_draw|gr_draw_replay|gr_drop|gr_edit|gr_editviewopts|gr_example|gr_example2|gr_export|gr_print|gr_qscheme|gr_query|gr_read|gr_rename|gr_replay|gr_save|gr_set|gr_setscheme|gr_table|gr_undo|gr_use|graph|grebar|greigen|grmeanby|gs_fileinfo|gs_filetype|gs_graphinfo|gs_stat|gsort|gwood|h|hareg|hausman|haver|he|heck_d2|heckma_p|heckman|heckp_lf|heckpr_p|heckprob|hel|help|hereg|hetpr_lf|hetpr_p|hetprob|hettest|hexdump|hilite|hist|histogram|hlogit|hlu|hmeans|hotel|hotelling|hprobit|hreg|hsearch|icd9|icd9_ff|icd9p|iis|impute|imtest|inbase|include|inf|infi|infil|infile|infix|inp|inpu|input|ins|insheet|insp|inspe|inspec|inspect|integ|inten|intreg|intreg_p|intrg2_ll|intrg_ll|intrg_ll2|ipolate|iqreg|ir|irf|irf_create|irfm|iri|is_svy|is_svysum|isid|istdize|ivprobit|ivprobit_p|ivreg|ivreg_footnote|ivtob_lf|ivtobit|ivtobit_p|jacknife|jknife|jkstat|joinby|kalarma1|kap|kapmeier|kappa|kapwgt|kdensity|ksm|ksmirnov|ktau|kwallis|labelbook|ladder|levelsof|leverage|lfit|lfit_p|li|lincom|line|linktest|lis|list|lloghet_glf|lloghet_glf_sh|lloghet_gp|lloghet_ilf|lloghet_ilf_sh|lloghet_ip|llogi_sw|llogis_p|llogist|llogistic|llogistichet|lnorm_lf|lnorm_sw|lnorma_p|lnormal|lnormalhet|lnormhet_glf|lnormhet_glf_sh|lnormhet_gp|lnormhet_ilf|lnormhet_ilf_sh|lnormhet_ip|lnskew0|loadingplot|(?<!\\.)log|logi|logis_lf|logistic|logistic_p|logit|logit_estat|logit_p|loglogs|logrank|loneway|lookfor|lookup|lowess|lpredict|lrecomp|lroc|lrtest|ls|lsens|lsens_x|lstat|ltable|ltriang|lv|lvr2plot|m|ma|mac|macr|macro|makecns|man|manova|manovatest|mantel|mark|markin|markout|marksample|mat|mat_capp|mat_order|mat_put_rr|mat_rapp|mata|mata_clear|mata_describe|mata_drop|mata_matdescribe|mata_matsave|mata_matuse|mata_memory|mata_mlib|mata_mosave|mata_rename|mata_which|matalabel|matcproc|matlist|matname|matr|matri|matrix|matrix_input__dlg|matstrik|mcc|mcci|md0_|md1_|md1debug_|md2_|md2debug_|mds|mds_estat|mds_p|mdsconfig|mdslong|mdsmat|mdsshepard|mdytoe|mdytof|me_derd|mean|means|median|memory|memsize|mfp|mfx|mhelp|mhodds|minbound|mixed_ll|mixed_ll_reparm|mkassert|mkdir|mkmat|mkspline|ml|ml_adjs|ml_bhhhs|ml_c_d|ml_check|ml_clear|ml_cnt|ml_debug|ml_defd|ml_e0|ml_e0_bfgs|ml_e0_cycle|ml_e0_dfp|ml_e0i|ml_e1|ml_e1_bfgs|ml_e1_bhhh|ml_e1_cycle|ml_e1_dfp|ml_e2|ml_e2_cycle|ml_ebfg0|ml_ebfr0|ml_ebfr1|ml_ebh0q|ml_ebhh0|ml_ebhr0|ml_ebr0i|ml_ecr0i|ml_edfp0|ml_edfr0|ml_edfr1|ml_edr0i|ml_eds|ml_eer0i|ml_egr0i|ml_elf|ml_elf_bfgs|ml_elf_bhhh|ml_elf_cycle|ml_elf_dfp|ml_elfi|ml_elfs|ml_enr0i|ml_enrr0|ml_erdu0|ml_erdu0_bfgs|ml_erdu0_bhhh|ml_erdu0_bhhhq|ml_erdu0_cycle|ml_erdu0_dfp|ml_erdu0_nrbfgs|ml_exde|ml_footnote|ml_geqnr|ml_grad0|ml_graph|ml_hbhhh|ml_hd0|ml_hold|ml_init|ml_inv|ml_log|ml_max|ml_mlout|ml_mlout_8|ml_model|ml_nb0|ml_opt|ml_p|ml_plot|ml_query|ml_rdgrd|ml_repor|ml_s_e|ml_score|ml_searc|ml_technique|ml_unhold|mleval|mlf_|mlmatbysum|mlmatsum|mlog|mlogi|mlogit|mlogit_footnote|mlogit_p|mlopts|mlsum|mlvecsum|mnl0_|mor|more|mov|move|mprobit|mprobit_lf|mprobit_p|mrdu0_|mrdu1_|mvdecode|mvencode|mvreg|mvreg_estat|nbreg|nbreg_al|nbreg_lf|nbreg_p|nbreg_sw|nestreg|net|newey|newey_p|news|nl|nlcom|nlcom_p|nlexp2|nlexp2a|nlexp3|nlgom3|nlgom4|nlinit|nllog3|nllog4|nlog_rd|nlogit|nlogit_p|nlogitgen|nlogittree|nlpred|nobreak|notes_dlg|nptrend|numlabel|numlist|old_ver|olo|olog|ologi|ologi_sw|ologit|ologit_p|ologitp|on|one|onew|onewa|oneway|op_colnm|op_comp|op_diff|op_inv|op_str|opr|opro|oprob|oprob_sw|oprobi|oprobi_p|oprobit|oprobitp|opts_exclusive|order|orthog|orthpoly|ou|out|outf|outfi|outfil|outfile|outs|outsh|outshe|outshee|outsheet|ovtest|pac|palette|parse_dissim|pause|pca|pca_display|pca_estat|pca_p|pca_rotate|pcamat|pchart|pchi|pcorr|pctile|pentium|pergram|personal|peto_st|pkcollapse|pkcross|pkequiv|pkexamine|pkshape|pksumm|plugin|pnorm|poisgof|poiss_lf|poiss_sw|poisso_p|poisson|poisson_estat|post|postclose|postfile|postutil|pperron|prais|prais_e|prais_e2|prais_p|predict|predictnl|preserve|print|prob|probi|probit|probit_estat|probit_p|proc_time|procoverlay|procrustes|procrustes_estat|procrustes_p|profiler|prop|proportion|prtest|prtesti|pwcorr|pwd|qs|qby|qbys|qchi|qladder|qnorm|qqplot|qreg|qreg_c|qreg_p|qreg_sw|qu|quadchk|quantile|que|quer|query|range|ranksum|ratio|rchart|rcof|recast|recode|reg|reg3|reg3_p|regdw|regr|regre|regre_p2|regres|regres_p|regress|regress_estat|regriv_p|remap|ren|rena|renam|rename|renpfix|repeat|reshape|restore|ret|retu|retur|return|rmdir|robvar|roccomp|rocf_lf|rocfit|rocgold|rocplot|roctab|rologit|rologit_p|rot|rota|rotat|rotate|rotatemat|rreg|rreg_p|ru|run|runtest|rvfplot|rvpplot|safesum|sample|sampsi|savedresults|sc|scatter|scm_mine|sco|scob_lf|scob_p|scobi_sw|scobit|scor|score|scoreplot|scoreplot_help|scree|screeplot|screeplot_help|sdtest|sdtesti|se|search|separate|seperate|serrbar|serset|set|set_defaults|sfrancia|sh|she|shel|shell|shewhart|signestimationsample|signrank|signtest|simul|sktest|sleep|slogit|slogit_d2|slogit_p|smooth|snapspan|so|sor|sort|spearman|spikeplot|spikeplt|spline_x|split|sqreg|sqreg_p|sret|sretu|sretur|sreturn|ssc|st|st_ct|st_hc|st_hcd|st_hcd_sh|st_is|st_issys|st_note|st_promo|st_set|st_show|st_smpl|st_subid|stack|stbase|stci|stcox|stcox_estat|stcox_fr|stcox_fr_ll|stcox_p|stcox_sw|stcoxkm|stcstat|stcurv|stcurve|stdes|stem|stepwise|stfill|stgen|stir|stjoin|stmc|stmh|stphplot|stphtest|stptime|strate|streg|streg_sw|streset|sts|stset|stsplit|stsum|sttocc|sttoct|stvary|su|suest|sum|summ|summa|summar|summari|summariz|summarize|sunflower|sureg|survcurv|survsum|svar|svar_p|svmat|svy_disp|svy_dreg|svy_est|svy_est_7|svy_estat|svy_get|svy_gnbreg_p|svy_head|svy_header|svy_heckman_p|svy_heckprob_p|svy_intreg_p|svy_ivreg_p|svy_logistic_p|svy_logit_p|svy_mlogit_p|svy_nbreg_p|svy_ologit_p|svy_oprobit_p|svy_poisson_p|svy_probit_p|svy_regress_p|svy_sub|svy_sub_7|svy_x|svy_x_7|svy_x_p|svydes|svygen|svygnbreg|svyheckman|svyheckprob|svyintreg|svyintrg|svyivreg|svylc|svylog_p|svylogit|svymarkout|svymean|svymlog|svymlogit|svynbreg|svyolog|svyologit|svyoprob|svyoprobit|svyopts|svypois|svypoisson|svyprobit|svyprobt|svyprop|svyratio|svyreg|svyreg_p|svyregress|svyset|svytab|svytest|svytotal|sw|swilk|symmetry|symmi|symplot|sysdescribe|sysdir|sysuse|szroeter|ta|tab|tab1|tab2|tab_or|tabd|tabdi|tabdis|tabdisp|tabi|table|tabodds|tabstat|tabu|tabul|tabula|tabulat|tabulate|te|tes|test|testnl|testparm|teststd|tetrachoric|time_it|timer|tis|tob|tobi|tobit|tobit_p|tobit_sw|token|tokeni|tokeniz|tokenize|total|translate|translator|transmap|treat_ll|treatr_p|treatreg|trim|trnb_cons|trnb_mean|trpoiss_d2|trunc_ll|truncr_p|truncreg|tsappend|tset|tsfill|tsline|tsline_ex|tsreport|tsrevar|tsrline|tsset|tssmooth|tsunab|ttest|ttesti|tut_chk|tut_wait|tutorial|tw|tware_st|two|twoway|twoway__fpfit_serset|twoway__function_gen|twoway__histogram_gen|twoway__ipoint_serset|twoway__ipoints_serset|twoway__kdensity_gen|twoway__lfit_serset|twoway__normgen_gen|twoway__pci_serset|twoway__qfit_serset|twoway__scatteri_serset|twoway__sunflower_gen|twoway_ksm_serset|ty|typ|type|typeof|unab|unabbrev|unabcmd|update|uselabel|var|var_mkcompanion|var_p|varbasic|varfcast|vargranger|varirf|varirf_add|varirf_cgraph|varirf_create|varirf_ctable|varirf_describe|varirf_dir|varirf_drop|varirf_erase|varirf_graph|varirf_ograph|varirf_rename|varirf_set|varirf_table|varlmar|varnorm|varsoc|varstable|varstable_w|varstable_w2|varwle|vec|vec_fevd|vec_mkphi|vec_p|vec_p_w|vecirf_create|veclmar|veclmar_w|vecnorm|vecnorm_w|vecrank|vecstable|verinst|vers|versi|versio|version|view|viewsource|vif|vwls|wdatetof|webdescribe|webseek|webuse|wh|whelp|whi|which|wilc_st|wilcoxon|win|wind|windo|window|winexec|wntestb|wntestq|xchart|xcorr|xi|xmlsav|xmlsave|xmluse|xpose|xsh|xshe|xshel|xshell|xt_iis|xt_tis|xtab_p|xtabond|xtbin_p|xtclog|xtcloglog|xtcloglog_d2|xtcloglog_pa_p|xtcloglog_re_p|xtcnt_p|xtcorr|xtdata|xtdes|xtfront_p|xtfrontier|xtgee|xtgee_elink|xtgee_estat|xtgee_makeivar|xtgee_p|xtgee_plink|xtgls|xtgls_p|xthaus|xthausman|xtht_p|xthtaylor|xtile|xtint_p|xtintreg|xtintreg_d2|xtintreg_p|xtivreg|xtline|xtline_ex|xtlogit|xtlogit_d2|xtlogit_fe_p|xtlogit_pa_p|xtlogit_re_p|xtmixed|xtmixed_estat|xtmixed_p|xtnb_fe|xtnb_lf|xtnbreg|xtnbreg_pa_p|xtnbreg_refe_p|xtpcse|xtpcse_p|xtpois|xtpoisson|xtpoisson_d2|xtpoisson_pa_p|xtpoisson_refe_p|xtpred|xtprobit|xtprobit_d2|xtprobit_re_p|xtps_fe|xtps_lf|xtps_ren|xtps_ren_8|xtrar_p|xtrc|xtrc_p|xtrchh|xtrefe_p|yx|yxview__barlike_draw|yxview_area_draw|yxview_bar_draw|yxview_dot_draw|yxview_dropline_draw|yxview_function_draw|yxview_iarrow_draw|yxview_ilabels_draw|yxview_normal_draw|yxview_pcarrow_draw|yxview_pcbarrow_draw|yxview_pccapsym_draw|yxview_pcscatter_draw|yxview_pcspike_draw|yxview_rarea_draw|yxview_rbar_draw|yxview_rbarm_draw|yxview_rcap_draw|yxview_rcapsym_draw|yxview_rconnected_draw|yxview_rline_draw|yxview_rscatter_draw|yxview_rspike_draw|yxview_spike_draw|yxview_sunflower_draw|zap_s|zinb|zinb_llf|zinb_plf|zip|zip_llf|zip_p|zip_plf|zt_ct_5|zt_hc_5|zt_hcd_5|zt_is_5|zt_iss_5|zt_sho_5|zt_smp_5|ztnb|ztnb_p|ztp|ztp_p|prtab|prchange|eststo|estout|esttab|estadd|estpost|ivregress|xtreg|xtreg_be|xtreg_fe|xtreg_ml|xtreg_pa_p|xtreg_re|xtregar|xtrere_p|xtset|xtsf_ll|xtsf_llti|xtsum|xttab|xttest0|xttobit|xttobit_p|xttrans)\\b",name:"keyword.control.flow.stata"}]},comments:{patterns:[{include:"#comments-double-slash"},{include:"#comments-star"},{include:"#comments-block"},{include:"#comments-triple-slash"}]},"comments-block":{patterns:[{begin:"/\\*",beginCaptures:{0:{name:"punctuation.definition.comment.begin.stata"}},end:"(\\*/\\s+\\*[^\\n]*)|(\\*/(?!\\*))",endCaptures:{0:{name:"punctuation.definition.comment.end.stata"}},name:"comment.block.stata",patterns:[{comment:"this ends and restarts a comment block. but need to catch this so that it doesn't start _another_ level of comment blocks",match:"\\*/\\*"},{include:"#docblockr-comment"},{include:"#comments-block"},{include:"#docstring"}]}]},"comments-double-slash":{patterns:[{begin:"(^//|(?<=\\s)//)(?!/)",captures:{0:{name:"punctuation.definition.comment.stata"}},end:"(?=\\n)",name:"comment.line.double-slash.stata",patterns:[{include:"#docblockr-comment"}]}]},"comments-star":{patterns:[{begin:"^\\s*(\\*)",captures:{0:{name:"punctuation.definition.comment.stata"}},comment:"TODO! need to except out the occasion that a * comes after a /// on the previous line. May be easiest to join with the comment.line.triple-slash.stata below",end:"(?=\\n)",name:"comment.line.star.stata",patterns:[{include:"#docblockr-comment"},{begin:"///",end:"\\n",name:"comment.line-continuation.stata"},{include:"#comments"}]}]},"comments-triple-slash":{patterns:[{begin:"(^///|(?<=\\s)///)",captures:{0:{name:"punctuation.definition.comment.stata"}},end:"(?=\\n)",name:"comment.line.triple-slash.stata",patterns:[{include:"#docblockr-comment"}]}]},constants:{patterns:[{include:"#factorvariables"},{match:"\\b(?i:(\\d+\\.\\d*(e[\\-+]?\\d+)?))(?=[^a-zA-Z_])",name:"constant.numeric.float.stata"},{match:"(?<=[^0-9a-zA-Z_])(?i:(\\.\\d+(e[\\-+]?\\d+)?))",name:"constant.numeric.float.stata"},{match:"\\b(?i:(\\d+e[\\-+]?\\d+))",name:"constant.numeric.float.stata"},{match:"\\b(\\d+)\\b",name:"constant.numeric.integer.decimal.stata"},{match:"(?<![\\w])(\\.(?![\\./]))(?![\\w])",name:"constant.language.missing.stata"},{match:"\\b_all\\b",name:"constant.language.allvars.stata"}]},"docblockr-comment":{patterns:[{captures:{1:{name:"invalid.illegal.name.stata"}},match:"(?<!\\w)(@(error|ERROR|Error))\\b"},{captures:{1:{name:"keyword.docblockr.stata"}},match:"(?<!\\w)(@\\w+)\\b"}]},docstring:{patterns:[{begin:"'''",beginCaptures:{0:{name:"punctuation.definition.string.begin.stata"}},end:"'''",endCaptures:{0:{name:"punctuation.definition.string.begin.stata"}},name:"string.quoted.docstring.stata"},{begin:'"""',beginCaptures:{0:{name:"punctuation.definition.string.begin.stata"}},end:'"""',endCaptures:{0:{name:"punctuation.definition.string.begin.stata"}},name:"string.quoted.docstring.stata"}]},factorvariables:{patterns:[{match:"\\b(i|c|o)\\.(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])",name:"constant.language.factorvars.stata"},{captures:{0:{name:"constant.language.factorvars.stata"},3:{patterns:[{include:"#constants"}]}},match:"\\b(i?b)((\\d+)|n)\\.(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])"},{captures:{0:{name:"constant.language.factorvars.stata"},2:{name:"keyword.operator.parentheses.stata"},3:{patterns:[{include:"#constants"},{include:"#operators"}]},4:{name:"keyword.operator.parentheses.stata"}},match:"\\b(i?b)(\\()(#\\d+|first|last|freq)(\\))\\.(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])"},{captures:{0:{name:"constant.language.factorvars.stata"},2:{patterns:[{include:"#constants"}]}},match:"\\b(i?o?)(\\d+)\\.(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])"},{captures:{1:{name:"constant.language.factorvars.stata"},2:{name:"keyword.operator.parentheses.stata"},3:{patterns:[{include:"$self"}]},4:{name:"keyword.operator.parentheses.stata"},5:{name:"constant.language.factorvars.stata"}},match:"\\b(i?o?)(\\()(.*?)(\\))(\\.)(?=[\\w&&[^0-9]]|\\([\\w&&[^0-9]])"}]},functions:{patterns:[{begin:"\\b((abbrev|abs|acos|acosh|asin|asinh|atan|atan2|atanh|autocode|betaden|binomial|binomialp|binomialtail|binormalbofd|byteorder|c|cauchy|cauchyden|cauchytail|Cdhms|ceil|char|chi2|chi2den|chi2tail|Chms|cholesky|chop|clip|clock|Clock|cloglog|Cmdyhms|cofC|Cofc|cofd|Cofd|coleqnumb|collatorlocale|collatorversion|colnfreeparms|colnumb|colsof|comb|cond|corr|cos|cosh|daily|date|day|det|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|dhms|diag|diag0cnt|digamma|dofb|dofc|dofC|dofh|dofm|dofq|dofw|dofy|dow|doy|dunnettprob|e|el|epsdouble|epsfloat|exp|exponential|exponentialden|exponentialtail|F|Fden|fileexists|fileread|filereaderror|filewrite|float|floor|fmtwidth|Ftail|gammaden|gammap|gammaptail|get|hadamard|halfyear|halfyearly|hh|hhC|hms|hofd|hours|hypergeometric|hypergeometricp|I|ibeta|ibetatail|igaussian|igaussianden|igaussiantail|indexnot|inlist|inrange|int|inv|invbinomial|invbinomialtail|invcauchy|invcauchytail|invchi2|invchi2tail|invcloglog|invdunnettprob|invexponential|invexponentialtail|invF|invFtail|invgammap|invgammaptail|invibeta|invibetatail|invigaussian|invigaussiantail|invlaplace|invlaplacetail|invlogistic|invlogistictail|invlogit|invnbinomial|invnbinomialtail|invnchi2|invnchi2tail|invnF|invnFtail|invnibeta|invnormal|invnt|invnttail|invpoisson|invpoissontail|invsym|invt|invttail|invtukeyprob|invweibull|invweibullph|invweibullphtail|invweibulltail|irecode|issymmetric|itrim|J|laplace|laplaceden|laplacetail|length|ln|lncauchyden|lnfactorial|lngamma|lnigammaden|lnigaussianden|lniwishartden|lnlaplaceden|lnmvnormalden|lnnormal|lnnormalden|lnwishartden|log|log10|logistic|logisticden|logistictail|logit|lower|ltrim|matmissing|matrix|matuniform|max|maxbyte|maxdouble|maxfloat|maxint|maxlong|mdy|mdyhms|mi|min|minbyte|mindouble|minfloat|minint|minlong|minutes|missing|mm|mmC|mod|mofd|month|monthly|mreldif|msofhours|msofminutes|msofseconds|nbetaden|nbinomial|nbinomialp|nbinomialtail|nchi2|nchi2den|nchi2tail|nF|nFden|nFtail|nibeta|normal|normalden|npnchi2|npnF|npnt|nt|ntden|nttail|nullmat|plural|poisson|poissonp|poissontail|proper|qofd|quarter|quarterly|r|rbeta|rbinomial|rcauchy|rchi2|real|recode|regexs|reldif|replay|return|reverse|rexponential|rgamma|rhypergeometric|rigaussian|rlaplace|rlogistic|rnbinomial|rnormal|round|roweqnumb|rownfreeparms|rownumb|rowsof|rpoisson|rt|rtrim|runiform|runiformint|rweibull|rweibullph|s|scalar|seconds|sign|sin|sinh|smallestdouble|soundex|sqrt|ss|ssC|string|stritrim|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrpos|strrtrim|strtoname|strtrim|strupper|subinstr|subinword|substr|sum|sweep|t|tan|tanh|tc|tC|td|tden|th|tin|tm|tobytes|tq|trace|trigamma|trim|trunc|ttail|tukeyprob|tw|twithin|uchar|udstrlen|udsubstr|uisdigit|uisletter|upper|ustrcompare|ustrcompareex|ustrfix|ustrfrom|ustrinvalidcnt|ustrleft|ustrlen|ustrlower|ustrltrim|ustrnormalize|ustrpos|ustrregexs|ustrreverse|ustrright|ustrrpos|ustrrtrim|ustrsortkey|ustrsortkeyex|ustrtitle|ustrto|ustrtohex|ustrtoname|ustrtrim|ustrunescape|ustrupper|ustrword|ustrwordcount|usubinstr|usubstr|vec|vecdiag|week|weekly|weibull|weibullden|weibullph|weibullphden|weibullphtail|weibulltail|wofd|word|wordbreaklocale|wordcount|year|yearly|yh|ym|yofd|yq|yw)|([\\w&&[^0-9]]\\w{0,31}))(\\()",beginCaptures:{2:{name:"support.function.builtin.stata"},3:{name:"support.function.custom.stata"},4:{name:"punctuation.definition.parameters.begin.stata"}},end:"(\\))",endCaptures:{1:{name:"punctuation.definition.parameters.end.stata"}},patterns:[{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{begin:"\\(",beginCaptures:{0:{name:"keyword.operator.parentheses.stata"}},end:"\\)",endCaptures:{0:{name:"keyword.operator.parentheses.stata"}},patterns:[{include:"#ascii-regex-functions"},{include:"#unicode-regex-functions"},{include:"#functions"},{include:"#subscripts"},{include:"#constants"},{include:"#comments"},{include:"#operators"},{include:"#macro-local"},{include:"#macro-global"},{include:"#string-compound"},{include:"#string-regular"},{include:"#builtin_variables"},{include:"#macro-commands"},{include:"#braces-without-error"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"}]},{include:"#ascii-regex-functions"},{include:"#unicode-regex-functions"},{include:"#functions"},{include:"#subscripts"},{include:"#constants"},{include:"#comments"},{include:"#operators"},{include:"#macro-local"},{include:"#macro-global"},{include:"#string-compound"},{include:"#string-regular"},{include:"#builtin_variables"},{include:"#macro-commands"},{include:"#braces-without-error"}]}]},"macro-commands":{patterns:[{begin:"\\b(loc(al|a)?)\\s+([\\w'`$(){}]+)\\s*(?=:|=)",beginCaptures:{1:{name:"keyword.macro.stata"},3:{patterns:[{include:"#macro-local-identifiers"},{include:"#macro-local"},{include:"#macro-global"}]}},end:"\\n",patterns:[{begin:"=",beginCaptures:{0:{name:"keyword.operator.arithmetic.stata"}},end:"(?=\\n)",patterns:[{include:"$self"}]},{begin:":",beginCaptures:{0:{name:"keyword.operator.arithmetic.stata"}},end:"(?=\\n)",patterns:[{include:"#macro-extended-functions"}]}]},{begin:"\\b(gl(obal|oba|ob|o)?)\\s+(?=[\\w`$])",beginCaptures:{1:{name:"keyword.macro.stata"}},end:'(\\})|(?=\\"|\\s|\\n|/|,|=)',patterns:[{include:"#reserved-names"},{match:"[\\w&&[^0-9_]]\\w{0,31}",name:"entity.name.type.class.stata"},{include:"#macro-local"},{include:"#macro-global"}]},{begin:"\\b(loc(al|a)?)\\s+(\\+\\+|--)?(?=[\\w`$])",beginCaptures:{1:{name:"keyword.macro.stata"},3:{name:"keyword.operator.arithmetic.stata"}},end:'(?=\\"|\\s|\\n|/|,|=)',patterns:[{include:"#macro-local-identifiers"},{include:"#macro-local"},{include:"#macro-global"}]},{begin:"\\b(tempvar|tempname|tempfile)\\s*(?=\\s)",beginCaptures:{1:{name:"keyword.macro.stata"}},end:"\\n",patterns:[{begin:"///",end:"\\n",name:"comment.block.stata"},{include:"#macro-local-identifiers"},{include:"#macro-local"},{include:"#macro-global"}]},{begin:"\\b(ma(cro|cr|c)?)\\s+(drop|l(ist|is|i)?)\\s*(?=\\s)",beginCaptures:{0:{name:"keyword.macro.stata"}},end:"\\n",patterns:[{begin:"///",end:"\\n",name:"comment.block.stata"},{match:"\\*",name:"keyword.operator.arithmetic.stata"},{include:"#constants"},{include:"#macro-global"},{include:"#macro-local"},{include:"#comments"},{match:"\\w{1,31}",name:"entity.name.type.class.stata"}]}]},"macro-extended-functions":{patterns:[{match:"\\b(properties)\\b",name:"keyword.macro.extendedfcn.stata"},{match:"\\b(t(ype|yp|y)?|f(ormat|orma|orm|or|o)?|val(ue|u)?\\s+l(able|abl|ab|a)?|var(iable|iabl|iab|ia|i)?\\s+l(abel|abe|ab|a)?|data\\s+l(able|abl|ab|a)?|sort(edby|edb|ed|e)?|lab(el|e)?|maxlength|constraint|char)\\b",name:"keyword.macro.extendedfcn.stata"},{match:"\\b(permname)\\b",name:"keyword.macro.extendedfcn.stata"},{match:"\\b(adosubdir|dir|files?|dirs?|other|sysdir)\\b",name:"keyword.macro.extendedfcn.stata"},{match:"\\b(env(ironment|ironmen|ironme|ironm|iron|iro|ir|i)?)\\b",name:"keyword.macro.extendedfcn.stata"},{match:"\\b(all\\s+(globals|scalars|matrices)|((numeric|string)\\s+scalars))\\b",name:"keyword.macro.extendedfcn.stata"},{captures:{1:{name:"keyword.macro.extendedfcn.stata"},2:{name:"keyword.macro.extendedfcn.stata"},3:{name:"entity.name.type.class.stata"}},match:"\\b(list)\\s+(uniq|dups|sort|clean|retok(enize|eniz|eni|en|e)?|sizeof)\\s+(\\w{1,32})"},{captures:{1:{name:"keyword.macro.extendedfcn.stata"},2:{name:"entity.name.type.class.stata"},3:{name:"keyword.operator.list.stata"},4:{name:"entity.name.type.class.stata"}},match:"\\b(list)\\s+(\\w{1,32})\\s+(\\||&|-|===|==|in)\\s+(\\w{1,32})"},{captures:{1:{name:"keyword.macro.extendedfcn.stata"},2:{name:"punctuation.definition.string.begin.stata"},3:{name:"string.quoted.double.stata"},4:{name:"punctuation.definition.string.end.stata"},5:{name:"keyword.macro.extendedfcn.stata"},6:{name:"entity.name.type.class.stata"}},match:'\\b(list\\s+posof)\\s+(")(\\w+)(")\\s+(in)\\s+(\\w{1,32})'},{match:"\\b(rown(ames|ame|am|a)?|coln(ames|ame|am|a)?|rowf(ullnames|ullname|ullnam|ullna|ulln|ull|ul|u)?|colf(ullnames|ullname|ullnam|ullna|ulln|ull|ul|u)?|roweq?|coleq?|rownumb|colnumb|roweqnumb|coleqnumb|rownfreeparms|colnfreeparms|rownlfs|colnlfs|rowsof|colsof|rowvarlist|colvarlist|rowlfnames|collfnames)\\b",name:"keyword.macro.extendedfcn.stata"},{match:"\\b(tsnorm)\\b",name:"keyword.macro.extendedfcn.stata"},{captures:{1:{name:"keyword.macro.extendedfcn.stata"},7:{patterns:[{include:"#macro-local"},{include:"#macro-global"}]}},match:"\\b((copy|(ud|u)?strlen)\\s+(loc(al|a)?|gl(obal|oba|ob|o)?))\\s+([^']+)"},{captures:{1:{name:"keyword.macro.extendedfcn.stata"}},match:"\\b(word\\s+count)"},{captures:{1:{name:"keyword.macro.extendedfcn.stata"},2:{patterns:[{include:"#macro-local"},{include:"#constants"}]},3:{name:"keyword.macro.extendedfcn.stata"}},match:"(word|piece)\\s+([\\s`'\\w]+)\\s+(of)"},{begin:"\\b(subinstr\\s+(loc(al|a)?|gl(obal|oba|ob|o)?))\\s+(\\w{1,32})",beginCaptures:{1:{name:"keyword.macro.extendedfcn.stata"},5:{name:"entity.name.type.class.stata"}},end:"(?=//|\\n)",patterns:[{include:"#macro-local"},{include:"#macro-global"},{include:"#string-compound"},{include:"#string-regular"},{captures:{1:{name:"support.function.builtin.stata"},2:{name:"punctuation.definition.parameters.begin.stata"},3:{name:"keyword.macro.extendedfcn.stata"},4:{name:"entity.name.type.class.stata"},5:{name:"punctuation.definition.parameters.end.stata"}},match:"(count|coun|cou|co|c)(\\()(local|loca|loc|global|globa|glob|glo|gl)\\s+(\\w{1,32})(\\))"}]},{include:"#comments"},{include:"#macro-local"},{include:"#macro-global"},{include:"$self"}]},"macro-global":{patterns:[{begin:"(\\$)(\\{)",beginCaptures:{0:{name:"punctuation.definition.string.begin.stata"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.string.end.stata"}},patterns:[{include:"#macro-local"},{include:"#macro-global"},{include:"#comments-block"},{begin:"[^\\w]",end:"\\n|(?=})",name:"comment.line.stata"},{match:"\\w{1,32}",name:"entity.name.type.class.stata"}]},{begin:"\\$",beginCaptures:{0:{name:"punctuation.definition.string.begin.stata"}},end:"(?!\\w)",endCaptures:{1:{name:"punctuation.definition.string.end.stata"}},patterns:[{include:"#macro-local"},{include:"#macro-global"},{match:"[\\w&&[^0-9_]]\\w{0,31}|_\\w{1,31}",name:"entity.name.type.class.stata"}]}]},"macro-global-escaped":{patterns:[{begin:"(\\\\\\$)(\\\\\\{)?",beginCaptures:{0:{name:"punctuation.definition.string.begin.stata"}},end:'(\\\\\\})|(?=\\"|\\s|\\n|/|,)',endCaptures:{1:{name:"punctuation.definition.string.end.stata"}},patterns:[{include:"#macro-local"},{include:"#macro-global"},{match:"[\\w&&[^0-9_]]\\w{0,31}|_\\w{1,31}",name:"entity.name.type.class.stata"}]}]},"macro-local":{patterns:[{begin:"(`)(=)",beginCaptures:{1:{name:"punctuation.definition.string.begin.stata"},2:{name:"keyword.operator.comparison.stata"}},end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.stata"}},patterns:[{include:"$self"}]},{begin:"(`)(:)",beginCaptures:{1:{name:"punctuation.definition.string.begin.stata"},2:{name:"keyword.operator.comparison.stata"}},contentName:"meta.macro-extended-function.stata",end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.stata"}},patterns:[{include:"#macro-local"},{include:"#macro-extended-functions"},{include:"#constants"},{include:"#string-compound"},{include:"#string-regular"}]},{begin:"(`)(macval)(\\()",beginCaptures:{1:{name:"punctuation.definition.string.begin.stata"},2:{name:"support.function.builtin.stata"},3:{name:"punctuation.definition.parameters.begin.stata"}},contentName:"meta.macro-extended-function.stata",end:"(\\))(')",endCaptures:{1:{name:"punctuation.definition.parameters.begin.stata"},2:{name:"punctuation.definition.string.end.stata"}},patterns:[{include:"#macro-local"},{include:"#macro-global"},{match:"\\w{1,31}",name:"entity.name.type.class.stata"}]},{begin:'`(?!")',beginCaptures:{0:{name:"punctuation.definition.string.begin.stata"}},end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.stata"}},patterns:[{match:"\\+\\+|--",name:"keyword.operator.arithmetic.stata"},{include:"#macro-local"},{include:"#macro-global"},{include:"#comments-block"},{begin:"[^\\w]",end:"\\n|(?=')",name:"comment.line.stata"},{match:"\\w{1,31}",name:"entity.name.type.class.stata"}]}]},"macro-local-escaped":{patterns:[{begin:'\\\\`(?!")',beginCaptures:{0:{name:"punctuation.definition.string.begin.stata"}},comment:"appropriately color macros that have embedded escaped `,', and $ characters for lazy evaluation",end:"\\\\'|'",endCaptures:{0:{name:"punctuation.definition.string.end.stata"}},patterns:[{include:"#macro-local"},{include:"#macro-global"},{match:"\\w{1,31}",name:"entity.name.type.class.stata"}]}]},"macro-local-identifiers":{patterns:[{match:"[^\\w'`$()\\s]",name:"invalid.illegal.name.stata"},{match:"\\w{32,}",name:"invalid.illegal.name.stata"},{match:"\\w{1,31}",name:"entity.name.type.class.stata"}]},operators:{patterns:[{comment:"++ and -- must come first to support ligatures",match:"\\+\\+|--|\\+|-|\\*|\\^",name:"keyword.operator.arithmetic.stata"},{comment:"match division operator but not path separator",match:"(?<![\\w.&&[^0-9]])/(?![\\w.&&[^0-9]]|$)",name:"keyword.operator.arithmetic.stata"},{comment:"match division operator but not path separator",match:"(?<![\\w.&&[^0-9]])\\\\(?![\\w.&&[^0-9]]|$)",name:"keyword.operator.matrix.addrow.stata"},{match:"\\|\\|",name:"keyword.operator.graphcombine.stata"},{match:"\\&|\\|",name:"keyword.operator.logical.stata"},{match:"(?:<=|>=|:=|==|!=|~=|<|>|=|!!|!)",name:"keyword.operator.comparison.stata"},{match:"\\(|\\)",name:"keyword.operator.parentheses.stata"},{match:"(##|#)",name:"keyword.operator.factor-variables.stata"},{match:"%",name:"keyword.operator.format.stata"},{match:":",name:"punctuation.separator.key-value"},{match:"\\[",name:"punctuation.definition.parameters.begin.stata"},{match:"\\]",name:"punctuation.definition.parameters.end.stata"},{match:",",name:"punctuation.definition.variable.begin.stata"},{match:";",name:"keyword.operator.delimiter.stata"}]},"reserved-names":{patterns:[{match:"\\b(_all|_b|byte|_coef|_cons|double|float|if|in|int|long|_n|_N|_pi|_pred|_rc|_skip|str\\d+|strL|using|with)\\b",name:"invalid.illegal.name.stata"},{match:"[^\\w'`$()\\s]",name:"invalid.illegal.name.stata"},{match:"\\d[\\w]{31,}",name:"invalid.illegal.name.stata"},{match:"\\w{33,}",name:"invalid.illegal.name.stata"}]},"string-compound":{patterns:[{begin:'`"',beginCaptures:{0:{name:"punctuation.definition.string.begin.stata"}},end:"\"'|(?=\n)",endCaptures:{0:{name:"punctuation.definition.string.end.stata"}},name:"string.quoted.double.compound.stata",patterns:[{comment:'This must come before #string-regular and #string-compound to accurately color `"""\' in strings',match:'"',name:"string.quoted.double.compound.stata"},{comment:"see https://github.com/kylebarron/language-stata/issues/53",match:"```(?=[^']*\")",name:"meta.markdown.code.block.stata"},{include:"#string-regular"},{include:"#string-compound"},{include:"#macro-local-escaped"},{include:"#macro-global-escaped"},{include:"#macro-local"},{include:"#macro-global"}]}]},"string-regular":{patterns:[{begin:'(?<!`)"',beginCaptures:{0:{name:"punctuation.definition.string.begin.stata"}},end:"(\")(')?|(?=\n)",endCaptures:{1:{name:"punctuation.definition.string.end.stata"},2:{name:"invalid.illegal.punctuation.stata"}},name:"string.quoted.double.stata",patterns:[{comment:"see https://github.com/kylebarron/language-stata/issues/53",match:"```(?=[^']*\")",name:"meta.markdown.code.block.stata"},{include:"#macro-local-escaped"},{include:"#macro-global-escaped"},{include:"#macro-local"},{include:"#macro-global"}]}]},subscripts:{patterns:[{begin:"(?<=[\\w'])(\\[)",beginCaptures:{1:{name:"punctuation.definition.parameters.begin.stata"}},comment:"highlight expressions, like [_n], when using subscripts on a variable",end:"(\\])",endCaptures:{1:{name:"punctuation.definition.parameters.end.stata"}},name:"meta.subscripts.stata",patterns:[{include:"#macro-local"},{include:"#macro-global"},{include:"#builtin_variables"},{include:"#operators"},{include:"#constants"},{include:"#functions"}]}]},"unicode-regex-character-class":{patterns:[{match:"\\\\[wWsSdD]|\\.",name:"constant.character.character-class.stata"},{match:"\\\\.",name:"constant.character.escape.backslash.stata"},{begin:"(\\[)(\\^)?",beginCaptures:{1:{name:"punctuation.definition.character-class.stata"},2:{name:"keyword.operator.negation.stata"}},end:"(\\])",endCaptures:{1:{name:"punctuation.definition.character-class.stata"}},name:"constant.other.character-class.set.stata",patterns:[{include:"#unicode-regex-character-class"},{captures:{2:{name:"constant.character.escape.backslash.stata"},4:{name:"constant.character.escape.backslash.stata"}},match:"((\\\\.)|.)-((\\\\.)|[^\\]])",name:"constant.other.character-class.range.stata"}]}]},"unicode-regex-functions":{patterns:[{captures:{1:{name:"support.function.builtin.stata"},2:{name:"punctuation.definition.parameters.begin.stata"},3:{patterns:[{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#functions"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{include:"#comments-triple-slash"}]},4:{name:"punctuation.definition.variable.begin.stata"},5:{name:"punctuation.definition.string.begin.stata"},6:{patterns:[{include:"#unicode-regex-internals"}]},7:{name:"punctuation.definition.string.end.stata"},8:{name:"invalid.illegal.punctuation.stata"},9:{patterns:[{include:"#constants"},{match:",",name:"punctuation.definition.variable.begin.stata"}]},10:{name:"punctuation.definition.parameters.end.stata"}},comment:'color regexm with regular quotes i.e. " ',match:'\\b(ustrregexm)(\\()([^,]+)(,)\\s*(")([^"]+)("(\')?)([,0-9\\s]*)?\\s*(\\))'},{captures:{1:{name:"support.function.builtin.stata"},2:{name:"punctuation.definition.parameters.begin.stata"},3:{patterns:[{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#functions"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{include:"#comments-triple-slash"}]},4:{name:"punctuation.definition.variable.begin.stata"},5:{name:"punctuation.definition.string.begin.stata"},6:{patterns:[{include:"#unicode-regex-internals"}]},7:{name:"punctuation.definition.string.end.stata"},8:{patterns:[{include:"#constants"},{match:",",name:"punctuation.definition.variable.begin.stata"}]},9:{name:"punctuation.definition.parameters.end.stata"}},comment:"color regexm with compound quotes",match:'\\b(ustrregexm)(\\()([^,]+)(,)\\s*(`")([^"]+)("\')([,0-9\\s]*)?\\s*(\\))'},{captures:{1:{name:"support.function.builtin.stata"},2:{name:"punctuation.definition.parameters.begin.stata"},3:{patterns:[{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#functions"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{include:"#comments"}]},4:{name:"punctuation.definition.variable.begin.stata"},5:{name:"punctuation.definition.string.begin.stata"},6:{patterns:[{include:"#unicode-regex-internals"}]},7:{name:"punctuation.definition.string.end.stata"},8:{name:"invalid.illegal.punctuation.stata"},9:{patterns:[{match:",",name:"punctuation.definition.variable.begin.stata"},{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#functions"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{include:"#comments-triple-slash"},{include:"#constants"}]},10:{name:"punctuation.definition.parameters.end.stata"}},comment:'color regexr with regular quotes i.e. " ',match:'\\b(ustrregexrf|ustrregexra)(\\()([^,]+)(,)\\s*(")([^"]+)("(\')?)\\s*([^)]*)(\\))'},{captures:{1:{name:"support.function.builtin.stata"},2:{name:"punctuation.definition.parameters.begin.stata"},3:{patterns:[{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#functions"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{include:"#comments"}]},4:{name:"punctuation.definition.variable.begin.stata"},5:{name:"punctuation.definition.string.begin.stata"},6:{patterns:[{include:"#unicode-regex-internals"}]},7:{name:"punctuation.definition.string.end.stata"},8:{patterns:[{match:",",name:"punctuation.definition.variable.begin.stata"},{include:"#string-compound"},{include:"#string-regular"},{include:"#macro-local"},{include:"#macro-global"},{include:"#functions"},{match:"[\\w&&[^0-9]]\\w{0,31}",name:"variable.parameter.function.stata"},{include:"#comments-triple-slash"},{include:"#constants"}]},9:{name:"punctuation.definition.parameters.end.stata"}},comment:'color regexr with compound quotes i.e. `"text"\' ',match:'\\b(ustrregexrf|ustrregexra)(\\()([^,]+)(,)\\s*(`")([^"]+)("\')\\s*([^)]*)(\\))'}]},"unicode-regex-internals":{patterns:[{match:"\\\\[bBAZzG]|\\^",name:"keyword.control.anchor.stata"},{comment:"matched when not a global",match:"\\$(?![[\\w&&[^0-9_]][\\w]{0,31}|_[\\w]{1,31}\\{])",name:"keyword.control.anchor.stata"},{match:"\\\\[1-9]\\d?",name:"keyword.other.back-reference.stata"},{match:"[?+*][?+]?|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??",name:"keyword.operator.quantifier.stata"},{match:"\\|",name:"keyword.operator.or.stata"},{begin:"\\((?!\\?\\#|\\?=|\\?!|\\?<=|\\?<!)",end:"\\)",name:"keyword.operator.group.stata",patterns:[{include:"#unicode-regex-internals"}]},{begin:"\\(\\?\\#",end:"\\)",name:"comment.block.stata"},{comment:"We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.",match:"(?<=^|\\s)#\\s[[a-zA-Z0-9,. \\t?!-:][^\\x{00}-\\x{7F}]]*$",name:"comment.line.number-sign.stata"},{match:"\\(\\?[iLmsux]+\\)",name:"keyword.other.option-toggle.stata"},{begin:"(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",beginCaptures:{1:{name:"keyword.operator.group.stata"},2:{name:"punctuation.definition.group.assertion.stata"},3:{name:"keyword.assertion.look-ahead.stata"},4:{name:"keyword.assertion.negative-look-ahead.stata"},5:{name:"keyword.assertion.look-behind.stata"},6:{name:"keyword.assertion.negative-look-behind.stata"}},end:"(\\))",endCaptures:{1:{name:"keyword.operator.group.stata"}},name:"meta.group.assertion.stata",patterns:[{include:"#unicode-regex-internals"}]},{begin:"(\\()(\\?\\(([1-9]\\d?|[a-zA-Z_][a-zA-Z_0-9]*)\\))",beginCaptures:{1:{name:"punctuation.definition.group.stata"},2:{name:"punctuation.definition.group.assertion.conditional.stata"},3:{name:"entity.name.section.back-reference.stata"}},comment:"we can make this more sophisticated to match the | character that separates yes-pattern from no-pattern, but it's not really necessary.",end:"(\\))",name:"meta.group.assertion.conditional.stata",patterns:[{include:"#unicode-regex-internals"}]},{include:"#unicode-regex-character-class"},{include:"#macro-local"},{include:"#macro-global"},{comment:"NOTE: Error if I have .+ No idea why but it works fine it seems with just .",match:".",name:"string.quoted.stata"}]}},scopeName:"source.stata",embeddedLangs:["sql"]})];export{e as default};
@@ -1 +0,0 @@
1
- var 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\n in order to avoid ambiguities with operators, and to adhere to certain\n parsing rules in SE-0354/SE-0355, such as:\n - A regex literal will not be parsed if it contains an unbalanced ).\n - A regex may end with a space only if it began with an escaped space",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 '>'\n \"\\k'\" NamedOrNumberRef \"'\"\n '\\g<' NamedOrNumberRef '>'\n \"\\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"})];export{e as default};