@nuxtjs/sitemap 5.0.4 → 5.1.0

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 (244) hide show
  1. package/dist/client/200.html +221 -4
  2. package/dist/client/404.html +221 -4
  3. package/dist/client/_nuxt/{Icon.p55eWgl2.js → Icon.2LDJ9Qfn.js} +1 -1
  4. package/dist/client/_nuxt/Icon.EHea-7vr.css +1 -0
  5. package/dist/client/_nuxt/IconCSS.avVk0m4D.css +1 -0
  6. package/dist/client/_nuxt/IconCSS.gIpwoIfG.js +1 -0
  7. package/dist/client/_nuxt/abap.bJqzlTLD.js +816 -0
  8. package/dist/client/_nuxt/actionscript-3.NUzLYz6e.js +1 -0
  9. package/dist/client/_nuxt/ada.HSb8VHJ5.js +1 -0
  10. package/dist/client/_nuxt/andromeeda.TE0Toi4a.js +1 -0
  11. package/dist/client/_nuxt/angular-html.ulaXK71i.js +16 -0
  12. package/dist/client/_nuxt/angular-ts.CpB8xVpe.js +666 -0
  13. package/dist/client/_nuxt/apache.TpqIaH_y.js +1 -0
  14. package/dist/client/_nuxt/apex.rLr5RF8N.js +274 -0
  15. package/dist/client/_nuxt/apl.XB4V8Q_3.js +87 -0
  16. package/dist/client/_nuxt/applescript.uEUaUzem.js +38 -0
  17. package/dist/client/_nuxt/ara.yxVemEif.js +21 -0
  18. package/dist/client/_nuxt/asm.N3zWSyW8.js +1 -0
  19. package/dist/client/_nuxt/astro.5Up4Y-tq.js +1 -0
  20. package/dist/client/_nuxt/aurora-x.23vffHpO.js +1 -0
  21. package/dist/client/_nuxt/awk.tQAliBPt.js +1 -0
  22. package/dist/client/_nuxt/ayu-dark.09-XTo9D.js +1 -0
  23. package/dist/client/_nuxt/ballerina.j08zL6tL.js +62 -0
  24. package/dist/client/_nuxt/bat.4hprCtpO.js +1 -0
  25. package/dist/client/_nuxt/beancount.B4bgLeBI.js +1 -0
  26. package/dist/client/_nuxt/berry.99Qqo7Pl.js +1 -0
  27. package/dist/client/_nuxt/bibtex.PUS4KD1G.js +1 -0
  28. package/dist/client/_nuxt/bicep.U1vZFTkg.js +1 -0
  29. package/dist/client/_nuxt/blade.dLd1FX1V.js +831 -0
  30. package/dist/client/_nuxt/builds/latest.json +1 -1
  31. package/dist/client/_nuxt/builds/meta/6bfb2cd5-4c26-466c-8718-148f406ec6ba.json +1 -0
  32. package/dist/client/_nuxt/c.1HqcaTLZ.js +81 -0
  33. package/dist/client/_nuxt/cadence.wPBjDAPG.js +1 -0
  34. package/dist/client/_nuxt/catppuccin-frappe.3zzElYQH.js +1 -0
  35. package/dist/client/_nuxt/catppuccin-latte.7_seQpm6.js +1 -0
  36. package/dist/client/_nuxt/catppuccin-macchiato.xyLZ1Mzm.js +1 -0
  37. package/dist/client/_nuxt/catppuccin-mocha.sKQhYBeR.js +1 -0
  38. package/dist/client/_nuxt/clarity.9V3ikNUm.js +1 -0
  39. package/dist/client/_nuxt/clojure.m464_LIc.js +1 -0
  40. package/dist/client/_nuxt/cmake.YiKLaZ9A.js +1 -0
  41. package/dist/client/_nuxt/cobol.yHzQax91.js +1 -0
  42. package/dist/client/_nuxt/codeql.i7fhVOvX.js +1 -0
  43. package/dist/client/_nuxt/coffee.UjKhX0iS.js +100 -0
  44. package/dist/client/_nuxt/cpp.UIU91NPT.js +186 -0
  45. package/dist/client/_nuxt/crystal.ePodXjZr.js +25 -0
  46. package/dist/client/_nuxt/csharp.xHVQI8QI.js +756 -0
  47. package/dist/client/_nuxt/css.tuEqSfZX.js +505 -0
  48. package/dist/client/_nuxt/csv.REIP-dDb.js +1 -0
  49. package/dist/client/_nuxt/cue.ts9p4IYJ.js +1 -0
  50. package/dist/client/_nuxt/cypher.y2dXjvht.js +1 -0
  51. package/dist/client/_nuxt/d.91KOtcJM.js +1 -0
  52. package/dist/client/_nuxt/dark-plus.kgh98KCl.js +1 -0
  53. package/dist/client/_nuxt/dart.ATU8nP6d.js +1 -0
  54. package/dist/client/_nuxt/dax.M4oDHFBw.js +29 -0
  55. package/dist/client/_nuxt/diff.-l9-nN5b.js +1 -0
  56. package/dist/client/_nuxt/docker.FKXxym4E.js +1 -0
  57. package/dist/client/_nuxt/dracula-soft.E92bUq8i.js +1 -0
  58. package/dist/client/_nuxt/dracula.mNVTF5-9.js +1 -0
  59. package/dist/client/_nuxt/dream-maker.5lPMrnJr.js +52 -0
  60. package/dist/client/_nuxt/elixir.dYoE9A9d.js +17 -0
  61. package/dist/client/_nuxt/elm.AR6G1sGv.js +1 -0
  62. package/dist/client/_nuxt/entry.iguuE0_s.js +36 -0
  63. package/dist/client/_nuxt/erb.vCu37omy.js +1 -0
  64. package/dist/client/_nuxt/erlang._Br9gip-.js +1 -0
  65. package/dist/client/_nuxt/{error-404.VDDOBk9O.js → error-404.JFeDS7ms.js} +1 -1
  66. package/dist/client/_nuxt/{error-500.rnp38h4M.js → error-500.PmGUVbpe.js} +1 -1
  67. package/dist/client/_nuxt/fish.k6NZEVUm.js +5 -0
  68. package/dist/client/_nuxt/fortran-fixed-form.5oVt_150.js +1 -0
  69. package/dist/client/_nuxt/fortran-free-form.l6j6vfmD.js +1 -0
  70. package/dist/client/_nuxt/fsharp.5TASvPJ1.js +1 -0
  71. package/dist/client/_nuxt/gdresource.7GKJFf55.js +1 -0
  72. package/dist/client/_nuxt/gdscript.E1_SGClP.js +44 -0
  73. package/dist/client/_nuxt/gdshader.6pjKCTQy.js +1 -0
  74. package/dist/client/_nuxt/gherkin.hgsyILVZ.js +1 -0
  75. package/dist/client/_nuxt/git-commit.RtAxFnK2.js +1 -0
  76. package/dist/client/_nuxt/git-rebase.-_3Z3F37.js +1 -0
  77. package/dist/client/_nuxt/github-dark-dimmed.yDYFqRVv.js +1 -0
  78. package/dist/client/_nuxt/github-dark.WrpzPehD.js +1 -0
  79. package/dist/client/_nuxt/github-light.QjB713Ax.js +1 -0
  80. package/dist/client/_nuxt/glimmer-js.8faD3vw8.js +13 -0
  81. package/dist/client/_nuxt/glimmer-ts.I8Eofu1P.js +13 -0
  82. package/dist/client/_nuxt/glsl.yLv_V-GM.js +1 -0
  83. package/dist/client/_nuxt/gnuplot.fIlAWhXw.js +266 -0
  84. package/dist/client/_nuxt/go.U2NlzxIl.js +1 -0
  85. package/dist/client/_nuxt/graphql.aYTh5yPU.js +4 -0
  86. package/dist/client/_nuxt/groovy.Z1Lrhk2B.js +37 -0
  87. package/dist/client/_nuxt/hack.9pFjhnG2.js +86 -0
  88. package/dist/client/_nuxt/haml.DYCf5dhF.js +1 -0
  89. package/dist/client/_nuxt/handlebars.Z9TIkDUw.js +1 -0
  90. package/dist/client/_nuxt/haskell.HW0BBkRd.js +559 -0
  91. package/dist/client/_nuxt/hcl.M9siRbiv.js +1 -0
  92. package/dist/client/_nuxt/hjson.fLk7JbZa.js +50 -0
  93. package/dist/client/_nuxt/hlsl.Do_j-o-7.js +1 -0
  94. package/dist/client/_nuxt/html.ZVb9jHrO.js +74 -0
  95. package/dist/client/_nuxt/http.McgS7Vpm.js +1 -0
  96. package/dist/client/_nuxt/imba.guICF3zN.js +223 -0
  97. package/dist/client/_nuxt/index.0wqzsba0.js +1 -0
  98. package/dist/client/_nuxt/ini.T6bxBy5-.js +1 -0
  99. package/dist/client/_nuxt/java.tY-NU26U.js +68 -0
  100. package/dist/client/_nuxt/javascript.JMZ6uy5M.js +699 -0
  101. package/dist/client/_nuxt/jinja.H2a5aKFq.js +1 -0
  102. package/dist/client/_nuxt/jison.hEN1Pilr.js +1 -0
  103. package/dist/client/_nuxt/json.xL80yL3n.js +25 -0
  104. package/dist/client/_nuxt/json5.NRuQoh_0.js +17 -0
  105. package/dist/client/_nuxt/jsonc.Bb1R3obU.js +25 -0
  106. package/dist/client/_nuxt/jsonl.Yjg0VwMG.js +25 -0
  107. package/dist/client/_nuxt/jsonnet.WK26vH-O.js +1 -0
  108. package/dist/client/_nuxt/jssm.eioTUq4-.js +1 -0
  109. package/dist/client/_nuxt/jsx.3LZ_BoLB.js +699 -0
  110. package/dist/client/_nuxt/julia.zN5MNt1V.js +9 -0
  111. package/dist/client/_nuxt/kotlin.1iwCeGA4.js +1 -0
  112. package/dist/client/_nuxt/kusto.UpRCclYC.js +1 -0
  113. package/dist/client/_nuxt/latex.Pwsy_OsJ.js +3 -0
  114. package/dist/client/_nuxt/less.Mq8TrjER.js +159 -0
  115. package/dist/client/_nuxt/light-plus.TzXGjDsL.js +1 -0
  116. package/dist/client/_nuxt/liquid.UuwAmqmc.js +14 -0
  117. package/dist/client/_nuxt/lisp.iIZdsWzX.js +1 -0
  118. package/dist/client/_nuxt/logo.WuHqTpFy.js +1 -0
  119. package/dist/client/_nuxt/lua.OGbZEs3U.js +1 -0
  120. package/dist/client/_nuxt/make.8zIAVqFD.js +1 -0
  121. package/dist/client/_nuxt/markdown.Y8p9X7h3.js +129 -0
  122. package/dist/client/_nuxt/marko.gbQhFTQa.js +8 -0
  123. package/dist/client/_nuxt/material-theme-darker.e1lAwchJ.js +1 -0
  124. package/dist/client/_nuxt/material-theme-lighter.y77yPuAI.js +1 -0
  125. package/dist/client/_nuxt/material-theme-ocean.oIMAIpse.js +1 -0
  126. package/dist/client/_nuxt/material-theme-palenight.Z44VU5rQ.js +1 -0
  127. package/dist/client/_nuxt/material-theme.49YjOoAR.js +1 -0
  128. package/dist/client/_nuxt/matlab.LaB98_jd.js +70 -0
  129. package/dist/client/_nuxt/mdc.NowVT77H.js +76 -0
  130. package/dist/client/_nuxt/mdx.VhCSg2DJ.js +1 -0
  131. package/dist/client/_nuxt/mermaid.WuNnVULj.js +1 -0
  132. package/dist/client/_nuxt/min-dark._Ja8ZF5C.js +1 -0
  133. package/dist/client/_nuxt/min-light.N1m_6E3S.js +1 -0
  134. package/dist/client/_nuxt/mojo.zLNDSfD9.js +519 -0
  135. package/dist/client/_nuxt/monokai.WLw4Glvg.js +1 -0
  136. package/dist/client/_nuxt/narrat.KYi2rZr0.js +7 -0
  137. package/dist/client/_nuxt/nextflow.lYJjOZ_l.js +1 -0
  138. package/dist/client/_nuxt/nginx.CrBM8z2W.js +1 -0
  139. package/dist/client/_nuxt/night-owl.GWZK5Ce7.js +1 -0
  140. package/dist/client/_nuxt/nim.16czfBCm.js +1 -0
  141. package/dist/client/_nuxt/nix.z3u_V08Q.js +1 -0
  142. package/dist/client/_nuxt/nord.1NrVtx79.js +1 -0
  143. package/dist/client/_nuxt/nushell.GDk9yul-.js +1 -0
  144. package/dist/client/_nuxt/objective-c.Eci2Q5FN.js +109 -0
  145. package/dist/client/_nuxt/objective-cpp.nGsV46Zk.js +239 -0
  146. package/dist/client/_nuxt/ocaml.oQRvlYTD.js +1 -0
  147. package/dist/client/_nuxt/one-dark-pro.qlkgvdEn.js +1 -0
  148. package/dist/client/_nuxt/onig.mBJmD8D5.js +1 -0
  149. package/dist/client/_nuxt/pascal.aIRIFbih.js +1 -0
  150. package/dist/client/_nuxt/perl._x09KDDb.js +1 -0
  151. package/dist/client/_nuxt/php.2PDLwZAX.js +771 -0
  152. package/dist/client/_nuxt/plsql.vhhXsReo.js +1 -0
  153. package/dist/client/_nuxt/poimandres.oZrO-I17.js +1 -0
  154. package/dist/client/_nuxt/postcss.57yKeRpx.js +1 -0
  155. package/dist/client/_nuxt/powerquery.wBQvr9E-.js +1 -0
  156. package/dist/client/_nuxt/powershell.6Y_bsqLY.js +1 -0
  157. package/dist/client/_nuxt/prisma.fG9Ut-9i.js +1 -0
  158. package/dist/client/_nuxt/prolog.vggnm0Hd.js +1 -0
  159. package/dist/client/_nuxt/proto.yigfBmiL.js +1 -0
  160. package/dist/client/_nuxt/pug.ieZS468c.js +1 -0
  161. package/dist/client/_nuxt/puppet.NqXa_cO1.js +1 -0
  162. package/dist/client/_nuxt/purescript.NA5qsvV2.js +7 -0
  163. package/dist/client/_nuxt/python.V9Nu427R.js +518 -0
  164. package/dist/client/_nuxt/r.xMXDrvl2.js +1 -0
  165. package/dist/client/_nuxt/raku.NSWyGF40.js +1 -0
  166. package/dist/client/_nuxt/razor.wPI2afgP.js +40 -0
  167. package/dist/client/_nuxt/red.sV5NnIRC.js +1 -0
  168. package/dist/client/_nuxt/reg.Dr-lXfN9.js +1 -0
  169. package/dist/client/_nuxt/rel.vATIbX_E.js +1 -0
  170. package/dist/client/_nuxt/riscv.L73dAZEB.js +13 -0
  171. package/dist/client/_nuxt/rose-pine-dawn.qPi4euik.js +1 -0
  172. package/dist/client/_nuxt/rose-pine-moon.Im6VgKOx.js +1 -0
  173. package/dist/client/_nuxt/rose-pine._tQyNI4L.js +1 -0
  174. package/dist/client/_nuxt/rst.Nzb5IGfi.js +1 -0
  175. package/dist/client/_nuxt/ruby.oOCDDplm.js +80 -0
  176. package/dist/client/_nuxt/rust.yNm59Dur.js +1 -0
  177. package/dist/client/_nuxt/sas.fTu4QUYF.js +1 -0
  178. package/dist/client/_nuxt/sass.URKSWxt9.js +2 -0
  179. package/dist/client/_nuxt/scala.7DKpDMtV.js +5 -0
  180. package/dist/client/_nuxt/scheme.S0VUhbaV.js +136 -0
  181. package/dist/client/_nuxt/scss.9u5wOjnF.js +90 -0
  182. package/dist/client/_nuxt/shaderlab.MYTNW71C.js +1 -0
  183. package/dist/client/_nuxt/shellscript.82BvnTib.js +4 -0
  184. package/dist/client/_nuxt/shellsession.e2TODbDv.js +1 -0
  185. package/dist/client/_nuxt/slack-dark.1ZggNzwg.js +1 -0
  186. package/dist/client/_nuxt/slack-ochin.IcMt0x71.js +1 -0
  187. package/dist/client/_nuxt/smalltalk.ymyryZ3T.js +1 -0
  188. package/dist/client/_nuxt/solarized-dark.3DcwRX9o.js +1 -0
  189. package/dist/client/_nuxt/solarized-light.iUVMuJ2F.js +1 -0
  190. package/dist/client/_nuxt/solidity.rGqtk2dD.js +1 -0
  191. package/dist/client/_nuxt/sparql.b6B4dWwT.js +1 -0
  192. package/dist/client/_nuxt/splunk.OYnOZZCZ.js +1 -0
  193. package/dist/client/_nuxt/sql.KWFjTZGI.js +21 -0
  194. package/dist/client/_nuxt/ssh-config.jdYjUr9x.js +1 -0
  195. package/dist/client/_nuxt/stata.cF_ucIcM.js +3 -0
  196. package/dist/client/_nuxt/stylus.sPHLw37c.js +15 -0
  197. package/dist/client/_nuxt/svelte.j-bqdsch.js +1 -0
  198. package/dist/client/_nuxt/swift.YwiPyWKn.js +544 -0
  199. package/dist/client/_nuxt/synthwave-84.QD7ZGwpp.js +1 -0
  200. package/dist/client/_nuxt/system-verilog.gwJe9XJI.js +9 -0
  201. package/dist/client/_nuxt/tasl.IM3fg-4x.js +1 -0
  202. package/dist/client/_nuxt/tcl.h_zrCUh3.js +1 -0
  203. package/dist/client/_nuxt/tex.uNByjuDB.js +1 -0
  204. package/dist/client/_nuxt/tokyo-night.3j08uV2M.js +1 -0
  205. package/dist/client/_nuxt/toml.p_xIKQcU.js +69 -0
  206. package/dist/client/_nuxt/tsx.7LxggtAE.js +699 -0
  207. package/dist/client/_nuxt/turtle.qvOLXpiq.js +1 -0
  208. package/dist/client/_nuxt/twig.p6WenPmw.js +40 -0
  209. package/dist/client/_nuxt/typescript.HpdcmTOD.js +666 -0
  210. package/dist/client/_nuxt/v.BcVLQyAr.js +1 -0
  211. package/dist/client/_nuxt/vb.nfm3ZogP.js +1 -0
  212. package/dist/client/_nuxt/verilog.32GaFvLA.js +1 -0
  213. package/dist/client/_nuxt/vhdl.BgfvI7C9.js +515 -0
  214. package/dist/client/_nuxt/viml.Ob-szSvk.js +1 -0
  215. package/dist/client/_nuxt/vitesse-black.uLlG6AUB.js +1 -0
  216. package/dist/client/_nuxt/vitesse-dark.5VceXvs6.js +1 -0
  217. package/dist/client/_nuxt/vitesse-light.HOMMxGxw.js +1 -0
  218. package/dist/client/_nuxt/vue-html.TGyjH-sv.js +1 -0
  219. package/dist/client/_nuxt/vue.AKvPdve9.js +6 -0
  220. package/dist/client/_nuxt/vyper.0ItMHLZu.js +575 -0
  221. package/dist/client/_nuxt/wasm.5qeU6UJI.js +1 -0
  222. package/dist/client/_nuxt/wenyan.gl1zQYA8.js +1 -0
  223. package/dist/client/_nuxt/wgsl.KpVp-DWl.js +1 -0
  224. package/dist/client/_nuxt/wolfram.K_QzNdW-.js +1 -0
  225. package/dist/client/_nuxt/xml.GygmfNh9.js +1 -0
  226. package/dist/client/_nuxt/xsl.TptR0G-3.js +1 -0
  227. package/dist/client/_nuxt/yaml.zytfnWoA.js +200 -0
  228. package/dist/client/_nuxt/zenscript.htRIWiQY.js +2 -0
  229. package/dist/client/_nuxt/zig.VzlkOal1.js +1 -0
  230. package/dist/client/index.html +221 -4
  231. package/dist/module.d.mts +7 -1
  232. package/dist/module.d.ts +7 -1
  233. package/dist/module.json +1 -1
  234. package/dist/module.mjs +10 -6
  235. package/dist/runtime/nitro/plugins/nuxt-content.mjs +2 -1
  236. package/dist/runtime/nitro/sitemap/builder/sitemap-index.mjs +5 -2
  237. package/dist/runtime/types.d.ts +7 -1
  238. package/package.json +17 -16
  239. package/dist/client/_nuxt/Icon.I3NdYkjC.css +0 -1
  240. package/dist/client/_nuxt/IconCSS.6oz918NR.css +0 -1
  241. package/dist/client/_nuxt/IconCSS.r2t4JUOE.js +0 -1
  242. package/dist/client/_nuxt/builds/meta/2fe93b8d-efd7-47ba-9658-5044d9ca6696.json +0 -1
  243. package/dist/client/_nuxt/entry.Vlfo_4aT.js +0 -15
  244. package/dist/client/_nuxt/index.lSDm5iYo.js +0 -1
@@ -0,0 +1,519 @@
1
+ const e=Object.freeze({displayName:"Mojo",name:"mojo",patterns:[{include:"#statement"},{include:"#expression"}],repository:{"annotated-parameter":{begin:`(?x)
2
+ \\b
3
+ ([[:alpha:]_]\\w*) \\s* (:)
4
+ `,beginCaptures:{1:{name:"variable.parameter.function.language.python"},2:{name:"punctuation.separator.annotation.python"}},end:"(,)|(?=\\))",endCaptures:{1:{name:"punctuation.separator.parameters.python"}},patterns:[{include:"#expression"},{match:"=(?!=)",name:"keyword.operator.assignment.python"}]},"assignment-operator":{match:`(?x)
5
+ <<= | >>= | //= | \\*\\*=
6
+ | \\+= | -= | /= | @=
7
+ | \\*= | %= | ~= | \\^= | &= | \\|=
8
+ | =(?!=)
9
+ `,name:"keyword.operator.assignment.python"},backticks:{begin:"\\`",end:"(?:\\`|(?<!\\\\)(\\n))",name:"string.quoted.single.python"},"builtin-callables":{patterns:[{include:"#illegal-names"},{include:"#illegal-object-name"},{include:"#builtin-exceptions"},{include:"#builtin-functions"},{include:"#builtin-types"}]},"builtin-exceptions":{match:`(?x) (?<!\\.) \\b(
10
+ (
11
+ Arithmetic | Assertion | Attribute | Buffer | BlockingIO
12
+ | BrokenPipe | ChildProcess
13
+ | (Connection (Aborted | Refused | Reset)?)
14
+ | EOF | Environment | FileExists | FileNotFound
15
+ | FloatingPoint | IO | Import | Indentation | Index | Interrupted
16
+ | IsADirectory | NotADirectory | Permission | ProcessLookup
17
+ | Timeout
18
+ | Key | Lookup | Memory | Name | NotImplemented | OS | Overflow
19
+ | Reference | Runtime | Recursion | Syntax | System
20
+ | Tab | Type | UnboundLocal | Unicode(Encode|Decode|Translate)?
21
+ | Value | Windows | ZeroDivision | ModuleNotFound
22
+ ) Error
23
+ |
24
+ ((Pending)?Deprecation | Runtime | Syntax | User | Future | Import
25
+ | Unicode | Bytes | Resource
26
+ )? Warning
27
+ |
28
+ SystemExit | Stop(Async)?Iteration
29
+ | KeyboardInterrupt
30
+ | GeneratorExit | (Base)?Exception
31
+ )\\b
32
+ `,name:"support.type.exception.python"},"builtin-functions":{patterns:[{match:`(?x)
33
+ (?<!\\.) \\b(
34
+ __import__ | abs | aiter | all | any | anext | ascii | bin
35
+ | breakpoint | callable | chr | compile | copyright | credits
36
+ | delattr | dir | divmod | enumerate | eval | exec | exit
37
+ | filter | format | getattr | globals | hasattr | hash | help
38
+ | hex | id | input | isinstance | issubclass | iter | len
39
+ | license | locals | map | max | memoryview | min | next
40
+ | oct | open | ord | pow | print | quit | range | reload | repr
41
+ | reversed | round | setattr | sorted | sum | vars | zip
42
+ )\\b
43
+ `,name:"support.function.builtin.python"},{match:`(?x)
44
+ (?<!\\.) \\b(
45
+ file | reduce | intern | raw_input | unicode | cmp | basestring
46
+ | execfile | long | xrange
47
+ )\\b
48
+ `,name:"variable.legacy.builtin.python"}]},"builtin-possible-callables":{patterns:[{include:"#builtin-callables"},{include:"#magic-names"}]},"builtin-types":{match:`(?x)
49
+ (?<!\\.) \\b(
50
+ __mlir_attr | __mlir_op | __mlir_type | bool | bytearray | bytes | classmethod | complex | dict
51
+ | float | frozenset | int | list | object | property
52
+ | set | slice | staticmethod | str | tuple | type
53
+
54
+ (?# Although 'super' is not a type, it's related to types,
55
+ and is special enough to be highlighted differently from
56
+ other built-ins)
57
+ | super
58
+ )\\b
59
+ `,name:"support.type.python"},"call-wrapper-inheritance":{begin:`(?x)
60
+ \\b(?=
61
+ ([[:alpha:]_]\\w*) \\s* (\\()
62
+ )
63
+ `,comment:"same as a function call, but in inheritance context",end:"(\\))",endCaptures:{1:{name:"punctuation.definition.arguments.end.python"}},name:"meta.function-call.python",patterns:[{include:"#inheritance-name"},{include:"#function-arguments"}]},"class-declaration":{patterns:[{begin:`(?x)
64
+ \\s*(class|struct|trait)\\s+
65
+ (?=
66
+ [[:alpha:]_]\\w* \\s* (:|\\()
67
+ )
68
+ `,beginCaptures:{1:{name:"storage.type.class.python"}},end:"(:)",endCaptures:{1:{name:"punctuation.section.class.begin.python"}},name:"meta.class.python",patterns:[{include:"#class-name"},{include:"#class-inheritance"}]}]},"class-inheritance":{begin:"(\\()",beginCaptures:{1:{name:"punctuation.definition.inheritance.begin.python"}},end:"(\\))",endCaptures:{1:{name:"punctuation.definition.inheritance.end.python"}},name:"meta.class.inheritance.python",patterns:[{match:"(\\*\\*|\\*)",name:"keyword.operator.unpacking.arguments.python"},{match:",",name:"punctuation.separator.inheritance.python"},{match:"=(?!=)",name:"keyword.operator.assignment.python"},{match:"\\bmetaclass\\b",name:"support.type.metaclass.python"},{include:"#illegal-names"},{include:"#class-kwarg"},{include:"#call-wrapper-inheritance"},{include:"#expression-base"},{include:"#member-access-class"},{include:"#inheritance-identifier"}]},"class-kwarg":{captures:{1:{name:"entity.other.inherited-class.python variable.parameter.class.python"},2:{name:"keyword.operator.assignment.python"}},match:`(?x)
69
+ \\b ([[:alpha:]_]\\w*) \\s*(=)(?!=)
70
+ `},"class-name":{patterns:[{include:"#illegal-object-name"},{include:"#builtin-possible-callables"},{match:`(?x)
71
+ \\b ([[:alpha:]_]\\w*) \\b
72
+ `,name:"entity.name.type.class.python"}]},codetags:{captures:{1:{name:"keyword.codetag.notation.python"}},match:"(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)"},comments:{patterns:[{begin:`(?x)
73
+ (?:
74
+ \\# \\s* (type:)
75
+ \\s*+ (?# we want \`\\s*+\` which is possessive quantifier since
76
+ we do not actually want to backtrack when matching
77
+ whitespace here)
78
+ (?! $ | \\#)
79
+ )
80
+ `,beginCaptures:{0:{name:"meta.typehint.comment.python"},1:{name:"comment.typehint.directive.notation.python"}},contentName:"meta.typehint.comment.python",end:"(?:$|(?=\\#))",name:"comment.line.number-sign.python",patterns:[{match:`(?x)
81
+ \\G ignore
82
+ (?= \\s* (?: $ | \\#))
83
+ `,name:"comment.typehint.ignore.notation.python"},{match:`(?x)
84
+ (?<!\\.)\\b(
85
+ bool | bytes | float | int | object | str
86
+ | List | Dict | Iterable | Sequence | Set
87
+ | FrozenSet | Callable | Union | Tuple
88
+ | Any | None
89
+ )\\b
90
+ `,name:"comment.typehint.type.notation.python"},{match:"([\\[\\]\\(\\),\\.\\=\\*]|(->))",name:"comment.typehint.punctuation.notation.python"},{match:"([[:alpha:]_]\\w*)",name:"comment.typehint.variable.notation.python"}]},{include:"#comments-base"}]},"comments-base":{begin:"(\\#)",beginCaptures:{1:{name:"punctuation.definition.comment.python"}},end:"($)",name:"comment.line.number-sign.python",patterns:[{include:"#codetags"}]},"comments-string-double-three":{begin:"(\\#)",beginCaptures:{1:{name:"punctuation.definition.comment.python"}},end:'($|(?="""))',name:"comment.line.number-sign.python",patterns:[{include:"#codetags"}]},"comments-string-single-three":{begin:"(\\#)",beginCaptures:{1:{name:"punctuation.definition.comment.python"}},end:"($|(?='''))",name:"comment.line.number-sign.python",patterns:[{include:"#codetags"}]},"curly-braces":{begin:"\\{",beginCaptures:{0:{name:"punctuation.definition.dict.begin.python"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.dict.end.python"}},patterns:[{match:":",name:"punctuation.separator.dict.python"},{include:"#expression"}]},decorator:{begin:`(?x)
91
+ ^\\s*
92
+ ((@)) \\s* (?=[[:alpha:]_]\\w*)
93
+ `,beginCaptures:{1:{name:"entity.name.function.decorator.python"},2:{name:"punctuation.definition.decorator.python"}},end:`(?x)
94
+ ( \\) )
95
+
96
+ (?: (.*?) (?=\\s*(?:\\#|$)) )
97
+ | (?=\\n|\\#)
98
+ `,endCaptures:{1:{name:"punctuation.definition.arguments.end.python"},2:{name:"invalid.illegal.decorator.python"}},name:"meta.function.decorator.python",patterns:[{include:"#decorator-name"},{include:"#function-arguments"}]},"decorator-name":{patterns:[{include:"#builtin-callables"},{include:"#illegal-object-name"},{captures:{2:{name:"punctuation.separator.period.python"}},match:`(?x)
99
+ ([[:alpha:]_]\\w*) | (\\.)
100
+ `,name:"entity.name.function.decorator.python"},{include:"#line-continuation"},{captures:{1:{name:"invalid.illegal.decorator.python"}},match:`(?x)
101
+ \\s* ([^([:alpha:]\\s_\\.#\\\\] .*?) (?=\\#|$)
102
+ `,name:"invalid.illegal.decorator.python"}]},"double-one-regexp-character-set":{patterns:[{match:`(?x)
103
+ \\[ \\^? \\] (?! .*?\\])
104
+ `},{begin:"(\\[)(\\^)?(\\])?",beginCaptures:{1:{name:"punctuation.character.set.begin.regexp constant.other.set.regexp"},2:{name:"keyword.operator.negation.regexp"},3:{name:"constant.character.set.regexp"}},end:'(\\]|(?="))|((?=(?<!\\\\)\\n))',endCaptures:{1:{name:"punctuation.character.set.end.regexp constant.other.set.regexp"},2:{name:"invalid.illegal.newline.python"}},name:"meta.character.set.regexp",patterns:[{include:"#regexp-charecter-set-escapes"},{match:"[^\\n]",name:"constant.character.set.regexp"}]}]},"double-one-regexp-comments":{begin:"\\(\\?#",beginCaptures:{0:{name:"punctuation.comment.begin.regexp"}},end:'(\\)|(?="))|((?=(?<!\\\\)\\n))',endCaptures:{1:{name:"punctuation.comment.end.regexp"},2:{name:"invalid.illegal.newline.python"}},name:"comment.regexp",patterns:[{include:"#codetags"}]},"double-one-regexp-conditional":{begin:"(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",beginCaptures:{0:{name:"keyword.operator.conditional.regexp"},1:{name:"punctuation.parenthesis.conditional.begin.regexp"}},end:'(\\)|(?="))|((?=(?<!\\\\)\\n))',endCaptures:{1:{name:"keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-one-regexp-expression"}]},"double-one-regexp-expression":{patterns:[{include:"#regexp-base-expression"},{include:"#double-one-regexp-character-set"},{include:"#double-one-regexp-comments"},{include:"#regexp-flags"},{include:"#double-one-regexp-named-group"},{include:"#regexp-backreference"},{include:"#double-one-regexp-lookahead"},{include:"#double-one-regexp-lookahead-negative"},{include:"#double-one-regexp-lookbehind"},{include:"#double-one-regexp-lookbehind-negative"},{include:"#double-one-regexp-conditional"},{include:"#double-one-regexp-parentheses-non-capturing"},{include:"#double-one-regexp-parentheses"}]},"double-one-regexp-lookahead":{begin:"(\\()\\?=",beginCaptures:{0:{name:"keyword.operator.lookahead.regexp"},1:{name:"punctuation.parenthesis.lookahead.begin.regexp"}},end:'(\\)|(?="))|((?=(?<!\\\\)\\n))',endCaptures:{1:{name:"keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-one-regexp-expression"}]},"double-one-regexp-lookahead-negative":{begin:"(\\()\\?!",beginCaptures:{0:{name:"keyword.operator.lookahead.negative.regexp"},1:{name:"punctuation.parenthesis.lookahead.begin.regexp"}},end:'(\\)|(?="))|((?=(?<!\\\\)\\n))',endCaptures:{1:{name:"keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-one-regexp-expression"}]},"double-one-regexp-lookbehind":{begin:"(\\()\\?<=",beginCaptures:{0:{name:"keyword.operator.lookbehind.regexp"},1:{name:"punctuation.parenthesis.lookbehind.begin.regexp"}},end:'(\\)|(?="))|((?=(?<!\\\\)\\n))',endCaptures:{1:{name:"keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-one-regexp-expression"}]},"double-one-regexp-lookbehind-negative":{begin:"(\\()\\?<!",beginCaptures:{0:{name:"keyword.operator.lookbehind.negative.regexp"},1:{name:"punctuation.parenthesis.lookbehind.begin.regexp"}},end:'(\\)|(?="))|((?=(?<!\\\\)\\n))',endCaptures:{1:{name:"keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-one-regexp-expression"}]},"double-one-regexp-named-group":{begin:`(?x)
105
+ (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)
106
+ `,beginCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"},2:{name:"entity.name.tag.named.group.regexp"}},end:'(\\)|(?="))|((?=(?<!\\\\)\\n))',endCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"},2:{name:"invalid.illegal.newline.python"}},name:"meta.named.regexp",patterns:[{include:"#double-one-regexp-expression"}]},"double-one-regexp-parentheses":{begin:"\\(",beginCaptures:{0:{name:"support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"}},end:'(\\)|(?="))|((?=(?<!\\\\)\\n))',endCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-one-regexp-expression"}]},"double-one-regexp-parentheses-non-capturing":{begin:"\\(\\?:",beginCaptures:{0:{name:"support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"}},end:'(\\)|(?="))|((?=(?<!\\\\)\\n))',endCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-one-regexp-expression"}]},"double-three-regexp-character-set":{patterns:[{match:`(?x)
107
+ \\[ \\^? \\] (?! .*?\\])
108
+ `},{begin:"(\\[)(\\^)?(\\])?",beginCaptures:{1:{name:"punctuation.character.set.begin.regexp constant.other.set.regexp"},2:{name:"keyword.operator.negation.regexp"},3:{name:"constant.character.set.regexp"}},end:'(\\]|(?="""))',endCaptures:{1:{name:"punctuation.character.set.end.regexp constant.other.set.regexp"},2:{name:"invalid.illegal.newline.python"}},name:"meta.character.set.regexp",patterns:[{include:"#regexp-charecter-set-escapes"},{match:"[^\\n]",name:"constant.character.set.regexp"}]}]},"double-three-regexp-comments":{begin:"\\(\\?#",beginCaptures:{0:{name:"punctuation.comment.begin.regexp"}},end:'(\\)|(?="""))',endCaptures:{1:{name:"punctuation.comment.end.regexp"},2:{name:"invalid.illegal.newline.python"}},name:"comment.regexp",patterns:[{include:"#codetags"}]},"double-three-regexp-conditional":{begin:"(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",beginCaptures:{0:{name:"keyword.operator.conditional.regexp"},1:{name:"punctuation.parenthesis.conditional.begin.regexp"}},end:'(\\)|(?="""))',endCaptures:{1:{name:"keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-three-regexp-expression"},{include:"#comments-string-double-three"}]},"double-three-regexp-expression":{patterns:[{include:"#regexp-base-expression"},{include:"#double-three-regexp-character-set"},{include:"#double-three-regexp-comments"},{include:"#regexp-flags"},{include:"#double-three-regexp-named-group"},{include:"#regexp-backreference"},{include:"#double-three-regexp-lookahead"},{include:"#double-three-regexp-lookahead-negative"},{include:"#double-three-regexp-lookbehind"},{include:"#double-three-regexp-lookbehind-negative"},{include:"#double-three-regexp-conditional"},{include:"#double-three-regexp-parentheses-non-capturing"},{include:"#double-three-regexp-parentheses"},{include:"#comments-string-double-three"}]},"double-three-regexp-lookahead":{begin:"(\\()\\?=",beginCaptures:{0:{name:"keyword.operator.lookahead.regexp"},1:{name:"punctuation.parenthesis.lookahead.begin.regexp"}},end:'(\\)|(?="""))',endCaptures:{1:{name:"keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-three-regexp-expression"},{include:"#comments-string-double-three"}]},"double-three-regexp-lookahead-negative":{begin:"(\\()\\?!",beginCaptures:{0:{name:"keyword.operator.lookahead.negative.regexp"},1:{name:"punctuation.parenthesis.lookahead.begin.regexp"}},end:'(\\)|(?="""))',endCaptures:{1:{name:"keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-three-regexp-expression"},{include:"#comments-string-double-three"}]},"double-three-regexp-lookbehind":{begin:"(\\()\\?<=",beginCaptures:{0:{name:"keyword.operator.lookbehind.regexp"},1:{name:"punctuation.parenthesis.lookbehind.begin.regexp"}},end:'(\\)|(?="""))',endCaptures:{1:{name:"keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-three-regexp-expression"},{include:"#comments-string-double-three"}]},"double-three-regexp-lookbehind-negative":{begin:"(\\()\\?<!",beginCaptures:{0:{name:"keyword.operator.lookbehind.negative.regexp"},1:{name:"punctuation.parenthesis.lookbehind.begin.regexp"}},end:'(\\)|(?="""))',endCaptures:{1:{name:"keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-three-regexp-expression"},{include:"#comments-string-double-three"}]},"double-three-regexp-named-group":{begin:`(?x)
109
+ (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)
110
+ `,beginCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"},2:{name:"entity.name.tag.named.group.regexp"}},end:'(\\)|(?="""))',endCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"},2:{name:"invalid.illegal.newline.python"}},name:"meta.named.regexp",patterns:[{include:"#double-three-regexp-expression"},{include:"#comments-string-double-three"}]},"double-three-regexp-parentheses":{begin:"\\(",beginCaptures:{0:{name:"support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"}},end:'(\\)|(?="""))',endCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-three-regexp-expression"},{include:"#comments-string-double-three"}]},"double-three-regexp-parentheses-non-capturing":{begin:"\\(\\?:",beginCaptures:{0:{name:"support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"}},end:'(\\)|(?="""))',endCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#double-three-regexp-expression"},{include:"#comments-string-double-three"}]},ellipsis:{match:"\\.\\.\\.",name:"constant.other.ellipsis.python"},"escape-sequence":{match:`(?x)
111
+ \\\\ (
112
+ x[0-9A-Fa-f]{2}
113
+ | [0-7]{1,3}
114
+ | [\\\\"'abfnrtv]
115
+ )
116
+ `,name:"constant.character.escape.python"},"escape-sequence-unicode":{patterns:[{match:`(?x)
117
+ \\\\ (
118
+ u[0-9A-Fa-f]{4}
119
+ | U[0-9A-Fa-f]{8}
120
+ | N\\{[\\w\\s]+?\\}
121
+ )
122
+ `,name:"constant.character.escape.python"}]},expression:{comment:"All valid Python expressions",patterns:[{include:"#expression-base"},{include:"#member-access"},{comment:"Tokenize identifiers to help linters",match:"(?x) \\b ([[:alpha:]_]\\w*) \\b"}]},"expression-bare":{comment:"valid Python expressions w/o comments and line continuation",patterns:[{include:"#backticks"},{include:"#illegal-anno"},{include:"#literal"},{include:"#regexp"},{include:"#string"},{include:"#lambda"},{include:"#generator"},{include:"#illegal-operator"},{include:"#operator"},{include:"#curly-braces"},{include:"#item-access"},{include:"#list"},{include:"#odd-function-call"},{include:"#round-braces"},{include:"#function-call"},{include:"#builtin-functions"},{include:"#builtin-types"},{include:"#builtin-exceptions"},{include:"#magic-names"},{include:"#special-names"},{include:"#illegal-names"},{include:"#special-variables"},{include:"#ellipsis"},{include:"#punctuation"},{include:"#line-continuation"}]},"expression-base":{comment:"valid Python expressions with comments and line continuation",patterns:[{include:"#comments"},{include:"#expression-bare"},{include:"#line-continuation"}]},"f-expression":{comment:"All valid Python expressions, except comments and line continuation",patterns:[{include:"#expression-bare"},{include:"#member-access"},{comment:"Tokenize identifiers to help linters",match:"(?x) \\b ([[:alpha:]_]\\w*) \\b"}]},"fregexp-base-expression":{patterns:[{include:"#fregexp-quantifier"},{include:"#fstring-formatting-braces"},{match:"\\{.*?\\}"},{include:"#regexp-base-common"}]},"fregexp-quantifier":{match:`(?x)
123
+ \\{\\{(
124
+ \\d+ | \\d+,(\\d+)? | ,\\d+
125
+ )\\}\\}
126
+ `,name:"keyword.operator.quantifier.regexp"},"fstring-fnorm-quoted-multi-line":{begin:`(\\b[fF])([bBuU])?('''|""")`,beginCaptures:{1:{name:"string.interpolated.python string.quoted.multi.python storage.type.string.python"},2:{name:"invalid.illegal.prefix.python"},3:{name:"punctuation.definition.string.begin.python string.interpolated.python string.quoted.multi.python"}},end:"(\\3)",endCaptures:{1:{name:"punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python"},2:{name:"invalid.illegal.newline.python"}},name:"meta.fstring.python",patterns:[{include:"#fstring-guts"},{include:"#fstring-illegal-multi-brace"},{include:"#fstring-multi-brace"},{include:"#fstring-multi-core"}]},"fstring-fnorm-quoted-single-line":{begin:`(\\b[fF])([bBuU])?((['"]))`,beginCaptures:{1:{name:"string.interpolated.python string.quoted.single.python storage.type.string.python"},2:{name:"invalid.illegal.prefix.python"},3:{name:"punctuation.definition.string.begin.python string.interpolated.python string.quoted.single.python"}},end:"(\\3)|((?<!\\\\)\\n)",endCaptures:{1:{name:"punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python"},2:{name:"invalid.illegal.newline.python"}},name:"meta.fstring.python",patterns:[{include:"#fstring-guts"},{include:"#fstring-illegal-single-brace"},{include:"#fstring-single-brace"},{include:"#fstring-single-core"}]},"fstring-formatting":{patterns:[{include:"#fstring-formatting-braces"},{include:"#fstring-formatting-singe-brace"}]},"fstring-formatting-braces":{patterns:[{captures:{1:{name:"constant.character.format.placeholder.other.python"},2:{name:"invalid.illegal.brace.python"},3:{name:"constant.character.format.placeholder.other.python"}},comment:"empty braces are illegal",match:"({)(\\s*?)(})"},{match:"({{|}})",name:"constant.character.escape.python"}]},"fstring-formatting-singe-brace":{match:"(}(?!}))",name:"invalid.illegal.brace.python"},"fstring-guts":{patterns:[{include:"#escape-sequence-unicode"},{include:"#escape-sequence"},{include:"#string-line-continuation"},{include:"#fstring-formatting"}]},"fstring-illegal-multi-brace":{patterns:[{include:"#impossible"}]},"fstring-illegal-single-brace":{begin:"(\\{)(?=[^\\n}]*$\\n?)",beginCaptures:{1:{name:"constant.character.format.placeholder.other.python"}},comment:"it is illegal to have a multiline brace inside a single-line string",end:"(\\})|(?=\\n)",endCaptures:{1:{name:"constant.character.format.placeholder.other.python"}},patterns:[{include:"#fstring-terminator-single"},{include:"#f-expression"}]},"fstring-multi-brace":{begin:"(\\{)",beginCaptures:{1:{name:"constant.character.format.placeholder.other.python"}},comment:"value interpolation using { ... }",end:`(?x)
127
+ (\\})
128
+ `,endCaptures:{1:{name:"constant.character.format.placeholder.other.python"}},patterns:[{include:"#fstring-terminator-multi"},{include:"#f-expression"}]},"fstring-multi-core":{match:`(?x)
129
+ (.+?)
130
+ (
131
+ (?# .* and .*? in multi-line match need special handling of
132
+ newlines otherwise SublimeText and Atom will match slightly
133
+ differently.
134
+
135
+ The guard for newlines has to be separate from the
136
+ lookahead because of special $ matching rule.)
137
+ ($\\n?)
138
+ |
139
+ (?=[\\\\\\}\\{]|'''|""")
140
+ )
141
+ (?# due to how multiline regexps are matched we need a special case
142
+ for matching a newline character)
143
+ | \\n
144
+ `,name:"string.interpolated.python string.quoted.multi.python"},"fstring-normf-quoted-multi-line":{begin:`(\\b[bBuU])([fF])('''|""")`,beginCaptures:{1:{name:"invalid.illegal.prefix.python"},2:{name:"string.interpolated.python string.quoted.multi.python storage.type.string.python"},3:{name:"punctuation.definition.string.begin.python string.quoted.multi.python"}},end:"(\\3)",endCaptures:{1:{name:"punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python"},2:{name:"invalid.illegal.newline.python"}},name:"meta.fstring.python",patterns:[{include:"#fstring-guts"},{include:"#fstring-illegal-multi-brace"},{include:"#fstring-multi-brace"},{include:"#fstring-multi-core"}]},"fstring-normf-quoted-single-line":{begin:`(\\b[bBuU])([fF])((['"]))`,beginCaptures:{1:{name:"invalid.illegal.prefix.python"},2:{name:"string.interpolated.python string.quoted.single.python storage.type.string.python"},3:{name:"punctuation.definition.string.begin.python string.quoted.single.python"}},end:"(\\3)|((?<!\\\\)\\n)",endCaptures:{1:{name:"punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python"},2:{name:"invalid.illegal.newline.python"}},name:"meta.fstring.python",patterns:[{include:"#fstring-guts"},{include:"#fstring-illegal-single-brace"},{include:"#fstring-single-brace"},{include:"#fstring-single-core"}]},"fstring-raw-guts":{patterns:[{include:"#string-consume-escape"},{include:"#fstring-formatting"}]},"fstring-raw-multi-core":{match:`(?x)
145
+ (.+?)
146
+ (
147
+ (?# .* and .*? in multi-line match need special handling of
148
+ newlines otherwise SublimeText and Atom will match slightly
149
+ differently.
150
+
151
+ The guard for newlines has to be separate from the
152
+ lookahead because of special $ matching rule.)
153
+ ($\\n?)
154
+ |
155
+ (?=[\\\\\\}\\{]|'''|""")
156
+ )
157
+ (?# due to how multiline regexps are matched we need a special case
158
+ for matching a newline character)
159
+ | \\n
160
+ `,name:"string.interpolated.python string.quoted.raw.multi.python"},"fstring-raw-quoted-multi-line":{begin:`(\\b(?:[rR][fF]|[fF][rR]))('''|""")`,beginCaptures:{1:{name:"string.interpolated.python string.quoted.raw.multi.python storage.type.string.python"},2:{name:"punctuation.definition.string.begin.python string.quoted.raw.multi.python"}},end:"(\\2)",endCaptures:{1:{name:"punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.multi.python"},2:{name:"invalid.illegal.newline.python"}},name:"meta.fstring.python",patterns:[{include:"#fstring-raw-guts"},{include:"#fstring-illegal-multi-brace"},{include:"#fstring-multi-brace"},{include:"#fstring-raw-multi-core"}]},"fstring-raw-quoted-single-line":{begin:`(\\b(?:[rR][fF]|[fF][rR]))((['"]))`,beginCaptures:{1:{name:"string.interpolated.python string.quoted.raw.single.python storage.type.string.python"},2:{name:"punctuation.definition.string.begin.python string.quoted.raw.single.python"}},end:"(\\2)|((?<!\\\\)\\n)",endCaptures:{1:{name:"punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.single.python"},2:{name:"invalid.illegal.newline.python"}},name:"meta.fstring.python",patterns:[{include:"#fstring-raw-guts"},{include:"#fstring-illegal-single-brace"},{include:"#fstring-single-brace"},{include:"#fstring-raw-single-core"}]},"fstring-raw-single-core":{match:`(?x)
161
+ (.+?)
162
+ (
163
+ (?# .* and .*? in multi-line match need special handling of
164
+ newlines otherwise SublimeText and Atom will match slightly
165
+ differently.
166
+
167
+ The guard for newlines has to be separate from the
168
+ lookahead because of special $ matching rule.)
169
+ ($\\n?)
170
+ |
171
+ (?=[\\\\\\}\\{]|(['"])|((?<!\\\\)\\n))
172
+ )
173
+ (?# due to how multiline regexps are matched we need a special case
174
+ for matching a newline character)
175
+ | \\n
176
+ `,name:"string.interpolated.python string.quoted.raw.single.python"},"fstring-single-brace":{begin:"(\\{)",beginCaptures:{1:{name:"constant.character.format.placeholder.other.python"}},comment:"value interpolation using { ... }",end:`(?x)
177
+ (\\})|(?=\\n)
178
+ `,endCaptures:{1:{name:"constant.character.format.placeholder.other.python"}},patterns:[{include:"#fstring-terminator-single"},{include:"#f-expression"}]},"fstring-single-core":{match:`(?x)
179
+ (.+?)
180
+ (
181
+ (?# .* and .*? in multi-line match need special handling of
182
+ newlines otherwise SublimeText and Atom will match slightly
183
+ differently.
184
+
185
+ The guard for newlines has to be separate from the
186
+ lookahead because of special $ matching rule.)
187
+ ($\\n?)
188
+ |
189
+ (?=[\\\\\\}\\{]|(['"])|((?<!\\\\)\\n))
190
+ )
191
+ (?# due to how multiline regexps are matched we need a special case
192
+ for matching a newline character)
193
+ | \\n
194
+ `,name:"string.interpolated.python string.quoted.single.python"},"fstring-terminator-multi":{patterns:[{match:"(=(![rsa])?)(?=})",name:"storage.type.format.python"},{match:"(=?![rsa])(?=})",name:"storage.type.format.python"},{captures:{1:{name:"storage.type.format.python"},2:{name:"storage.type.format.python"}},match:`(?x)
195
+ ( (?: =?) (?: ![rsa])? )
196
+ ( : \\w? [<>=^]? [-+ ]? \\#?
197
+ \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})
198
+ `},{include:"#fstring-terminator-multi-tail"}]},"fstring-terminator-multi-tail":{begin:"((?:=?)(?:![rsa])?)(:)(?=.*?{)",beginCaptures:{1:{name:"storage.type.format.python"},2:{name:"storage.type.format.python"}},end:"(?=})",patterns:[{include:"#fstring-illegal-multi-brace"},{include:"#fstring-multi-brace"},{match:"([bcdeEfFgGnosxX%])(?=})",name:"storage.type.format.python"},{match:"(\\.\\d+)",name:"storage.type.format.python"},{match:"(,)",name:"storage.type.format.python"},{match:"(\\d+)",name:"storage.type.format.python"},{match:"(\\#)",name:"storage.type.format.python"},{match:"([-+ ])",name:"storage.type.format.python"},{match:"([<>=^])",name:"storage.type.format.python"},{match:"(\\w)",name:"storage.type.format.python"}]},"fstring-terminator-single":{patterns:[{match:"(=(![rsa])?)(?=})",name:"storage.type.format.python"},{match:"(=?![rsa])(?=})",name:"storage.type.format.python"},{captures:{1:{name:"storage.type.format.python"},2:{name:"storage.type.format.python"}},match:`(?x)
199
+ ( (?: =?) (?: ![rsa])? )
200
+ ( : \\w? [<>=^]? [-+ ]? \\#?
201
+ \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})
202
+ `},{include:"#fstring-terminator-single-tail"}]},"fstring-terminator-single-tail":{begin:"((?:=?)(?:![rsa])?)(:)(?=.*?{)",beginCaptures:{1:{name:"storage.type.format.python"},2:{name:"storage.type.format.python"}},end:"(?=})|(?=\\n)",patterns:[{include:"#fstring-illegal-single-brace"},{include:"#fstring-single-brace"},{match:"([bcdeEfFgGnosxX%])(?=})",name:"storage.type.format.python"},{match:"(\\.\\d+)",name:"storage.type.format.python"},{match:"(,)",name:"storage.type.format.python"},{match:"(\\d+)",name:"storage.type.format.python"},{match:"(\\#)",name:"storage.type.format.python"},{match:"([-+ ])",name:"storage.type.format.python"},{match:"([<>=^])",name:"storage.type.format.python"},{match:"(\\w)",name:"storage.type.format.python"}]},"function-arguments":{begin:"(\\()",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.python"}},contentName:"meta.function-call.arguments.python",end:"(?=\\))(?!\\)\\s*\\()",patterns:[{match:"(,)",name:"punctuation.separator.arguments.python"},{captures:{1:{name:"keyword.operator.unpacking.arguments.python"}},match:`(?x)
203
+ (?:(?<=[,(])|^) \\s* (\\*{1,2})
204
+ `},{include:"#lambda-incomplete"},{include:"#illegal-names"},{captures:{1:{name:"variable.parameter.function-call.python"},2:{name:"keyword.operator.assignment.python"}},match:"\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)"},{match:"=(?!=)",name:"keyword.operator.assignment.python"},{include:"#expression"},{captures:{1:{name:"punctuation.definition.arguments.end.python"},2:{name:"punctuation.definition.arguments.begin.python"}},match:"\\s*(\\))\\s*(\\()"}]},"function-call":{begin:`(?x)
205
+ \\b(?=
206
+ ([[:alpha:]_]\\w*) \\s* (\\()
207
+ )
208
+ `,comment:'Regular function call of the type "name(args)"',end:"(\\))",endCaptures:{1:{name:"punctuation.definition.arguments.end.python"}},name:"meta.function-call.python",patterns:[{include:"#special-variables"},{include:"#function-name"},{include:"#function-arguments"}]},"function-declaration":{begin:`(?x)
209
+ \\s*
210
+ (?:\\b(async) \\s+)? \\b(def|fn)\\s+
211
+ (?=
212
+ [[:alpha:]_][[:word:]]* \\s* [\\(\\[]
213
+ )
214
+ `,beginCaptures:{1:{name:"storage.type.function.async.python"},2:{name:"storage.type.function.python"}},end:`(:|(?=[#'"\\n]))`,endCaptures:{1:{name:"punctuation.section.function.begin.python"}},name:"meta.function.python",patterns:[{include:"#raises-modifier"},{include:"#function-def-name"},{include:"#parameters"},{include:"#meta_parameters"},{include:"#line-continuation"},{include:"#return-annotation"}]},"function-def-name":{patterns:[{include:"#illegal-object-name"},{include:"#builtin-possible-callables"},{match:`(?x)
215
+ \\b ([[:alpha:]_]\\w*) \\b
216
+ `,name:"entity.name.function.python"}]},"function-name":{patterns:[{include:"#builtin-possible-callables"},{comment:"Some color schemas support meta.function-call.generic scope",match:`(?x)
217
+ \\b ([[:alpha:]_]\\w*) \\b
218
+ `,name:"meta.function-call.generic.python"}]},generator:{begin:"\\bfor\\b",beginCaptures:{0:{name:"keyword.control.flow.python"}},comment:`Match "for ... in" construct used in generators and for loops to
219
+ correctly identify the "in" as a control flow keyword.
220
+ `,end:"\\bin\\b",endCaptures:{0:{name:"keyword.control.flow.python"}},patterns:[{include:"#expression"}]},"illegal-anno":{match:"->",name:"invalid.illegal.annotation.python"},"illegal-names":{captures:{1:{name:"keyword.control.flow.python"},2:{name:"keyword.control.import.python"}},match:`(?x)
221
+ \\b(?:
222
+ (
223
+ and | assert | async | await | break | class | struct | trait | continue | def
224
+ | fn
225
+ | del | elif | else | except | finally | for | from | global
226
+ | if | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])
227
+ | nonlocal | not | or | pass | raise | return | try | while | with
228
+ | yield
229
+ ) | (
230
+ as | import
231
+ )
232
+ )\\b
233
+ `},"illegal-object-name":{comment:`It's illegal to name class or function "True"`,match:"\\b(True|False|None)\\b",name:"keyword.illegal.name.python"},"illegal-operator":{patterns:[{match:"&&|\\|\\||--|\\+\\+",name:"invalid.illegal.operator.python"},{match:"[?$]",name:"invalid.illegal.operator.python"},{comment:"We don't want `!` to flash when we're typing `!=`",match:"!\\b",name:"invalid.illegal.operator.python"}]},import:{comment:"Import statements used to correctly mark `from`, `import`, and `as`\n",patterns:[{begin:"\\b(?<!\\.)(from)\\b(?=.+import)",beginCaptures:{1:{name:"keyword.control.import.python"}},end:"$|(?=import)",patterns:[{match:"\\.+",name:"punctuation.separator.period.python"},{include:"#expression"}]},{begin:"\\b(?<!\\.)(import)\\b",beginCaptures:{1:{name:"keyword.control.import.python"}},end:"$",patterns:[{match:"\\b(?<!\\.)as\\b",name:"keyword.control.import.python"},{include:"#expression"}]}]},impossible:{comment:"This is a special rule that should be used where no match is desired. It is not a good idea to match something like '1{0}' because in some cases that can result in infinite loops in token generation. So the rule instead matches and impossible expression to allow a match to fail and move to the next token.",match:"$.^"},"inheritance-identifier":{captures:{1:{name:"entity.other.inherited-class.python"}},match:`(?x)
234
+ \\b ([[:alpha:]_]\\w*) \\b
235
+ `},"inheritance-name":{patterns:[{include:"#lambda-incomplete"},{include:"#builtin-possible-callables"},{include:"#inheritance-identifier"}]},"item-access":{patterns:[{begin:`(?x)
236
+ \\b(?=
237
+ [[:alpha:]_]\\w* \\s* \\[
238
+ )
239
+ `,end:"(\\])",endCaptures:{1:{name:"punctuation.definition.arguments.end.python"}},name:"meta.item-access.python",patterns:[{include:"#item-name"},{include:"#item-index"},{include:"#expression"}]}]},"item-index":{begin:"(\\[)",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.python"}},contentName:"meta.item-access.arguments.python",end:"(?=\\])",patterns:[{match:":",name:"punctuation.separator.slice.python"},{include:"#expression"}]},"item-name":{patterns:[{include:"#special-variables"},{include:"#builtin-functions"},{include:"#special-names"},{match:`(?x)
240
+ \\b ([[:alpha:]_]\\w*) \\b
241
+ `,name:"meta.indexed-name.python"}]},lambda:{patterns:[{captures:{1:{name:"keyword.control.flow.python"}},match:"((?<=\\.)lambda|lambda(?=\\s*[\\.=]))"},{captures:{1:{name:"storage.type.function.lambda.python"}},match:"\\b(lambda)\\s*?(?=[,\\n]|$)"},{begin:`(?x)
242
+ \\b (lambda) \\b
243
+ `,beginCaptures:{1:{name:"storage.type.function.lambda.python"}},contentName:"meta.function.lambda.parameters.python",end:"(:)|(\\n)",endCaptures:{1:{name:"punctuation.section.function.lambda.begin.python"}},name:"meta.lambda-function.python",patterns:[{match:"\\b(owned|borrowed|inout)\\b",name:"storage.modifier"},{match:"/",name:"keyword.operator.positional.parameter.python"},{match:"(\\*\\*|\\*)",name:"keyword.operator.unpacking.parameter.python"},{include:"#lambda-nested-incomplete"},{include:"#illegal-names"},{captures:{1:{name:"variable.parameter.function.language.python"},2:{name:"punctuation.separator.parameters.python"}},match:"([[:alpha:]_]\\w*)\\s*(?:(,)|(?=:|$))"},{include:"#comments"},{include:"#backticks"},{include:"#illegal-anno"},{include:"#lambda-parameter-with-default"},{include:"#line-continuation"},{include:"#illegal-operator"}]}]},"lambda-incomplete":{match:"\\blambda(?=\\s*[,)])",name:"storage.type.function.lambda.python"},"lambda-nested-incomplete":{match:"\\blambda(?=\\s*[:,)])",name:"storage.type.function.lambda.python"},"lambda-parameter-with-default":{begin:`(?x)
244
+ \\b
245
+ ([[:alpha:]_]\\w*) \\s* (=)
246
+ `,beginCaptures:{1:{name:"variable.parameter.function.language.python"},2:{name:"keyword.operator.python"}},end:"(,)|(?=:|$)",endCaptures:{1:{name:"punctuation.separator.parameters.python"}},patterns:[{include:"#expression"}]},"line-continuation":{patterns:[{captures:{1:{name:"punctuation.separator.continuation.line.python"},2:{name:"invalid.illegal.line.continuation.python"}},match:"(\\\\)\\s*(\\S.*$\\n?)"},{begin:"(\\\\)\\s*$\\n?",beginCaptures:{1:{name:"punctuation.separator.continuation.line.python"}},end:`(?x)
247
+ (?=^\\s*$)
248
+ |
249
+ (?! (\\s* [rR]? (\\'\\'\\'|\\"\\"\\"|\\'|\\"))
250
+ |
251
+ (\\G $) (?# '\\G' is necessary for ST)
252
+ )
253
+ `,patterns:[{include:"#regexp"},{include:"#string"}]}]},list:{begin:"\\[",beginCaptures:{0:{name:"punctuation.definition.list.begin.python"}},end:"\\]",endCaptures:{0:{name:"punctuation.definition.list.end.python"}},patterns:[{include:"#expression"}]},literal:{patterns:[{match:"\\b(True|False|None|NotImplemented|Ellipsis)\\b",name:"constant.language.python"},{include:"#number"}]},"loose-default":{begin:"(=)",beginCaptures:{1:{name:"keyword.operator.python"}},end:"(,)|(?=\\))",endCaptures:{1:{name:"punctuation.separator.parameters.python"}},patterns:[{include:"#expression"}]},"magic-function-names":{captures:{1:{name:"support.function.magic.python"}},comment:`these methods have magic interpretation by python and are generally called
254
+ indirectly through syntactic constructs
255
+ `,match:`(?x)
256
+ \\b(
257
+ __(?:
258
+ abs | add | aenter | aexit | aiter | and | anext
259
+ | await | bool | call | ceil | class_getitem
260
+ | cmp | coerce | complex | contains | copy
261
+ | deepcopy | del | delattr | delete | delitem
262
+ | delslice | dir | div | divmod | enter | eq
263
+ | exit | float | floor | floordiv | format | ge
264
+ | get | getattr | getattribute | getinitargs
265
+ | getitem | getnewargs | getslice | getstate | gt
266
+ | hash | hex | iadd | iand | idiv | ifloordiv |
267
+ | ilshift | imod | imul | index | init
268
+ | instancecheck | int | invert | ior | ipow
269
+ | irshift | isub | iter | itruediv | ixor | le
270
+ | len | long | lshift | lt | missing | mod | mul
271
+ | ne | neg | new | next | nonzero | oct | or | pos
272
+ | pow | radd | rand | rdiv | rdivmod | reduce
273
+ | reduce_ex | repr | reversed | rfloordiv |
274
+ | rlshift | rmod | rmul | ror | round | rpow
275
+ | rrshift | rshift | rsub | rtruediv | rxor | set
276
+ | setattr | setitem | set_name | setslice
277
+ | setstate | sizeof | str | sub | subclasscheck
278
+ | truediv | trunc | unicode | xor | matmul
279
+ | rmatmul | imatmul | init_subclass | set_name
280
+ | fspath | bytes | prepare | length_hint
281
+ )__
282
+ )\\b
283
+ `},"magic-names":{patterns:[{include:"#magic-function-names"},{include:"#magic-variable-names"}]},"magic-variable-names":{captures:{1:{name:"support.variable.magic.python"}},comment:"magic variables which a class/module may have.",match:`(?x)
284
+ \\b(
285
+ __(?:
286
+ all | annotations | bases | builtins | class
287
+ | struct
288
+ | trait
289
+ | closure | code | debug | defaults | dict | doc | file | func
290
+ | globals | kwdefaults | match_args | members | metaclass | methods
291
+ | module | mro | mro_entries | name | qualname | post_init | self
292
+ | signature | slots | subclasses | version | weakref | wrapped
293
+ | classcell | spec | path | package | future | traceback
294
+ )__
295
+ )\\b
296
+ `},"member-access":{begin:"(\\.)\\s*(?!\\.)",beginCaptures:{1:{name:"punctuation.separator.period.python"}},end:`(?x)
297
+
298
+
299
+ (?<=\\S)(?=\\W) |
300
+
301
+
302
+ (^|(?<=\\s))(?=[^\\\\\\w\\s]) |
303
+ $
304
+ `,name:"meta.member.access.python",patterns:[{include:"#function-call"},{include:"#member-access-base"},{include:"#member-access-attribute"}]},"member-access-attribute":{comment:"Highlight attribute access in otherwise non-specialized cases.",match:`(?x)
305
+ \\b ([[:alpha:]_]\\w*) \\b
306
+ `,name:"meta.attribute.python"},"member-access-base":{patterns:[{include:"#magic-names"},{include:"#illegal-names"},{include:"#illegal-object-name"},{include:"#special-names"},{include:"#line-continuation"},{include:"#item-access"}]},"member-access-class":{begin:"(\\.)\\s*(?!\\.)",beginCaptures:{1:{name:"punctuation.separator.period.python"}},end:"(?<=\\S)(?=\\W)|$",name:"meta.member.access.python",patterns:[{include:"#call-wrapper-inheritance"},{include:"#member-access-base"},{include:"#inheritance-identifier"}]},meta_parameters:{begin:"(\\[)",beginCaptures:{1:{name:"punctuation.definition.parameters.begin.python"}},end:"(\\])",endCaptures:{1:{name:"punctuation.definition.parameters.end.python"}},name:"meta.function.parameters.python",patterns:[{begin:`(?x)
307
+ \\b
308
+ ([[:alpha:]_]\\w*) \\s* (:)
309
+ `,beginCaptures:{1:{name:"variable.parameter.function.language.python"},2:{name:"punctuation.separator.annotation.python"}},end:"(,)|(?=\\])",endCaptures:{1:{name:"punctuation.separator.parameters.python"}},patterns:[{include:"#expression"}]},{include:"#comments"}]},number:{name:"constant.numeric.python",patterns:[{include:"#number-float"},{include:"#number-dec"},{include:"#number-hex"},{include:"#number-oct"},{include:"#number-bin"},{include:"#number-long"},{match:"\\b[0-9]+\\w+",name:"invalid.illegal.name.python"}]},"number-bin":{captures:{1:{name:"storage.type.number.python"}},match:`(?x)
310
+ (?<![\\w\\.])
311
+ (0[bB]) (_?[01])+
312
+ \\b
313
+ `,name:"constant.numeric.bin.python"},"number-dec":{captures:{1:{name:"storage.type.imaginary.number.python"},2:{name:"invalid.illegal.dec.python"}},match:`(?x)
314
+ (?<![\\w\\.])(?:
315
+ [1-9](?: _?[0-9] )*
316
+ |
317
+ 0+
318
+ |
319
+ [0-9](?: _?[0-9] )* ([jJ])
320
+ |
321
+ 0 ([0-9]+)(?![eE\\.])
322
+ )\\b
323
+ `,name:"constant.numeric.dec.python"},"number-float":{captures:{1:{name:"storage.type.imaginary.number.python"}},match:`(?x)
324
+ (?<! \\w)(?:
325
+ (?:
326
+ \\.[0-9](?: _?[0-9] )*
327
+ |
328
+ [0-9](?: _?[0-9] )* \\. [0-9](?: _?[0-9] )*
329
+ |
330
+ [0-9](?: _?[0-9] )* \\.
331
+ ) (?: [eE][+-]?[0-9](?: _?[0-9] )* )?
332
+ |
333
+ [0-9](?: _?[0-9] )* (?: [eE][+-]?[0-9](?: _?[0-9] )* )
334
+ )([jJ])?\\b
335
+ `,name:"constant.numeric.float.python"},"number-hex":{captures:{1:{name:"storage.type.number.python"}},match:`(?x)
336
+ (?<![\\w\\.])
337
+ (0[xX]) (_?[0-9a-fA-F])+
338
+ \\b
339
+ `,name:"constant.numeric.hex.python"},"number-long":{captures:{2:{name:"storage.type.number.python"}},comment:"this is to support python2 syntax for long ints",match:`(?x)
340
+ (?<![\\w\\.])
341
+ ([1-9][0-9]* | 0) ([lL])
342
+ \\b
343
+ `,name:"constant.numeric.bin.python"},"number-oct":{captures:{1:{name:"storage.type.number.python"}},match:`(?x)
344
+ (?<![\\w\\.])
345
+ (0[oO]) (_?[0-7])+
346
+ \\b
347
+ `,name:"constant.numeric.oct.python"},"odd-function-call":{begin:`(?x)
348
+ (?<= \\] | \\) ) \\s*
349
+ (?=\\()
350
+ `,comment:`A bit obscured function call where there may have been an
351
+ arbitrary number of other operations to get the function.
352
+ E.g. "arr[idx](args)"
353
+ `,end:"(\\))",endCaptures:{1:{name:"punctuation.definition.arguments.end.python"}},patterns:[{include:"#function-arguments"}]},operator:{captures:{1:{name:"keyword.operator.logical.python"},2:{name:"keyword.control.flow.python"},3:{name:"keyword.operator.bitwise.python"},4:{name:"keyword.operator.arithmetic.python"},5:{name:"keyword.operator.comparison.python"},6:{name:"keyword.operator.assignment.python"}},match:`(?x)
354
+ \\b(?<!\\.)
355
+ (?:
356
+ (and | or | not | in | is) (?# 1)
357
+ |
358
+ (for | if | else | await | (?:yield(?:\\s+from)?)) (?# 2)
359
+ )
360
+ (?!\\s*:)\\b
361
+
362
+ | (<< | >> | & | \\| | \\^ | ~) (?# 3)
363
+
364
+ | (\\*\\* | \\* | \\+ | - | % | // | / | @) (?# 4)
365
+
366
+ | (!= | == | >= | <= | < | >) (?# 5)
367
+
368
+ | (:=) (?# 6)
369
+ `},"parameter-special":{captures:{1:{name:"variable.parameter.function.language.python"},2:{name:"variable.parameter.function.language.special.self.python"},3:{name:"variable.parameter.function.language.special.cls.python"},4:{name:"punctuation.separator.parameters.python"}},match:`(?x)
370
+ \\b ((self)|(cls)) \\b \\s*(?:(,)|(?=\\)))
371
+ `},parameters:{begin:"(\\()",beginCaptures:{1:{name:"punctuation.definition.parameters.begin.python"}},end:"(\\))",endCaptures:{1:{name:"punctuation.definition.parameters.end.python"}},name:"meta.function.parameters.python",patterns:[{match:"\\b(owned|borrowed|inout)\\b",name:"storage.modifier"},{match:"/",name:"keyword.operator.positional.parameter.python"},{match:"(\\*\\*|\\*)",name:"keyword.operator.unpacking.parameter.python"},{include:"#lambda-incomplete"},{include:"#illegal-names"},{include:"#illegal-object-name"},{include:"#parameter-special"},{captures:{1:{name:"variable.parameter.function.language.python"},2:{name:"punctuation.separator.parameters.python"}},match:`(?x)
372
+ ([[:alpha:]_]\\w*)
373
+ \\s* (?: (,) | (?=[)#\\n=]))
374
+ `},{include:"#comments"},{include:"#loose-default"},{include:"#annotated-parameter"}]},punctuation:{patterns:[{match:":",name:"punctuation.separator.colon.python"},{match:",",name:"punctuation.separator.element.python"}]},"raises-modifier":{match:"(raises)",name:"storage.modifier"},regexp:{patterns:[{include:"#regexp-single-three-line"},{include:"#regexp-double-three-line"},{include:"#regexp-single-one-line"},{include:"#regexp-double-one-line"}]},"regexp-backreference":{captures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.begin.regexp"},2:{name:"entity.name.tag.named.backreference.regexp"},3:{name:"support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp"}},match:`(?x)
375
+ (\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))
376
+ `,name:"meta.backreference.named.regexp"},"regexp-backreference-number":{captures:{1:{name:"entity.name.tag.backreference.regexp"}},match:"(\\\\[1-9]\\d?)",name:"meta.backreference.regexp"},"regexp-base-common":{patterns:[{match:"\\.",name:"support.other.match.any.regexp"},{match:"\\^",name:"support.other.match.begin.regexp"},{match:"\\$",name:"support.other.match.end.regexp"},{match:"[+*?]\\??",name:"keyword.operator.quantifier.regexp"},{match:"\\|",name:"keyword.operator.disjunction.regexp"},{include:"#regexp-escape-sequence"}]},"regexp-base-expression":{patterns:[{include:"#regexp-quantifier"},{include:"#regexp-base-common"}]},"regexp-charecter-set-escapes":{patterns:[{match:"\\\\[abfnrtv\\\\]",name:"constant.character.escape.regexp"},{include:"#regexp-escape-special"},{match:"\\\\([0-7]{1,3})",name:"constant.character.escape.regexp"},{include:"#regexp-escape-character"},{include:"#regexp-escape-unicode"},{include:"#regexp-escape-catchall"}]},"regexp-double-one-line":{begin:'\\b(([uU]r)|([bB]r)|(r[bB]?))(")',beginCaptures:{2:{name:"invalid.deprecated.prefix.python"},3:{name:"storage.type.string.python"},4:{name:"storage.type.string.python"},5:{name:"punctuation.definition.string.begin.python"}},end:'(")|(?<!\\\\)(\\n)',endCaptures:{1:{name:"punctuation.definition.string.end.python"},2:{name:"invalid.illegal.newline.python"}},name:"string.regexp.quoted.single.python",patterns:[{include:"#double-one-regexp-expression"}]},"regexp-double-three-line":{begin:'\\b(([uU]r)|([bB]r)|(r[bB]?))(""")',beginCaptures:{2:{name:"invalid.deprecated.prefix.python"},3:{name:"storage.type.string.python"},4:{name:"storage.type.string.python"},5:{name:"punctuation.definition.string.begin.python"}},end:'(""")',endCaptures:{1:{name:"punctuation.definition.string.end.python"},2:{name:"invalid.illegal.newline.python"}},name:"string.regexp.quoted.multi.python",patterns:[{include:"#double-three-regexp-expression"}]},"regexp-escape-catchall":{match:"\\\\(.|\\n)",name:"constant.character.escape.regexp"},"regexp-escape-character":{match:`(?x)
377
+ \\\\ (
378
+ x[0-9A-Fa-f]{2}
379
+ | 0[0-7]{1,2}
380
+ | [0-7]{3}
381
+ )
382
+ `,name:"constant.character.escape.regexp"},"regexp-escape-sequence":{patterns:[{include:"#regexp-escape-special"},{include:"#regexp-escape-character"},{include:"#regexp-escape-unicode"},{include:"#regexp-backreference-number"},{include:"#regexp-escape-catchall"}]},"regexp-escape-special":{match:"\\\\([AbBdDsSwWZ])",name:"support.other.escape.special.regexp"},"regexp-escape-unicode":{match:`(?x)
383
+ \\\\ (
384
+ u[0-9A-Fa-f]{4}
385
+ | U[0-9A-Fa-f]{8}
386
+ )
387
+ `,name:"constant.character.unicode.regexp"},"regexp-flags":{match:"\\(\\?[aiLmsux]+\\)",name:"storage.modifier.flag.regexp"},"regexp-quantifier":{match:`(?x)
388
+ \\{(
389
+ \\d+ | \\d+,(\\d+)? | ,\\d+
390
+ )\\}
391
+ `,name:"keyword.operator.quantifier.regexp"},"regexp-single-one-line":{begin:"\\b(([uU]r)|([bB]r)|(r[bB]?))(\\')",beginCaptures:{2:{name:"invalid.deprecated.prefix.python"},3:{name:"storage.type.string.python"},4:{name:"storage.type.string.python"},5:{name:"punctuation.definition.string.begin.python"}},end:"(\\')|(?<!\\\\)(\\n)",endCaptures:{1:{name:"punctuation.definition.string.end.python"},2:{name:"invalid.illegal.newline.python"}},name:"string.regexp.quoted.single.python",patterns:[{include:"#single-one-regexp-expression"}]},"regexp-single-three-line":{begin:"\\b(([uU]r)|([bB]r)|(r[bB]?))(\\'\\'\\')",beginCaptures:{2:{name:"invalid.deprecated.prefix.python"},3:{name:"storage.type.string.python"},4:{name:"storage.type.string.python"},5:{name:"punctuation.definition.string.begin.python"}},end:"(\\'\\'\\')",endCaptures:{1:{name:"punctuation.definition.string.end.python"},2:{name:"invalid.illegal.newline.python"}},name:"string.regexp.quoted.multi.python",patterns:[{include:"#single-three-regexp-expression"}]},"return-annotation":{begin:"(->)",beginCaptures:{1:{name:"punctuation.separator.annotation.result.python"}},end:"(?=:)",patterns:[{include:"#expression"}]},"round-braces":{begin:"\\(",beginCaptures:{0:{name:"punctuation.parenthesis.begin.python"}},end:"\\)",endCaptures:{0:{name:"punctuation.parenthesis.end.python"}},patterns:[{include:"#expression"}]},semicolon:{patterns:[{match:"\\;$",name:"invalid.deprecated.semicolon.python"}]},"single-one-regexp-character-set":{patterns:[{match:`(?x)
392
+ \\[ \\^? \\] (?! .*?\\])
393
+ `},{begin:"(\\[)(\\^)?(\\])?",beginCaptures:{1:{name:"punctuation.character.set.begin.regexp constant.other.set.regexp"},2:{name:"keyword.operator.negation.regexp"},3:{name:"constant.character.set.regexp"}},end:"(\\]|(?=\\'))|((?=(?<!\\\\)\\n))",endCaptures:{1:{name:"punctuation.character.set.end.regexp constant.other.set.regexp"},2:{name:"invalid.illegal.newline.python"}},name:"meta.character.set.regexp",patterns:[{include:"#regexp-charecter-set-escapes"},{match:"[^\\n]",name:"constant.character.set.regexp"}]}]},"single-one-regexp-comments":{begin:"\\(\\?#",beginCaptures:{0:{name:"punctuation.comment.begin.regexp"}},end:"(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",endCaptures:{1:{name:"punctuation.comment.end.regexp"},2:{name:"invalid.illegal.newline.python"}},name:"comment.regexp",patterns:[{include:"#codetags"}]},"single-one-regexp-conditional":{begin:"(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",beginCaptures:{0:{name:"keyword.operator.conditional.regexp"},1:{name:"punctuation.parenthesis.conditional.begin.regexp"}},end:"(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",endCaptures:{1:{name:"keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-one-regexp-expression"}]},"single-one-regexp-expression":{patterns:[{include:"#regexp-base-expression"},{include:"#single-one-regexp-character-set"},{include:"#single-one-regexp-comments"},{include:"#regexp-flags"},{include:"#single-one-regexp-named-group"},{include:"#regexp-backreference"},{include:"#single-one-regexp-lookahead"},{include:"#single-one-regexp-lookahead-negative"},{include:"#single-one-regexp-lookbehind"},{include:"#single-one-regexp-lookbehind-negative"},{include:"#single-one-regexp-conditional"},{include:"#single-one-regexp-parentheses-non-capturing"},{include:"#single-one-regexp-parentheses"}]},"single-one-regexp-lookahead":{begin:"(\\()\\?=",beginCaptures:{0:{name:"keyword.operator.lookahead.regexp"},1:{name:"punctuation.parenthesis.lookahead.begin.regexp"}},end:"(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",endCaptures:{1:{name:"keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-one-regexp-expression"}]},"single-one-regexp-lookahead-negative":{begin:"(\\()\\?!",beginCaptures:{0:{name:"keyword.operator.lookahead.negative.regexp"},1:{name:"punctuation.parenthesis.lookahead.begin.regexp"}},end:"(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",endCaptures:{1:{name:"keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-one-regexp-expression"}]},"single-one-regexp-lookbehind":{begin:"(\\()\\?<=",beginCaptures:{0:{name:"keyword.operator.lookbehind.regexp"},1:{name:"punctuation.parenthesis.lookbehind.begin.regexp"}},end:"(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",endCaptures:{1:{name:"keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-one-regexp-expression"}]},"single-one-regexp-lookbehind-negative":{begin:"(\\()\\?<!",beginCaptures:{0:{name:"keyword.operator.lookbehind.negative.regexp"},1:{name:"punctuation.parenthesis.lookbehind.begin.regexp"}},end:"(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",endCaptures:{1:{name:"keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-one-regexp-expression"}]},"single-one-regexp-named-group":{begin:`(?x)
394
+ (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)
395
+ `,beginCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"},2:{name:"entity.name.tag.named.group.regexp"}},end:"(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",endCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"},2:{name:"invalid.illegal.newline.python"}},name:"meta.named.regexp",patterns:[{include:"#single-one-regexp-expression"}]},"single-one-regexp-parentheses":{begin:"\\(",beginCaptures:{0:{name:"support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"}},end:"(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",endCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-one-regexp-expression"}]},"single-one-regexp-parentheses-non-capturing":{begin:"\\(\\?:",beginCaptures:{0:{name:"support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"}},end:"(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",endCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-one-regexp-expression"}]},"single-three-regexp-character-set":{patterns:[{match:`(?x)
396
+ \\[ \\^? \\] (?! .*?\\])
397
+ `},{begin:"(\\[)(\\^)?(\\])?",beginCaptures:{1:{name:"punctuation.character.set.begin.regexp constant.other.set.regexp"},2:{name:"keyword.operator.negation.regexp"},3:{name:"constant.character.set.regexp"}},end:"(\\]|(?=\\'\\'\\'))",endCaptures:{1:{name:"punctuation.character.set.end.regexp constant.other.set.regexp"},2:{name:"invalid.illegal.newline.python"}},name:"meta.character.set.regexp",patterns:[{include:"#regexp-charecter-set-escapes"},{match:"[^\\n]",name:"constant.character.set.regexp"}]}]},"single-three-regexp-comments":{begin:"\\(\\?#",beginCaptures:{0:{name:"punctuation.comment.begin.regexp"}},end:"(\\)|(?=\\'\\'\\'))",endCaptures:{1:{name:"punctuation.comment.end.regexp"},2:{name:"invalid.illegal.newline.python"}},name:"comment.regexp",patterns:[{include:"#codetags"}]},"single-three-regexp-conditional":{begin:"(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",beginCaptures:{0:{name:"keyword.operator.conditional.regexp"},1:{name:"punctuation.parenthesis.conditional.begin.regexp"}},end:"(\\)|(?=\\'\\'\\'))",endCaptures:{1:{name:"keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-three-regexp-expression"},{include:"#comments-string-single-three"}]},"single-three-regexp-expression":{patterns:[{include:"#regexp-base-expression"},{include:"#single-three-regexp-character-set"},{include:"#single-three-regexp-comments"},{include:"#regexp-flags"},{include:"#single-three-regexp-named-group"},{include:"#regexp-backreference"},{include:"#single-three-regexp-lookahead"},{include:"#single-three-regexp-lookahead-negative"},{include:"#single-three-regexp-lookbehind"},{include:"#single-three-regexp-lookbehind-negative"},{include:"#single-three-regexp-conditional"},{include:"#single-three-regexp-parentheses-non-capturing"},{include:"#single-three-regexp-parentheses"},{include:"#comments-string-single-three"}]},"single-three-regexp-lookahead":{begin:"(\\()\\?=",beginCaptures:{0:{name:"keyword.operator.lookahead.regexp"},1:{name:"punctuation.parenthesis.lookahead.begin.regexp"}},end:"(\\)|(?=\\'\\'\\'))",endCaptures:{1:{name:"keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-three-regexp-expression"},{include:"#comments-string-single-three"}]},"single-three-regexp-lookahead-negative":{begin:"(\\()\\?!",beginCaptures:{0:{name:"keyword.operator.lookahead.negative.regexp"},1:{name:"punctuation.parenthesis.lookahead.begin.regexp"}},end:"(\\)|(?=\\'\\'\\'))",endCaptures:{1:{name:"keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-three-regexp-expression"},{include:"#comments-string-single-three"}]},"single-three-regexp-lookbehind":{begin:"(\\()\\?<=",beginCaptures:{0:{name:"keyword.operator.lookbehind.regexp"},1:{name:"punctuation.parenthesis.lookbehind.begin.regexp"}},end:"(\\)|(?=\\'\\'\\'))",endCaptures:{1:{name:"keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-three-regexp-expression"},{include:"#comments-string-single-three"}]},"single-three-regexp-lookbehind-negative":{begin:"(\\()\\?<!",beginCaptures:{0:{name:"keyword.operator.lookbehind.negative.regexp"},1:{name:"punctuation.parenthesis.lookbehind.begin.regexp"}},end:"(\\)|(?=\\'\\'\\'))",endCaptures:{1:{name:"keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-three-regexp-expression"},{include:"#comments-string-single-three"}]},"single-three-regexp-named-group":{begin:`(?x)
398
+ (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)
399
+ `,beginCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"},2:{name:"entity.name.tag.named.group.regexp"}},end:"(\\)|(?=\\'\\'\\'))",endCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"},2:{name:"invalid.illegal.newline.python"}},name:"meta.named.regexp",patterns:[{include:"#single-three-regexp-expression"},{include:"#comments-string-single-three"}]},"single-three-regexp-parentheses":{begin:"\\(",beginCaptures:{0:{name:"support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"}},end:"(\\)|(?=\\'\\'\\'))",endCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-three-regexp-expression"},{include:"#comments-string-single-three"}]},"single-three-regexp-parentheses-non-capturing":{begin:"\\(\\?:",beginCaptures:{0:{name:"support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"}},end:"(\\)|(?=\\'\\'\\'))",endCaptures:{1:{name:"support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"},2:{name:"invalid.illegal.newline.python"}},patterns:[{include:"#single-three-regexp-expression"},{include:"#comments-string-single-three"}]},"special-names":{match:`(?x)
400
+ \\b
401
+
402
+
403
+
404
+
405
+
406
+ (
407
+ _* [[:upper:]] [_\\d]* [[:upper:]]
408
+ )
409
+ [[:upper:]\\d]* (_\\w*)?
410
+ \\b
411
+ `,name:"constant.other.caps.python"},"special-variables":{captures:{1:{name:"variable.language.special.self.python"},2:{name:"variable.language.special.cls.python"}},match:`(?x)
412
+ \\b (?<!\\.) (?:
413
+ (self) | (cls)
414
+ )\\b
415
+ `},statement:{patterns:[{include:"#import"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#generator"},{include:"#statement-keyword"},{include:"#assignment-operator"},{include:"#decorator"},{include:"#semicolon"}]},"statement-keyword":{patterns:[{match:"\\b((async\\s+)?\\s*def)\\b",name:"storage.type.function.python"},{comment:`if \`as\` is eventually followed by \`:\` or line continuation
416
+ it's probably control flow like:
417
+ with foo as bar, \\
418
+ Foo as Bar:
419
+ try:
420
+ do_stuff()
421
+ except Exception as e:
422
+ pass
423
+ `,match:"\\b(?<!\\.)as\\b(?=.*[:\\\\])",name:"keyword.control.flow.python"},{comment:"other legal use of `as` is in an import",match:"\\b(?<!\\.)as\\b",name:"keyword.control.import.python"},{match:`(?x)
424
+ \\b(?<!\\.)(
425
+ async | continue | del | assert | break | finally | for
426
+ | from | elif | else | if | except | pass | raise
427
+ | return | try | while | with
428
+ )\\b
429
+ `,name:"keyword.control.flow.python"},{match:`(?x)
430
+ \\b(?<!\\.)(
431
+ global | nonlocal
432
+ )\\b
433
+ `,name:"storage.modifier.declaration.python"},{match:"\\b(?<!\\.)(class|struct|trait)\\b",name:"storage.type.class.python"},{captures:{1:{name:"keyword.control.flow.python"}},match:`(?x)
434
+ ^\\s*(
435
+ case | match
436
+ )(?=\\s*([-+\\w\\d(\\[{'":#]|$))\\b
437
+ `},{captures:{1:{name:"storage.modifier.declaration.python"},2:{name:"variable.other.python"}},match:"\\b(var|let|alias) \\s*([[:alpha:]_]\\w*)\\b"}]},string:{patterns:[{include:"#string-quoted-multi-line"},{include:"#string-quoted-single-line"},{include:"#string-bin-quoted-multi-line"},{include:"#string-bin-quoted-single-line"},{include:"#string-raw-quoted-multi-line"},{include:"#string-raw-quoted-single-line"},{include:"#string-raw-bin-quoted-multi-line"},{include:"#string-raw-bin-quoted-single-line"},{include:"#fstring-fnorm-quoted-multi-line"},{include:"#fstring-fnorm-quoted-single-line"},{include:"#fstring-normf-quoted-multi-line"},{include:"#fstring-normf-quoted-single-line"},{include:"#fstring-raw-quoted-multi-line"},{include:"#fstring-raw-quoted-single-line"}]},"string-bin-quoted-multi-line":{begin:`(\\b[bB])('''|""")`,beginCaptures:{1:{name:"storage.type.string.python"},2:{name:"punctuation.definition.string.begin.python"}},end:"(\\2)",endCaptures:{1:{name:"punctuation.definition.string.end.python"},2:{name:"invalid.illegal.newline.python"}},name:"string.quoted.binary.multi.python",patterns:[{include:"#string-entity"}]},"string-bin-quoted-single-line":{begin:`(\\b[bB])((['"]))`,beginCaptures:{1:{name:"storage.type.string.python"},2:{name:"punctuation.definition.string.begin.python"}},end:"(\\2)|((?<!\\\\)\\n)",endCaptures:{1:{name:"punctuation.definition.string.end.python"},2:{name:"invalid.illegal.newline.python"}},name:"string.quoted.binary.single.python",patterns:[{include:"#string-entity"}]},"string-brace-formatting":{patterns:[{captures:{1:{name:"constant.character.format.placeholder.other.python"},3:{name:"storage.type.format.python"},4:{name:"storage.type.format.python"}},match:`(?x)
438
+ (
439
+ {{ | }}
440
+ | (?:
441
+ {
442
+ \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'"]+\\])*
443
+ (![rsa])?
444
+ ( : \\w? [<>=^]? [-+ ]? \\#?
445
+ \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?
446
+ })
447
+ )
448
+ `,name:"meta.format.brace.python"},{captures:{1:{name:"constant.character.format.placeholder.other.python"},3:{name:"storage.type.format.python"},4:{name:"storage.type.format.python"}},match:`(?x)
449
+ (
450
+ {
451
+ \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'"]+\\])*
452
+ (![rsa])?
453
+ (:)
454
+ [^'"{}\\n]* (?:
455
+ \\{ [^'"}\\n]*? \\} [^'"{}\\n]*
456
+ )*
457
+ }
458
+ )
459
+ `,name:"meta.format.brace.python"}]},"string-consume-escape":{match:`\\\\['"\\n\\\\]`},"string-entity":{patterns:[{include:"#escape-sequence"},{include:"#string-line-continuation"},{include:"#string-formatting"}]},"string-formatting":{captures:{1:{name:"constant.character.format.placeholder.other.python"}},match:`(?x)
460
+ (
461
+ % (\\([\\w\\s]*\\))?
462
+ [-+#0 ]*
463
+ (\\d+|\\*)? (\\.(\\d+|\\*))?
464
+ ([hlL])?
465
+ [diouxXeEfFgGcrsab%]
466
+ )
467
+ `,name:"meta.format.percent.python"},"string-line-continuation":{match:"\\\\$",name:"constant.language.python"},"string-mojo-code-block":{begin:"^(\\s*\\`{3,})(mojo)$",beginCaptures:{1:{name:"string.quoted.single.python"},2:{name:"string.quoted.single.python"}},contentName:"source.mojo",end:"^(\\1)$",endCaptures:{1:{name:"string.quoted.single.python"}},name:"meta.embedded.block.mojo",patterns:[{include:"source.mojo"}]},"string-multi-bad-brace1-formatting-raw":{begin:`(?x)
468
+ (?= \\{%
469
+ ( .*? (?!'''|""") )
470
+ %\\}
471
+ )
472
+ `,comment:"template using {% ... %}",end:`(?='''|""")`,patterns:[{include:"#string-consume-escape"}]},"string-multi-bad-brace1-formatting-unicode":{begin:`(?x)
473
+ (?= \\{%
474
+ ( .*? (?!'''|""") )
475
+ %\\}
476
+ )
477
+ `,comment:"template using {% ... %}",end:`(?='''|""")`,patterns:[{include:"#escape-sequence-unicode"},{include:"#escape-sequence"},{include:"#string-line-continuation"}]},"string-multi-bad-brace2-formatting-raw":{begin:`(?x)
478
+ (?!\\{\\{)
479
+ (?= \\{ (
480
+ \\w*? (?!'''|""") [^!:\\.\\[}\\w]
481
+ )
482
+ .*?(?!'''|""")
483
+ \\}
484
+ )
485
+ `,comment:"odd format or format-like syntax",end:`(?='''|""")`,patterns:[{include:"#string-consume-escape"},{include:"#string-formatting"}]},"string-multi-bad-brace2-formatting-unicode":{begin:`(?x)
486
+ (?!\\{\\{)
487
+ (?= \\{ (
488
+ \\w*? (?!'''|""") [^!:\\.\\[}\\w]
489
+ )
490
+ .*?(?!'''|""")
491
+ \\}
492
+ )
493
+ `,comment:"odd format or format-like syntax",end:`(?='''|""")`,patterns:[{include:"#escape-sequence-unicode"},{include:"#string-entity"}]},"string-quoted-multi-line":{begin:`(?:\\b([rR])(?=[uU]))?([uU])?('''|""")`,beginCaptures:{1:{name:"invalid.illegal.prefix.python"},2:{name:"storage.type.string.python"},3:{name:"punctuation.definition.string.begin.python"}},end:"(\\3)",endCaptures:{1:{name:"punctuation.definition.string.end.python"},2:{name:"invalid.illegal.newline.python"}},name:"string.quoted.multi.python",patterns:[{include:"#string-multi-bad-brace1-formatting-unicode"},{include:"#string-multi-bad-brace2-formatting-unicode"},{include:"#string-unicode-guts"}]},"string-quoted-single-line":{begin:`(?:\\b([rR])(?=[uU]))?([uU])?((['"]))`,beginCaptures:{1:{name:"invalid.illegal.prefix.python"},2:{name:"storage.type.string.python"},3:{name:"punctuation.definition.string.begin.python"}},end:"(\\3)|((?<!\\\\)\\n)",endCaptures:{1:{name:"punctuation.definition.string.end.python"},2:{name:"invalid.illegal.newline.python"}},name:"string.quoted.single.python",patterns:[{include:"#string-single-bad-brace1-formatting-unicode"},{include:"#string-single-bad-brace2-formatting-unicode"},{include:"#string-unicode-guts"}]},"string-raw-bin-guts":{patterns:[{include:"#string-consume-escape"},{include:"#string-formatting"}]},"string-raw-bin-quoted-multi-line":{begin:`(\\b(?:R[bB]|[bB]R))('''|""")`,beginCaptures:{1:{name:"storage.type.string.python"},2:{name:"punctuation.definition.string.begin.python"}},end:"(\\2)",endCaptures:{1:{name:"punctuation.definition.string.end.python"},2:{name:"invalid.illegal.newline.python"}},name:"string.quoted.raw.binary.multi.python",patterns:[{include:"#string-raw-bin-guts"}]},"string-raw-bin-quoted-single-line":{begin:`(\\b(?:R[bB]|[bB]R))((['"]))`,beginCaptures:{1:{name:"storage.type.string.python"},2:{name:"punctuation.definition.string.begin.python"}},end:"(\\2)|((?<!\\\\)\\n)",endCaptures:{1:{name:"punctuation.definition.string.end.python"},2:{name:"invalid.illegal.newline.python"}},name:"string.quoted.raw.binary.single.python",patterns:[{include:"#string-raw-bin-guts"}]},"string-raw-guts":{patterns:[{include:"#string-consume-escape"},{include:"#string-formatting"},{include:"#string-brace-formatting"}]},"string-raw-quoted-multi-line":{begin:`\\b(([uU]R)|(R))('''|""")`,beginCaptures:{2:{name:"invalid.deprecated.prefix.python"},3:{name:"storage.type.string.python"},4:{name:"punctuation.definition.string.begin.python"}},end:"(\\4)",endCaptures:{1:{name:"punctuation.definition.string.end.python"},2:{name:"invalid.illegal.newline.python"}},name:"string.quoted.raw.multi.python",patterns:[{include:"#string-multi-bad-brace1-formatting-raw"},{include:"#string-multi-bad-brace2-formatting-raw"},{include:"#string-raw-guts"}]},"string-raw-quoted-single-line":{begin:`\\b(([uU]R)|(R))((['"]))`,beginCaptures:{2:{name:"invalid.deprecated.prefix.python"},3:{name:"storage.type.string.python"},4:{name:"punctuation.definition.string.begin.python"}},end:"(\\4)|((?<!\\\\)\\n)",endCaptures:{1:{name:"punctuation.definition.string.end.python"},2:{name:"invalid.illegal.newline.python"}},name:"string.quoted.raw.single.python",patterns:[{include:"#string-single-bad-brace1-formatting-raw"},{include:"#string-single-bad-brace2-formatting-raw"},{include:"#string-raw-guts"}]},"string-single-bad-brace1-formatting-raw":{begin:`(?x)
494
+ (?= \\{%
495
+ ( .*? (?!(['"])|((?<!\\\\)\\n)) )
496
+ %\\}
497
+ )
498
+ `,comment:"template using {% ... %}",end:`(?=(['"])|((?<!\\\\)\\n))`,patterns:[{include:"#string-consume-escape"}]},"string-single-bad-brace1-formatting-unicode":{begin:`(?x)
499
+ (?= \\{%
500
+ ( .*? (?!(['"])|((?<!\\\\)\\n)) )
501
+ %\\}
502
+ )
503
+ `,comment:"template using {% ... %}",end:`(?=(['"])|((?<!\\\\)\\n))`,patterns:[{include:"#escape-sequence-unicode"},{include:"#escape-sequence"},{include:"#string-line-continuation"}]},"string-single-bad-brace2-formatting-raw":{begin:`(?x)
504
+ (?!\\{\\{)
505
+ (?= \\{ (
506
+ \\w*? (?!(['"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]
507
+ )
508
+ .*?(?!(['"])|((?<!\\\\)\\n))
509
+ \\}
510
+ )
511
+ `,comment:"odd format or format-like syntax",end:`(?=(['"])|((?<!\\\\)\\n))`,patterns:[{include:"#string-consume-escape"},{include:"#string-formatting"}]},"string-single-bad-brace2-formatting-unicode":{begin:`(?x)
512
+ (?!\\{\\{)
513
+ (?= \\{ (
514
+ \\w*? (?!(['"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]
515
+ )
516
+ .*?(?!(['"])|((?<!\\\\)\\n))
517
+ \\}
518
+ )
519
+ `,comment:"odd format or format-like syntax",end:`(?=(['"])|((?<!\\\\)\\n))`,patterns:[{include:"#escape-sequence-unicode"},{include:"#string-entity"}]},"string-unicode-guts":{patterns:[{include:"#string-mojo-code-block"},{include:"#escape-sequence-unicode"},{include:"#string-entity"},{include:"#string-brace-formatting"}]}},scopeName:"source.mojo"});var n=[e];export{n as default};