@codingame/monaco-editor-wrapper 3.9.3 → 4.0.0-next.1

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 (537) hide show
  1. package/dist/C2Hs-configuration.json.js +3 -0
  2. package/dist/C2Hs.json.js +3 -0
  3. package/dist/COBOL.tmLanguage.json.js +3 -0
  4. package/dist/Erlang.plist.js +2 -1751
  5. package/dist/Hsc2Hs-configuration.json.js +3 -0
  6. package/dist/Hsc2Hs.json.js +3 -0
  7. package/dist/JavaProperties.tmLanguage.json.js +3 -0
  8. package/dist/Kotlin.tmLanguage.js +2 -723
  9. package/dist/META.json.js +3 -0
  10. package/dist/META.json2.js +3 -0
  11. package/dist/Markdown Redcarpet.json.js +3 -0
  12. package/dist/RMarkdown.json.js +3 -0
  13. package/dist/Rcpp.json.js +3 -0
  14. package/dist/Rd (R Documentation).json.js +3 -0
  15. package/dist/Scala.tmLanguage.json.js +3 -0
  16. package/dist/_commonjsHelpers.js +35 -0
  17. package/dist/_rollupPluginBabelHelpers.js +1 -1
  18. package/dist/add.svg.js +3 -0
  19. package/dist/add.svg2.js +3 -0
  20. package/dist/adddep-dark.svg.js +3 -0
  21. package/dist/adddep-light.svg.js +3 -0
  22. package/dist/alex.json.js +3 -0
  23. package/dist/angular-directives.json.js +3 -0
  24. package/dist/angular-interpolations.json.js +3 -0
  25. package/dist/angular-template-language-configuration.json.js +3 -0
  26. package/dist/arrow-circle-up-dark.svg.js +3 -0
  27. package/dist/arrow-circle-up-light.svg.js +3 -0
  28. package/dist/aspnetcorerazor.tmLanguage.json.js +3 -0
  29. package/dist/atd.json.js +3 -0
  30. package/dist/book-dark.svg.js +3 -0
  31. package/dist/book-light.svg.js +3 -0
  32. package/dist/book-open-dark.svg.js +3 -0
  33. package/dist/book-open-light.svg.js +3 -0
  34. package/dist/buildtarget.json.js +3 -0
  35. package/dist/cabal-configuration.json.js +3 -0
  36. package/dist/cabal.json.js +3 -0
  37. package/dist/codeblock-cabal.json.js +3 -0
  38. package/dist/codeblock-haskell.json.js +3 -0
  39. package/dist/codeblock-literate-haskell.json.js +3 -0
  40. package/dist/codeblock.json.js +3 -0
  41. package/dist/codeblock.json2.js +3 -0
  42. package/dist/configuration/index.d.ts +0 -1
  43. package/dist/cram.json.js +3 -0
  44. package/dist/csharp.json.js +3 -0
  45. package/dist/css.worker.js +1 -1
  46. package/dist/d.json.js +3 -0
  47. package/dist/d.json2.js +3 -0
  48. package/dist/dart-language-configuration.json.js +3 -0
  49. package/dist/dart.json.js +3 -0
  50. package/dist/dcf-configuration.json.js +3 -0
  51. package/dist/dcf.json.js +3 -0
  52. package/dist/diet.json.js +3 -0
  53. package/dist/diet.json2.js +3 -0
  54. package/dist/diet.json3.js +3 -0
  55. package/dist/django-html.tmLanguage.json.js +3 -0
  56. package/dist/django-txt.tmLanguage.json.js +3 -0
  57. package/dist/dml.json.js +3 -0
  58. package/dist/document-search-dark.svg.js +3 -0
  59. package/dist/document-search-light.svg.js +3 -0
  60. package/dist/documentation-inverse.svg.js +3 -0
  61. package/dist/documentation.svg.js +3 -0
  62. package/dist/dub-convert-inverse.svg.js +3 -0
  63. package/dist/dub-convert.svg.js +3 -0
  64. package/dist/dune-project.json.js +3 -0
  65. package/dist/dune-project.json2.js +3 -0
  66. package/dist/dune-workspace.json.js +3 -0
  67. package/dist/dune.json.js +3 -0
  68. package/dist/dune.json2.js +3 -0
  69. package/dist/dune.json3.js +3 -0
  70. package/dist/edit-dub-inverse.svg.js +3 -0
  71. package/dist/edit-dub.svg.js +3 -0
  72. package/dist/edit-source-inverse.svg.js +3 -0
  73. package/dist/edit-source.svg.js +3 -0
  74. package/dist/eex-language-configuration.json.js +3 -0
  75. package/dist/eex.json.js +3 -0
  76. package/dist/elixir-language-configuration.json.js +3 -0
  77. package/dist/elixir.json.js +3 -0
  78. package/dist/erlang.configuration.json.js +3 -0
  79. package/dist/erlang.json.js +3 -0
  80. package/dist/expression.json.js +3 -0
  81. package/dist/extension-web.js.js +3 -0
  82. package/dist/extension-web.js2.js +3 -0
  83. package/dist/extension.browser.js.js +3 -0
  84. package/dist/extensions.d.ts +35 -0
  85. package/dist/features/htmlContribution.js +0 -1
  86. package/dist/features/jsonContribution.d.ts +2 -4
  87. package/dist/features/jsonContribution.js +10 -29
  88. package/dist/features/typescriptContribution.js +2 -2
  89. package/dist/file_type_java.svg.js +3 -0
  90. package/dist/file_type_scala.svg.js +3 -0
  91. package/dist/filters.json.js +3 -0
  92. package/dist/focus-dark.svg.js +3 -0
  93. package/dist/focus-light.svg.js +3 -0
  94. package/dist/general.json.js +3 -0
  95. package/dist/get-inverse.svg.js +3 -0
  96. package/dist/get.svg.js +3 -0
  97. package/dist/go.json.js +3 -0
  98. package/dist/go.mod.language-configuration.json.js +3 -0
  99. package/dist/go.mod.tmGrammar.json.js +3 -0
  100. package/dist/go.sum.tmGrammar.json.js +3 -0
  101. package/dist/govulncheck.tmGrammar.json.js +3 -0
  102. package/dist/happy.json.js +3 -0
  103. package/dist/haskell-configuration.json.js +3 -0
  104. package/dist/haskell.json.js +3 -0
  105. package/dist/hot-reload-tb.png.js +3 -0
  106. package/dist/hot-reload.svg.js +3 -0
  107. package/dist/html-eex.json.js +3 -0
  108. package/dist/html.worker.js +1 -1
  109. package/dist/index.d.ts +2 -3
  110. package/dist/index.js +9 -6
  111. package/dist/index2.js +2 -1351
  112. package/dist/inline-styles.json.js +3 -0
  113. package/dist/inline-template.json.js +3 -0
  114. package/dist/inspector.svg.js +3 -0
  115. package/dist/java-properties-configuration.json.js +3 -0
  116. package/dist/java.json.js +3 -0
  117. package/dist/javascript.json.js +3 -0
  118. package/dist/json.worker.js +1 -1
  119. package/dist/jvm-bytecode-verbose.json.js +3 -0
  120. package/dist/jvm-bytecode.json.js +3 -0
  121. package/dist/kotlin.configuration.json.js +3 -0
  122. package/dist/kotlin.json.js +3 -0
  123. package/dist/lang-config.json.js +3 -0
  124. package/dist/language-configuration.json.js +3 -0
  125. package/dist/language-configuration.json2.js +3 -0
  126. package/dist/language-configuration.json3.js +3 -0
  127. package/dist/language-configuration.json4.js +3 -0
  128. package/dist/language-configuration.json5.js +3 -0
  129. package/dist/language-configuration.json6.js +3 -0
  130. package/dist/language-configuration.json7.js +3 -0
  131. package/dist/language-configuration.json8.js +3 -0
  132. package/dist/languages/index.d.ts +0 -2
  133. package/dist/literate-haskell-configuration.json.js +3 -0
  134. package/dist/literateHaskell.json.js +3 -0
  135. package/dist/main.js +839 -3115
  136. package/dist/markdown-svelte-css.json.js +3 -0
  137. package/dist/markdown-svelte-js.json.js +3 -0
  138. package/dist/markdown-svelte.json.js +3 -0
  139. package/dist/menhir-action.json.js +3 -0
  140. package/dist/menhir.json.js +3 -0
  141. package/dist/menhir.json2.js +3 -0
  142. package/dist/merlin.json.js +3 -0
  143. package/dist/monaco.d.ts +6 -9
  144. package/dist/oasis.json.js +3 -0
  145. package/dist/oasis.json2.js +3 -0
  146. package/dist/ocaml-markdown-codeblock.json.js +3 -0
  147. package/dist/ocaml.interface.json.js +3 -0
  148. package/dist/ocaml.json.js +3 -0
  149. package/dist/ocaml.json2.js +3 -0
  150. package/dist/ocaml.json3.js +3 -0
  151. package/dist/ocamlbuild.json.js +3 -0
  152. package/dist/ocamlbuild.json2.js +3 -0
  153. package/dist/ocamldoc.json.js +3 -0
  154. package/dist/ocamlformat.json.js +3 -0
  155. package/dist/ocamlformat.json2.js +3 -0
  156. package/dist/ocamllex.json.js +3 -0
  157. package/dist/ocamllex.json2.js +3 -0
  158. package/dist/ocamllex.json3.js +3 -0
  159. package/dist/opam-install.json.js +3 -0
  160. package/dist/opam-install.json2.js +3 -0
  161. package/dist/opam.json.js +3 -0
  162. package/dist/opam.json2.js +3 -0
  163. package/dist/outdated-inverse.svg.js +3 -0
  164. package/dist/outdated.svg.js +3 -0
  165. package/dist/pascal.configuration.json.js +3 -0
  166. package/dist/pascal.json.js +3 -0
  167. package/dist/pascal.tmLanguage.js +2 -168
  168. package/dist/performance.svg.js +3 -0
  169. package/dist/pgsql.tmLanguage.js +2 -283
  170. package/dist/pip-requirements.json.js +3 -0
  171. package/dist/pip-requirements.tmLanguage.json.js +3 -0
  172. package/dist/plus-dark.svg.js +3 -0
  173. package/dist/plus-light.svg.js +3 -0
  174. package/dist/postcss.json.js +3 -0
  175. package/dist/preview-right-dark.svg.js +3 -0
  176. package/dist/preview-right-light.svg.js +3 -0
  177. package/dist/pug-svelte-dotblock.json.js +3 -0
  178. package/dist/pug-svelte-tags.json.js +3 -0
  179. package/dist/pug-svelte.json.js +3 -0
  180. package/dist/r-configuration.json.js +3 -0
  181. package/dist/r-snippets.json.js +3 -0
  182. package/dist/r.json.js +3 -0
  183. package/dist/rbuildignore-configuration.json.js +3 -0
  184. package/dist/rbuildignore.json.js +3 -0
  185. package/dist/rd-configuration.json.js +3 -0
  186. package/dist/reason-markdown-codeblock.json.js +3 -0
  187. package/dist/reason.json.js +3 -0
  188. package/dist/reason.json2.js +3 -0
  189. package/dist/ref-group-by-type-dark.svg.js +3 -0
  190. package/dist/ref-group-by-type-light.svg.js +3 -0
  191. package/dist/ref-ungroup-by-type-dark.svg.js +3 -0
  192. package/dist/ref-ungroup-by-type-light.svg.js +3 -0
  193. package/dist/refresh-dark.svg.js +3 -0
  194. package/dist/refresh-dark.svg2.js +3 -0
  195. package/dist/refresh-light.svg.js +3 -0
  196. package/dist/refresh-light.svg2.js +3 -0
  197. package/dist/repl.svg.js +3 -0
  198. package/dist/repl.svg2.js +3 -0
  199. package/dist/rmarkdown.json2.js +3 -0
  200. package/dist/rmd-configuration.json.js +3 -0
  201. package/dist/rnamespace-configuration.json.js +3 -0
  202. package/dist/rnamespace.json.js +3 -0
  203. package/dist/save.svg.js +3 -0
  204. package/dist/save.svg2.js +3 -0
  205. package/dist/scalameta-logo.png.js +3 -0
  206. package/dist/sdl.json.js +3 -0
  207. package/dist/semanticdb.json.js +3 -0
  208. package/dist/services.d.ts +4 -0
  209. package/dist/solidity.configuration.json.js +3 -0
  210. package/dist/solidity.json.js +3 -0
  211. package/dist/solidity.json2.js +3 -0
  212. package/dist/svelte.json.js +3 -0
  213. package/dist/svelte.tmLanguage.json.js +3 -0
  214. package/dist/switch-impl-intf.dark.svg.js +3 -0
  215. package/dist/switch-impl-intf.light.svg.js +3 -0
  216. package/dist/systemverilog.json.js +3 -0
  217. package/dist/systemverilog.tmLanguage.json.js +3 -0
  218. package/dist/tags.json.js +3 -0
  219. package/dist/tasty.json.js +3 -0
  220. package/dist/tcl.json.js +3 -0
  221. package/dist/tcl.json2.js +3 -0
  222. package/dist/template.json.js +3 -0
  223. package/dist/theme/index.d.ts +1 -4
  224. package/dist/tools/EditorOpenHandlerRegistry.d.ts +3 -2
  225. package/dist/ts.worker.js +1 -1
  226. package/dist/typescript.json.js +3 -0
  227. package/dist/upgrade-inverse.svg.js +3 -0
  228. package/dist/upgrade.svg.js +3 -0
  229. package/dist/vim.js +37 -36
  230. package/dist/vs2019_dark.json.js +3 -0
  231. package/dist/vs2019_light.json.js +3 -0
  232. package/dist/worker.js +14 -2
  233. package/dist/x-dark.svg.js +3 -0
  234. package/dist/x-light.svg.js +3 -0
  235. package/package.json +40 -42
  236. package/stats.html +90 -1429
  237. package/dist/COBOL.tmLanguage.js +0 -172
  238. package/dist/HTML (Eex)2.js +0 -100
  239. package/dist/JSON.tmLanguage.js +0 -221
  240. package/dist/JSONC.tmLanguage.js +0 -221
  241. package/dist/JavaProperties.tmLanguage.js +0 -116
  242. package/dist/JavaScript.tmLanguage.js +0 -5929
  243. package/dist/JavaScriptReact.tmLanguage.js +0 -5929
  244. package/dist/META.js +0 -100
  245. package/dist/MagicPython.tmLanguage.js +0 -4221
  246. package/dist/MagicRegExp.tmLanguage.js +0 -505
  247. package/dist/Markdown Redcarpet.js +0 -221
  248. package/dist/RMarkdown.js +0 -25
  249. package/dist/Rcpp.js +0 -50
  250. package/dist/Rd (R Documentation).js +0 -131
  251. package/dist/Regular Expressions (JavaScript).tmLanguage.js +0 -166
  252. package/dist/Scala.tmLanguage.js +0 -1324
  253. package/dist/TypeScript.tmLanguage.js +0 -5680
  254. package/dist/TypeScriptReact.tmLanguage.js +0 -5929
  255. package/dist/angular.js +0 -62
  256. package/dist/asp-vb-net.tmlanguage.js +0 -247
  257. package/dist/aspnetcorerazor.js +0 -72
  258. package/dist/aspnetcorerazor.tmLanguage.js +0 -1825
  259. package/dist/atd.js +0 -110
  260. package/dist/atd2.js +0 -114
  261. package/dist/buildignore.r.js +0 -5
  262. package/dist/buildtarget.js +0 -53
  263. package/dist/c.js +0 -101
  264. package/dist/c.tmLanguage.js +0 -3565
  265. package/dist/cabal.js +0 -10
  266. package/dist/cabal.tmLanguage.js +0 -66
  267. package/dist/clojure.js +0 -68
  268. package/dist/clojure.tmLanguage.js +0 -439
  269. package/dist/cobol.js +0 -6
  270. package/dist/cobol2.js +0 -341
  271. package/dist/codeblock-cabal.js +0 -42
  272. package/dist/codeblock-haskell.js +0 -42
  273. package/dist/codeblock-literate-haskell.js +0 -42
  274. package/dist/codeblock.js +0 -59
  275. package/dist/codeblock2.js +0 -36
  276. package/dist/codeblock3.js +0 -95
  277. package/dist/coffeescript-coffeescript.code-snippets.js +0 -18
  278. package/dist/coffeescript.js +0 -91
  279. package/dist/coffeescript.tmLanguage.js +0 -1324
  280. package/dist/configuration/files.d.ts +0 -6
  281. package/dist/cpp-c.code-snippets.js +0 -18
  282. package/dist/cpp-cpp.code-snippets.js +0 -18
  283. package/dist/cpp.js +0 -101
  284. package/dist/cpp.tmLanguage.js +0 -16648
  285. package/dist/cpptools.js +0 -2631
  286. package/dist/cram.js +0 -257
  287. package/dist/csharp.js +0 -92
  288. package/dist/csharp.tmLanguage.js +0 -4992
  289. package/dist/css.js +0 -106
  290. package/dist/css.tmLanguage.js +0 -1873
  291. package/dist/cuda-cpp.js +0 -101
  292. package/dist/cuda-cpp.tmLanguage.js +0 -19993
  293. package/dist/d-diet.js +0 -92
  294. package/dist/d.js +0 -3212
  295. package/dist/d2.js +0 -97
  296. package/dist/d3.js +0 -609
  297. package/dist/dart.js +0 -543
  298. package/dist/dart2.js +0 -103
  299. package/dist/dart3.js +0 -1130
  300. package/dist/dcf.js +0 -93
  301. package/dist/debian-control.r.js +0 -69
  302. package/dist/diet.js +0 -758
  303. package/dist/diet2.js +0 -100
  304. package/dist/django-html.js +0 -155
  305. package/dist/django-html.tmLanguage.js +0 -715
  306. package/dist/django-txt.js +0 -155
  307. package/dist/django-txt.tmLanguage.js +0 -269
  308. package/dist/dml.js +0 -169
  309. package/dist/dml2.js +0 -90
  310. package/dist/dockercompose.js +0 -82
  311. package/dist/dpp.js +0 -97
  312. package/dist/dscript.js +0 -90
  313. package/dist/dune-project.js +0 -481
  314. package/dist/dune-project2.js +0 -65
  315. package/dist/dune-workspace.js +0 -298
  316. package/dist/dune-workspace2.js +0 -65
  317. package/dist/dune.js +0 -2962
  318. package/dist/dune2.js +0 -65
  319. package/dist/eex.js +0 -55
  320. package/dist/elixir-snippets.js +0 -184
  321. package/dist/elixir.js +0 -2341
  322. package/dist/elixir2.js +0 -69
  323. package/dist/elixir3.js +0 -40
  324. package/dist/erlang-erlang.js +0 -195
  325. package/dist/erlang.js +0 -81
  326. package/dist/erlang2.js +0 -86
  327. package/dist/expression.js +0 -846
  328. package/dist/features/extensionConfigurations.d.ts +0 -1
  329. package/dist/features/extensionConfigurations.js +0 -44
  330. package/dist/fsharp-fsharp.code-snippets.js +0 -18
  331. package/dist/fsharp.js +0 -80
  332. package/dist/fsharp.tmLanguage.js +0 -1844
  333. package/dist/go.js +0 -103
  334. package/dist/go.mod.js +0 -8
  335. package/dist/go.mod.tmGrammar.js +0 -182
  336. package/dist/go.sum.tmGrammar.js +0 -55
  337. package/dist/go.tmLanguage.js +0 -1025
  338. package/dist/go.work.js +0 -8
  339. package/dist/govulncheck.tmGrammar.js +0 -138
  340. package/dist/groovy-groovy.code-snippets.js +0 -229
  341. package/dist/groovy.js +0 -79
  342. package/dist/groovy.tmLanguage.js +0 -1391
  343. package/dist/haskell.js +0 -88
  344. package/dist/haskell.tmLanguage.js +0 -629
  345. package/dist/haskell2.js +0 -16
  346. package/dist/html (eex).js +0 -31
  347. package/dist/html-derivative.tmLanguage.js +0 -57
  348. package/dist/html-html.code-snippets.js +0 -20
  349. package/dist/html.js +0 -11
  350. package/dist/html.tmLanguage.js +0 -2652
  351. package/dist/html.tmLanguage2.js +0 -107
  352. package/dist/inline-styles.js +0 -104
  353. package/dist/inline-template.js +0 -88
  354. package/dist/jade.js +0 -11
  355. package/dist/java-java.js +0 -125
  356. package/dist/java-properties.js +0 -73
  357. package/dist/java.js +0 -98
  358. package/dist/java.tmLanguage.js +0 -1863
  359. package/dist/java2.js +0 -917
  360. package/dist/javascript-javascript.code-snippets.js +0 -205
  361. package/dist/javascript.js +0 -197
  362. package/dist/javascriptreact.js +0 -197
  363. package/dist/jsdoc.js.injection.tmLanguage.js +0 -32
  364. package/dist/jsdoc.ts.injection.tmLanguage.js +0 -32
  365. package/dist/json.js +0 -75
  366. package/dist/jsonc.js +0 -75
  367. package/dist/jsx-tags.js +0 -158
  368. package/dist/julia.js +0 -89
  369. package/dist/julia.tmLanguage.js +0 -954
  370. package/dist/jvm-bytecode-verbose.js +0 -1231
  371. package/dist/jvm-bytecode.js +0 -565
  372. package/dist/kotlin-kotlin.js +0 -117
  373. package/dist/kotlin.js +0 -103
  374. package/dist/kotlinscript.js +0 -103
  375. package/dist/languages/extensions/extensionConfigurationLoader.d.ts +0 -3
  376. package/dist/languages/extensions/grammarLoader.d.ts +0 -2
  377. package/dist/languages/extensions/languageConfigurationLoader.d.ts +0 -2
  378. package/dist/languages/extensions/snippetLoader.d.ts +0 -2
  379. package/dist/languages/extensions/themeLoader.d.ts +0 -2
  380. package/dist/languages/snippets/index.d.ts +0 -1
  381. package/dist/languages/textMate/index.d.ts +0 -1
  382. package/dist/languages/textMate/semanticTokens.d.ts +0 -1
  383. package/dist/literate haskell.js +0 -88
  384. package/dist/literateHaskell.tmLanguage.js +0 -70
  385. package/dist/lua.js +0 -84
  386. package/dist/lua.tmLanguage.js +0 -914
  387. package/dist/lua2.js +0 -2853
  388. package/dist/markdown-basics-markdown.code-snippets.js +0 -121
  389. package/dist/markdown-svelte-css.js +0 -37
  390. package/dist/markdown-svelte-js.js +0 -37
  391. package/dist/markdown-svelte.js +0 -59
  392. package/dist/markdown-vue.js +0 -54
  393. package/dist/markdown.js +0 -49
  394. package/dist/markdown.tmLanguage.js +0 -3042
  395. package/dist/menhir-action.js +0 -51
  396. package/dist/menhir.js +0 -597
  397. package/dist/merlin.js +0 -111
  398. package/dist/namespace.r.js +0 -88
  399. package/dist/oasis.js +0 -99
  400. package/dist/objective-c.js +0 -79
  401. package/dist/objective-c.tmLanguage.js +0 -3763
  402. package/dist/objective-cpp.js +0 -79
  403. package/dist/ocaml-dune-project.js +0 -38
  404. package/dist/ocaml-dune.js +0 -53
  405. package/dist/ocaml-markdown-codeblock.js +0 -42
  406. package/dist/ocaml-ocaml.js +0 -88
  407. package/dist/ocaml-ocamllex.js +0 -12
  408. package/dist/ocaml.META.js +0 -29
  409. package/dist/ocaml.interface.js +0 -292
  410. package/dist/ocaml.interface2.js +0 -114
  411. package/dist/ocaml.js +0 -903
  412. package/dist/ocaml.menhir.js +0 -81
  413. package/dist/ocaml.oasis.js +0 -18
  414. package/dist/ocaml.ocamlbuild.js +0 -45
  415. package/dist/ocaml.ocamlformat.js +0 -8
  416. package/dist/ocaml.ocamllex.js +0 -60
  417. package/dist/ocaml.opam-install.js +0 -49
  418. package/dist/ocaml.opam.js +0 -69
  419. package/dist/ocaml2.js +0 -114
  420. package/dist/ocaml3.js +0 -136
  421. package/dist/ocamlbuild.js +0 -189
  422. package/dist/ocamldoc.js +0 -54
  423. package/dist/ocamlformat.js +0 -206
  424. package/dist/ocamllex.js +0 -133
  425. package/dist/omnisharp-csharp.js +0 -508
  426. package/dist/omnisharp.js +0 -594
  427. package/dist/opam-install.js +0 -40
  428. package/dist/opam.js +0 -140
  429. package/dist/pascal-pascal.js +0 -382
  430. package/dist/pascal.js +0 -80
  431. package/dist/pascal2.js +0 -26
  432. package/dist/perl.js +0 -93
  433. package/dist/perl.tmLanguage.js +0 -2986
  434. package/dist/perl6.js +0 -86
  435. package/dist/perl6.tmLanguage.js +0 -323
  436. package/dist/php-php.code-snippets.js +0 -267
  437. package/dist/php.js +0 -154
  438. package/dist/php.tmLanguage.js +0 -4036
  439. package/dist/pip-requirements.js +0 -8
  440. package/dist/pip-requirements.tmLanguage.js +0 -89
  441. package/dist/plaintext.js +0 -11
  442. package/dist/platform.tmLanguage.js +0 -1135
  443. package/dist/postcss.src.yaml.js +0 -393
  444. package/dist/postgres.js +0 -80
  445. package/dist/postgresql.js +0 -75
  446. package/dist/powershell.js +0 -107
  447. package/dist/powershell.tmLanguage.js +0 -1037
  448. package/dist/pug-svelte-dotblock.js +0 -69
  449. package/dist/pug-svelte-tags.js +0 -215
  450. package/dist/pug-svelte.js +0 -307
  451. package/dist/python.js +0 -236
  452. package/dist/r.js +0 -664
  453. package/dist/r2.js +0 -88
  454. package/dist/rbuildignore.js +0 -39
  455. package/dist/rd.js +0 -81
  456. package/dist/reason-markdown-codeblock.js +0 -42
  457. package/dist/reason.js +0 -79
  458. package/dist/rmd.js +0 -84
  459. package/dist/rnamespace.js +0 -283
  460. package/dist/ruby.js +0 -95
  461. package/dist/ruby.tmLanguage.js +0 -2784
  462. package/dist/rust.js +0 -84
  463. package/dist/rust.tmLanguage.js +0 -1178
  464. package/dist/sassdoc.tmLanguage.js +0 -362
  465. package/dist/scala.js +0 -85
  466. package/dist/scalameta.js +0 -224
  467. package/dist/scss.js +0 -117
  468. package/dist/scss.tmLanguage.js +0 -1887
  469. package/dist/sdl.js +0 -162
  470. package/dist/sdl2.js +0 -90
  471. package/dist/semanticdb.js +0 -62
  472. package/dist/shell-unix-bash.tmLanguage.js +0 -2038
  473. package/dist/shellscript.js +0 -93
  474. package/dist/solargraph.js +0 -192
  475. package/dist/solidity-solidity.js +0 -213
  476. package/dist/solidity.js +0 -1224
  477. package/dist/solidity2.js +0 -71
  478. package/dist/solidity3.js +0 -143
  479. package/dist/sql.js +0 -99
  480. package/dist/sql.tmLanguage.js +0 -636
  481. package/dist/svelte.js +0 -120
  482. package/dist/svelte.svelte-vscode-javascript.js +0 -45
  483. package/dist/svelte.svelte-vscode-svelte.js +0 -46
  484. package/dist/svelte.svelte-vscode-typescript.js +0 -43
  485. package/dist/svelte.svelte-vscode.js +0 -383
  486. package/dist/svelte.tmLanguage.src.yaml.js +0 -1099
  487. package/dist/svlangserver-systemverilog.js +0 -395
  488. package/dist/svlangserver.js +0 -85
  489. package/dist/swift-swift.code-snippets.js +0 -183
  490. package/dist/swift.js +0 -90
  491. package/dist/swift.tmLanguage.js +0 -3312
  492. package/dist/systemverilog.js +0 -187
  493. package/dist/systemverilog.tmLanguage.js +0 -1259
  494. package/dist/tasty.js +0 -72
  495. package/dist/tcl-tcl.js +0 -151
  496. package/dist/tcl.js +0 -78
  497. package/dist/tcl.tmlanguage.yaml.js +0 -5490
  498. package/dist/template.js +0 -207
  499. package/dist/theme-defaults~dark_plus.js +0 -210
  500. package/dist/theme-defaults~dark_plus_experimental.js +0 -145
  501. package/dist/theme-defaults~dark_vs.js +0 -412
  502. package/dist/theme-defaults~hc_black.js +0 -471
  503. package/dist/theme-defaults~hc_light.js +0 -595
  504. package/dist/theme-defaults~light_plus.js +0 -212
  505. package/dist/theme-defaults~light_plus_experimental.js +0 -158
  506. package/dist/theme-defaults~light_vs.js +0 -441
  507. package/dist/typescript-basics-typescript.code-snippets.js +0 -313
  508. package/dist/typescript-language-features.js +0 -1103
  509. package/dist/typescript.js +0 -216
  510. package/dist/typescriptreact.js +0 -216
  511. package/dist/vb-vb.code-snippets.js +0 -88
  512. package/dist/vb.js +0 -79
  513. package/dist/verilog.js +0 -187
  514. package/dist/volar-vue.js +0 -289
  515. package/dist/vscode-R-r-snippets.js +0 -534
  516. package/dist/vscode-R-rmarkdown.js +0 -461
  517. package/dist/vscode-R.js +0 -660
  518. package/dist/vscode-django-filters.js +0 -340
  519. package/dist/vscode-django.js +0 -37
  520. package/dist/vscode-go-go.js +0 -276
  521. package/dist/vscode-go.js +0 -1610
  522. package/dist/vscode-groovy.js +0 -28
  523. package/dist/vscode-python.js +0 -706
  524. package/dist/vue-directives.js +0 -25
  525. package/dist/vue-interpolations.js +0 -25
  526. package/dist/vue-sfc-style-variable-injection.js +0 -63
  527. package/dist/vue.js +0 -151
  528. package/dist/vue.tmLanguage.js +0 -1218
  529. package/dist/xml.js +0 -116
  530. package/dist/xml.tmLanguage.js +0 -395
  531. package/dist/xsl.js +0 -39
  532. package/dist/xsl.tmLanguage.js +0 -102
  533. package/dist/yaml.js +0 -82
  534. package/dist/yaml.tmLanguage.js +0 -629
  535. /package/dist/{extensions → editor}/autofold.d.ts +0 -0
  536. /package/dist/{extensions → editor}/cobol.d.ts +0 -0
  537. /package/dist/{extensions → editor}/index.d.ts +0 -0
@@ -1,4221 +0,0 @@
1
- var information_for_contributors = [
2
- "This file has been converted from https://github.com/microsoft/vscode/blob/master/extensions/python/",
3
- "If you want to provide a fix or improvement, please create a pull request against the original repository.",
4
- "Once accepted there, we are happy to receive an update request."
5
- ];
6
- var version = "https://github.com/MagicStack/MagicPython/commit/7d0f2b22a5ad8fccbd7341bc7b7a715169283044";
7
- var name = "MagicPython";
8
- var scopeName = "source.python";
9
- var patterns = [
10
- {
11
- include: "#statement"
12
- },
13
- {
14
- include: "#expression"
15
- }
16
- ];
17
- var repository = {
18
- impossible: {
19
- 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.",
20
- match: "$.^"
21
- },
22
- statement: {
23
- patterns: [
24
- {
25
- include: "#import"
26
- },
27
- {
28
- include: "#class-declaration"
29
- },
30
- {
31
- include: "#function-declaration"
32
- },
33
- {
34
- include: "#generator"
35
- },
36
- {
37
- include: "#statement-keyword"
38
- },
39
- {
40
- include: "#assignment-operator"
41
- },
42
- {
43
- include: "#decorator"
44
- },
45
- {
46
- include: "#docstring-statement"
47
- },
48
- {
49
- include: "#semicolon"
50
- }
51
- ]
52
- },
53
- semicolon: {
54
- patterns: [
55
- {
56
- name: "invalid.deprecated.semicolon.python",
57
- match: "\\;$"
58
- }
59
- ]
60
- },
61
- comments: {
62
- patterns: [
63
- {
64
- name: "comment.line.number-sign.python",
65
- contentName: "meta.typehint.comment.python",
66
- begin: "(?x)\n (?:\n \\# \\s* (type:)\n \\s*+ (?# we want `\\s*+` which is possessive quantifier since\n we do not actually want to backtrack when matching\n whitespace here)\n (?! $ | \\#)\n )\n",
67
- end: "(?:$|(?=\\#))",
68
- beginCaptures: {
69
- "0": {
70
- name: "meta.typehint.comment.python"
71
- },
72
- "1": {
73
- name: "comment.typehint.directive.notation.python"
74
- }
75
- },
76
- patterns: [
77
- {
78
- name: "comment.typehint.ignore.notation.python",
79
- match: "(?x)\n \\G ignore\n (?= \\s* (?: $ | \\#))\n"
80
- },
81
- {
82
- name: "comment.typehint.type.notation.python",
83
- match: "(?x)\n (?<!\\.)\\b(\n bool | bytes | float | int | object | str\n | List | Dict | Iterable | Sequence | Set\n | FrozenSet | Callable | Union | Tuple\n | Any | None\n )\\b\n"
84
- },
85
- {
86
- name: "comment.typehint.punctuation.notation.python",
87
- match: "([\\[\\]\\(\\),\\.\\=\\*]|(->))"
88
- },
89
- {
90
- name: "comment.typehint.variable.notation.python",
91
- match: "([[:alpha:]_]\\w*)"
92
- }
93
- ]
94
- },
95
- {
96
- include: "#comments-base"
97
- }
98
- ]
99
- },
100
- "docstring-statement": {
101
- begin: "^(?=\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))",
102
- comment: "the string either terminates correctly or by the beginning of a new line (this is for single line docstrings that aren't terminated) AND it's not followed by another docstring",
103
- end: "((?<=\\1)|^)(?!\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))",
104
- patterns: [
105
- {
106
- include: "#docstring"
107
- }
108
- ]
109
- },
110
- docstring: {
111
- patterns: [
112
- {
113
- name: "string.quoted.docstring.multi.python",
114
- begin: "(\\'\\'\\'|\\\"\\\"\\\")",
115
- end: "(\\1)",
116
- beginCaptures: {
117
- "1": {
118
- name: "punctuation.definition.string.begin.python"
119
- }
120
- },
121
- endCaptures: {
122
- "1": {
123
- name: "punctuation.definition.string.end.python"
124
- }
125
- },
126
- patterns: [
127
- {
128
- include: "#docstring-prompt"
129
- },
130
- {
131
- include: "#codetags"
132
- },
133
- {
134
- include: "#docstring-guts-unicode"
135
- }
136
- ]
137
- },
138
- {
139
- name: "string.quoted.docstring.raw.multi.python",
140
- begin: "([rR])(\\'\\'\\'|\\\"\\\"\\\")",
141
- end: "(\\2)",
142
- beginCaptures: {
143
- "1": {
144
- name: "storage.type.string.python"
145
- },
146
- "2": {
147
- name: "punctuation.definition.string.begin.python"
148
- }
149
- },
150
- endCaptures: {
151
- "1": {
152
- name: "punctuation.definition.string.end.python"
153
- }
154
- },
155
- patterns: [
156
- {
157
- include: "#string-consume-escape"
158
- },
159
- {
160
- include: "#docstring-prompt"
161
- },
162
- {
163
- include: "#codetags"
164
- }
165
- ]
166
- },
167
- {
168
- name: "string.quoted.docstring.single.python",
169
- begin: "(\\'|\\\")",
170
- end: "(\\1)|(\\n)",
171
- beginCaptures: {
172
- "1": {
173
- name: "punctuation.definition.string.begin.python"
174
- }
175
- },
176
- endCaptures: {
177
- "1": {
178
- name: "punctuation.definition.string.end.python"
179
- },
180
- "2": {
181
- name: "invalid.illegal.newline.python"
182
- }
183
- },
184
- patterns: [
185
- {
186
- include: "#codetags"
187
- },
188
- {
189
- include: "#docstring-guts-unicode"
190
- }
191
- ]
192
- },
193
- {
194
- name: "string.quoted.docstring.raw.single.python",
195
- begin: "([rR])(\\'|\\\")",
196
- end: "(\\2)|(\\n)",
197
- beginCaptures: {
198
- "1": {
199
- name: "storage.type.string.python"
200
- },
201
- "2": {
202
- name: "punctuation.definition.string.begin.python"
203
- }
204
- },
205
- endCaptures: {
206
- "1": {
207
- name: "punctuation.definition.string.end.python"
208
- },
209
- "2": {
210
- name: "invalid.illegal.newline.python"
211
- }
212
- },
213
- patterns: [
214
- {
215
- include: "#string-consume-escape"
216
- },
217
- {
218
- include: "#codetags"
219
- }
220
- ]
221
- }
222
- ]
223
- },
224
- "docstring-guts-unicode": {
225
- patterns: [
226
- {
227
- include: "#escape-sequence-unicode"
228
- },
229
- {
230
- include: "#escape-sequence"
231
- },
232
- {
233
- include: "#string-line-continuation"
234
- }
235
- ]
236
- },
237
- "docstring-prompt": {
238
- match: "(?x)\n (?:\n (?:^|\\G) \\s* (?# '\\G' is necessary for ST)\n ((?:>>>|\\.\\.\\.) \\s) (?=\\s*\\S)\n )\n",
239
- captures: {
240
- "1": {
241
- name: "keyword.control.flow.python"
242
- }
243
- }
244
- },
245
- "statement-keyword": {
246
- patterns: [
247
- {
248
- name: "storage.type.function.python",
249
- match: "\\b((async\\s+)?\\s*def)\\b"
250
- },
251
- {
252
- name: "keyword.control.flow.python",
253
- comment: "if `as` is eventually followed by `:` or line continuation\nit's probably control flow like:\n with foo as bar, \\\n Foo as Bar:\n try:\n do_stuff()\n except Exception as e:\n pass\n",
254
- match: "\\b(?<!\\.)as\\b(?=.*[:\\\\])"
255
- },
256
- {
257
- name: "keyword.control.import.python",
258
- comment: "other legal use of `as` is in an import",
259
- match: "\\b(?<!\\.)as\\b"
260
- },
261
- {
262
- name: "keyword.control.flow.python",
263
- match: "(?x)\n \\b(?<!\\.)(\n async | continue | del | assert | break | finally | for\n | from | elif | else | if | except | pass | raise\n | return | try | while | with\n )\\b\n"
264
- },
265
- {
266
- name: "storage.modifier.declaration.python",
267
- match: "(?x)\n \\b(?<!\\.)(\n global | nonlocal\n )\\b\n"
268
- },
269
- {
270
- name: "storage.type.class.python",
271
- match: "\\b(?<!\\.)(class)\\b"
272
- },
273
- {
274
- match: "(?x)\n ^\\s*(\n case | match\n )(?=\\s*([-+\\w\\d(\\[{'\":#]|$))\\b\n",
275
- captures: {
276
- "1": {
277
- name: "keyword.control.flow.python"
278
- }
279
- }
280
- }
281
- ]
282
- },
283
- "expression-bare": {
284
- comment: "valid Python expressions w/o comments and line continuation",
285
- patterns: [
286
- {
287
- include: "#backticks"
288
- },
289
- {
290
- include: "#illegal-anno"
291
- },
292
- {
293
- include: "#literal"
294
- },
295
- {
296
- include: "#regexp"
297
- },
298
- {
299
- include: "#string"
300
- },
301
- {
302
- include: "#lambda"
303
- },
304
- {
305
- include: "#generator"
306
- },
307
- {
308
- include: "#illegal-operator"
309
- },
310
- {
311
- include: "#operator"
312
- },
313
- {
314
- include: "#curly-braces"
315
- },
316
- {
317
- include: "#item-access"
318
- },
319
- {
320
- include: "#list"
321
- },
322
- {
323
- include: "#odd-function-call"
324
- },
325
- {
326
- include: "#round-braces"
327
- },
328
- {
329
- include: "#function-call"
330
- },
331
- {
332
- include: "#builtin-functions"
333
- },
334
- {
335
- include: "#builtin-types"
336
- },
337
- {
338
- include: "#builtin-exceptions"
339
- },
340
- {
341
- include: "#magic-names"
342
- },
343
- {
344
- include: "#special-names"
345
- },
346
- {
347
- include: "#illegal-names"
348
- },
349
- {
350
- include: "#special-variables"
351
- },
352
- {
353
- include: "#ellipsis"
354
- },
355
- {
356
- include: "#punctuation"
357
- },
358
- {
359
- include: "#line-continuation"
360
- }
361
- ]
362
- },
363
- "expression-base": {
364
- comment: "valid Python expressions with comments and line continuation",
365
- patterns: [
366
- {
367
- include: "#comments"
368
- },
369
- {
370
- include: "#expression-bare"
371
- },
372
- {
373
- include: "#line-continuation"
374
- }
375
- ]
376
- },
377
- expression: {
378
- comment: "All valid Python expressions",
379
- patterns: [
380
- {
381
- include: "#expression-base"
382
- },
383
- {
384
- include: "#member-access"
385
- },
386
- {
387
- comment: "Tokenize identifiers to help linters",
388
- match: "(?x) \\b ([[:alpha:]_]\\w*) \\b"
389
- }
390
- ]
391
- },
392
- "member-access": {
393
- name: "meta.member.access.python",
394
- begin: "(\\.)\\s*(?!\\.)",
395
- end: "(?x)\n # stop when you've just read non-whitespace followed by non-word\n # i.e. when finished reading an identifier or function call\n (?<=\\S)(?=\\W) |\n # stop when seeing the start of something that's not a word,\n # i.e. when seeing a non-identifier\n (^|(?<=\\s))(?=[^\\\\\\w\\s]) |\n $\n",
396
- beginCaptures: {
397
- "1": {
398
- name: "punctuation.separator.period.python"
399
- }
400
- },
401
- patterns: [
402
- {
403
- include: "#function-call"
404
- },
405
- {
406
- include: "#member-access-base"
407
- },
408
- {
409
- include: "#member-access-attribute"
410
- }
411
- ]
412
- },
413
- "member-access-base": {
414
- patterns: [
415
- {
416
- include: "#magic-names"
417
- },
418
- {
419
- include: "#illegal-names"
420
- },
421
- {
422
- include: "#illegal-object-name"
423
- },
424
- {
425
- include: "#special-names"
426
- },
427
- {
428
- include: "#line-continuation"
429
- },
430
- {
431
- include: "#item-access"
432
- }
433
- ]
434
- },
435
- "member-access-attribute": {
436
- comment: "Highlight attribute access in otherwise non-specialized cases.",
437
- name: "meta.attribute.python",
438
- match: "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
439
- },
440
- "special-names": {
441
- name: "constant.other.caps.python",
442
- match: "(?x)\n \\b\n # we want to see \"enough\", meaning 2 or more upper-case\n # letters in the beginning of the constant\n #\n # for more details refer to:\n # https://github.com/MagicStack/MagicPython/issues/42\n (\n _* [[:upper:]] [_\\d]* [[:upper:]]\n )\n [[:upper:]\\d]* (_\\w*)?\n \\b\n"
443
- },
444
- "curly-braces": {
445
- begin: "\\{",
446
- end: "\\}",
447
- beginCaptures: {
448
- "0": {
449
- name: "punctuation.definition.dict.begin.python"
450
- }
451
- },
452
- endCaptures: {
453
- "0": {
454
- name: "punctuation.definition.dict.end.python"
455
- }
456
- },
457
- patterns: [
458
- {
459
- name: "punctuation.separator.dict.python",
460
- match: ":"
461
- },
462
- {
463
- include: "#expression"
464
- }
465
- ]
466
- },
467
- list: {
468
- begin: "\\[",
469
- end: "\\]",
470
- beginCaptures: {
471
- "0": {
472
- name: "punctuation.definition.list.begin.python"
473
- }
474
- },
475
- endCaptures: {
476
- "0": {
477
- name: "punctuation.definition.list.end.python"
478
- }
479
- },
480
- patterns: [
481
- {
482
- include: "#expression"
483
- }
484
- ]
485
- },
486
- "odd-function-call": {
487
- comment: "A bit obscured function call where there may have been an\narbitrary number of other operations to get the function.\nE.g. \"arr[idx](args)\"\n",
488
- begin: "(?x)\n (?<= \\] | \\) ) \\s*\n (?=\\()\n",
489
- end: "(\\))",
490
- endCaptures: {
491
- "1": {
492
- name: "punctuation.definition.arguments.end.python"
493
- }
494
- },
495
- patterns: [
496
- {
497
- include: "#function-arguments"
498
- }
499
- ]
500
- },
501
- "round-braces": {
502
- begin: "\\(",
503
- end: "\\)",
504
- beginCaptures: {
505
- "0": {
506
- name: "punctuation.parenthesis.begin.python"
507
- }
508
- },
509
- endCaptures: {
510
- "0": {
511
- name: "punctuation.parenthesis.end.python"
512
- }
513
- },
514
- patterns: [
515
- {
516
- include: "#expression"
517
- }
518
- ]
519
- },
520
- "line-continuation": {
521
- patterns: [
522
- {
523
- match: "(\\\\)\\s*(\\S.*$\\n?)",
524
- captures: {
525
- "1": {
526
- name: "punctuation.separator.continuation.line.python"
527
- },
528
- "2": {
529
- name: "invalid.illegal.line.continuation.python"
530
- }
531
- }
532
- },
533
- {
534
- begin: "(\\\\)\\s*$\\n?",
535
- end: "(?x)\n (?=^\\s*$)\n |\n (?! (\\s* [rR]? (\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))\n |\n (\\G $) (?# '\\G' is necessary for ST)\n )\n",
536
- beginCaptures: {
537
- "1": {
538
- name: "punctuation.separator.continuation.line.python"
539
- }
540
- },
541
- patterns: [
542
- {
543
- include: "#regexp"
544
- },
545
- {
546
- include: "#string"
547
- }
548
- ]
549
- }
550
- ]
551
- },
552
- "assignment-operator": {
553
- name: "keyword.operator.assignment.python",
554
- match: "(?x)\n <<= | >>= | //= | \\*\\*=\n | \\+= | -= | /= | @=\n | \\*= | %= | ~= | \\^= | &= | \\|=\n | =(?!=)\n"
555
- },
556
- operator: {
557
- match: "(?x)\n \\b(?<!\\.)\n (?:\n (and | or | not | in | is) (?# 1)\n |\n (for | if | else | await | (?:yield(?:\\s+from)?)) (?# 2)\n )\n (?!\\s*:)\\b\n\n | (<< | >> | & | \\| | \\^ | ~) (?# 3)\n\n | (\\*\\* | \\* | \\+ | - | % | // | / | @) (?# 4)\n\n | (!= | == | >= | <= | < | >) (?# 5)\n\n | (:=) (?# 6)\n",
558
- captures: {
559
- "1": {
560
- name: "keyword.operator.logical.python"
561
- },
562
- "2": {
563
- name: "keyword.control.flow.python"
564
- },
565
- "3": {
566
- name: "keyword.operator.bitwise.python"
567
- },
568
- "4": {
569
- name: "keyword.operator.arithmetic.python"
570
- },
571
- "5": {
572
- name: "keyword.operator.comparison.python"
573
- },
574
- "6": {
575
- name: "keyword.operator.assignment.python"
576
- }
577
- }
578
- },
579
- punctuation: {
580
- patterns: [
581
- {
582
- name: "punctuation.separator.colon.python",
583
- match: ":"
584
- },
585
- {
586
- name: "punctuation.separator.element.python",
587
- match: ","
588
- }
589
- ]
590
- },
591
- literal: {
592
- patterns: [
593
- {
594
- name: "constant.language.python",
595
- match: "\\b(True|False|None|NotImplemented|Ellipsis)\\b"
596
- },
597
- {
598
- include: "#number"
599
- }
600
- ]
601
- },
602
- number: {
603
- name: "constant.numeric.python",
604
- patterns: [
605
- {
606
- include: "#number-float"
607
- },
608
- {
609
- include: "#number-dec"
610
- },
611
- {
612
- include: "#number-hex"
613
- },
614
- {
615
- include: "#number-oct"
616
- },
617
- {
618
- include: "#number-bin"
619
- },
620
- {
621
- include: "#number-long"
622
- },
623
- {
624
- name: "invalid.illegal.name.python",
625
- match: "\\b[0-9]+\\w+"
626
- }
627
- ]
628
- },
629
- "number-float": {
630
- name: "constant.numeric.float.python",
631
- match: "(?x)\n (?<! \\w)(?:\n (?:\n \\.[0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\. [0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\.\n ) (?: [eE][+-]?[0-9](?: _?[0-9] )* )?\n |\n [0-9](?: _?[0-9] )* (?: [eE][+-]?[0-9](?: _?[0-9] )* )\n )([jJ])?\\b\n",
632
- captures: {
633
- "1": {
634
- name: "storage.type.imaginary.number.python"
635
- }
636
- }
637
- },
638
- "number-dec": {
639
- name: "constant.numeric.dec.python",
640
- match: "(?x)\n (?<![\\w\\.])(?:\n [1-9](?: _?[0-9] )*\n |\n 0+\n |\n [0-9](?: _?[0-9] )* ([jJ])\n |\n 0 ([0-9]+)(?![eE\\.])\n )\\b\n",
641
- captures: {
642
- "1": {
643
- name: "storage.type.imaginary.number.python"
644
- },
645
- "2": {
646
- name: "invalid.illegal.dec.python"
647
- }
648
- }
649
- },
650
- "number-hex": {
651
- name: "constant.numeric.hex.python",
652
- match: "(?x)\n (?<![\\w\\.])\n (0[xX]) (_?[0-9a-fA-F])+\n \\b\n",
653
- captures: {
654
- "1": {
655
- name: "storage.type.number.python"
656
- }
657
- }
658
- },
659
- "number-oct": {
660
- name: "constant.numeric.oct.python",
661
- match: "(?x)\n (?<![\\w\\.])\n (0[oO]) (_?[0-7])+\n \\b\n",
662
- captures: {
663
- "1": {
664
- name: "storage.type.number.python"
665
- }
666
- }
667
- },
668
- "number-bin": {
669
- name: "constant.numeric.bin.python",
670
- match: "(?x)\n (?<![\\w\\.])\n (0[bB]) (_?[01])+\n \\b\n",
671
- captures: {
672
- "1": {
673
- name: "storage.type.number.python"
674
- }
675
- }
676
- },
677
- "number-long": {
678
- name: "constant.numeric.bin.python",
679
- comment: "this is to support python2 syntax for long ints",
680
- match: "(?x)\n (?<![\\w\\.])\n ([1-9][0-9]* | 0) ([lL])\n \\b\n",
681
- captures: {
682
- "2": {
683
- name: "storage.type.number.python"
684
- }
685
- }
686
- },
687
- regexp: {
688
- patterns: [
689
- {
690
- include: "#regexp-single-three-line"
691
- },
692
- {
693
- include: "#regexp-double-three-line"
694
- },
695
- {
696
- include: "#regexp-single-one-line"
697
- },
698
- {
699
- include: "#regexp-double-one-line"
700
- }
701
- ]
702
- },
703
- string: {
704
- patterns: [
705
- {
706
- include: "#string-quoted-multi-line"
707
- },
708
- {
709
- include: "#string-quoted-single-line"
710
- },
711
- {
712
- include: "#string-bin-quoted-multi-line"
713
- },
714
- {
715
- include: "#string-bin-quoted-single-line"
716
- },
717
- {
718
- include: "#string-raw-quoted-multi-line"
719
- },
720
- {
721
- include: "#string-raw-quoted-single-line"
722
- },
723
- {
724
- include: "#string-raw-bin-quoted-multi-line"
725
- },
726
- {
727
- include: "#string-raw-bin-quoted-single-line"
728
- },
729
- {
730
- include: "#fstring-fnorm-quoted-multi-line"
731
- },
732
- {
733
- include: "#fstring-fnorm-quoted-single-line"
734
- },
735
- {
736
- include: "#fstring-normf-quoted-multi-line"
737
- },
738
- {
739
- include: "#fstring-normf-quoted-single-line"
740
- },
741
- {
742
- include: "#fstring-raw-quoted-multi-line"
743
- },
744
- {
745
- include: "#fstring-raw-quoted-single-line"
746
- }
747
- ]
748
- },
749
- "string-unicode-guts": {
750
- patterns: [
751
- {
752
- include: "#escape-sequence-unicode"
753
- },
754
- {
755
- include: "#string-entity"
756
- },
757
- {
758
- include: "#string-brace-formatting"
759
- }
760
- ]
761
- },
762
- "string-consume-escape": {
763
- match: "\\\\['\"\\n\\\\]"
764
- },
765
- "string-raw-guts": {
766
- patterns: [
767
- {
768
- include: "#string-consume-escape"
769
- },
770
- {
771
- include: "#string-formatting"
772
- },
773
- {
774
- include: "#string-brace-formatting"
775
- }
776
- ]
777
- },
778
- "string-raw-bin-guts": {
779
- patterns: [
780
- {
781
- include: "#string-consume-escape"
782
- },
783
- {
784
- include: "#string-formatting"
785
- }
786
- ]
787
- },
788
- "string-entity": {
789
- patterns: [
790
- {
791
- include: "#escape-sequence"
792
- },
793
- {
794
- include: "#string-line-continuation"
795
- },
796
- {
797
- include: "#string-formatting"
798
- }
799
- ]
800
- },
801
- "fstring-guts": {
802
- patterns: [
803
- {
804
- include: "#escape-sequence-unicode"
805
- },
806
- {
807
- include: "#escape-sequence"
808
- },
809
- {
810
- include: "#string-line-continuation"
811
- },
812
- {
813
- include: "#fstring-formatting"
814
- }
815
- ]
816
- },
817
- "fstring-raw-guts": {
818
- patterns: [
819
- {
820
- include: "#string-consume-escape"
821
- },
822
- {
823
- include: "#fstring-formatting"
824
- }
825
- ]
826
- },
827
- "fstring-illegal-single-brace": {
828
- comment: "it is illegal to have a multiline brace inside a single-line string",
829
- begin: "(\\{)(?=[^\\n}]*$\\n?)",
830
- end: "(\\})|(?=\\n)",
831
- beginCaptures: {
832
- "1": {
833
- name: "constant.character.format.placeholder.other.python"
834
- }
835
- },
836
- endCaptures: {
837
- "1": {
838
- name: "constant.character.format.placeholder.other.python"
839
- }
840
- },
841
- patterns: [
842
- {
843
- include: "#fstring-terminator-single"
844
- },
845
- {
846
- include: "#f-expression"
847
- }
848
- ]
849
- },
850
- "fstring-illegal-multi-brace": {
851
- patterns: [
852
- {
853
- include: "#impossible"
854
- }
855
- ]
856
- },
857
- "f-expression": {
858
- comment: "All valid Python expressions, except comments and line continuation",
859
- patterns: [
860
- {
861
- include: "#expression-bare"
862
- },
863
- {
864
- include: "#member-access"
865
- },
866
- {
867
- comment: "Tokenize identifiers to help linters",
868
- match: "(?x) \\b ([[:alpha:]_]\\w*) \\b"
869
- }
870
- ]
871
- },
872
- "escape-sequence-unicode": {
873
- patterns: [
874
- {
875
- name: "constant.character.escape.python",
876
- match: "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n | N\\{[\\w\\s]+?\\}\n )\n"
877
- }
878
- ]
879
- },
880
- "escape-sequence": {
881
- name: "constant.character.escape.python",
882
- match: "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | [0-7]{1,3}\n | [\\\\\"'abfnrtv]\n )\n"
883
- },
884
- "string-line-continuation": {
885
- name: "constant.language.python",
886
- match: "\\\\$"
887
- },
888
- "string-formatting": {
889
- name: "meta.format.percent.python",
890
- match: "(?x)\n (\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsab%]\n )\n",
891
- captures: {
892
- "1": {
893
- name: "constant.character.format.placeholder.other.python"
894
- }
895
- }
896
- },
897
- "string-brace-formatting": {
898
- patterns: [
899
- {
900
- name: "meta.format.brace.python",
901
- match: "(?x)\n (\n {{ | }}\n | (?:\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n",
902
- captures: {
903
- "1": {
904
- name: "constant.character.format.placeholder.other.python"
905
- },
906
- "3": {
907
- name: "storage.type.format.python"
908
- },
909
- "4": {
910
- name: "storage.type.format.python"
911
- }
912
- }
913
- },
914
- {
915
- name: "meta.format.brace.python",
916
- match: "(?x)\n (\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n (![rsa])?\n (:)\n [^'\"{}\\n]* (?:\n \\{ [^'\"}\\n]*? \\} [^'\"{}\\n]*\n )*\n }\n )\n",
917
- captures: {
918
- "1": {
919
- name: "constant.character.format.placeholder.other.python"
920
- },
921
- "3": {
922
- name: "storage.type.format.python"
923
- },
924
- "4": {
925
- name: "storage.type.format.python"
926
- }
927
- }
928
- }
929
- ]
930
- },
931
- "fstring-formatting": {
932
- patterns: [
933
- {
934
- include: "#fstring-formatting-braces"
935
- },
936
- {
937
- include: "#fstring-formatting-singe-brace"
938
- }
939
- ]
940
- },
941
- "fstring-formatting-singe-brace": {
942
- name: "invalid.illegal.brace.python",
943
- match: "(}(?!}))"
944
- },
945
- "import": {
946
- comment: "Import statements used to correctly mark `from`, `import`, and `as`\n",
947
- patterns: [
948
- {
949
- begin: "\\b(?<!\\.)(from)\\b(?=.+import)",
950
- end: "$|(?=import)",
951
- beginCaptures: {
952
- "1": {
953
- name: "keyword.control.import.python"
954
- }
955
- },
956
- patterns: [
957
- {
958
- name: "punctuation.separator.period.python",
959
- match: "\\.+"
960
- },
961
- {
962
- include: "#expression"
963
- }
964
- ]
965
- },
966
- {
967
- begin: "\\b(?<!\\.)(import)\\b",
968
- end: "$",
969
- beginCaptures: {
970
- "1": {
971
- name: "keyword.control.import.python"
972
- }
973
- },
974
- patterns: [
975
- {
976
- name: "keyword.control.import.python",
977
- match: "\\b(?<!\\.)as\\b"
978
- },
979
- {
980
- include: "#expression"
981
- }
982
- ]
983
- }
984
- ]
985
- },
986
- "class-declaration": {
987
- patterns: [
988
- {
989
- name: "meta.class.python",
990
- begin: "(?x)\n \\s*(class)\\s+\n (?=\n [[:alpha:]_]\\w* \\s* (:|\\()\n )\n",
991
- end: "(:)",
992
- beginCaptures: {
993
- "1": {
994
- name: "storage.type.class.python"
995
- }
996
- },
997
- endCaptures: {
998
- "1": {
999
- name: "punctuation.section.class.begin.python"
1000
- }
1001
- },
1002
- patterns: [
1003
- {
1004
- include: "#class-name"
1005
- },
1006
- {
1007
- include: "#class-inheritance"
1008
- }
1009
- ]
1010
- }
1011
- ]
1012
- },
1013
- "class-name": {
1014
- patterns: [
1015
- {
1016
- include: "#illegal-object-name"
1017
- },
1018
- {
1019
- include: "#builtin-possible-callables"
1020
- },
1021
- {
1022
- name: "entity.name.type.class.python",
1023
- match: "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
1024
- }
1025
- ]
1026
- },
1027
- "class-inheritance": {
1028
- name: "meta.class.inheritance.python",
1029
- begin: "(\\()",
1030
- end: "(\\))",
1031
- beginCaptures: {
1032
- "1": {
1033
- name: "punctuation.definition.inheritance.begin.python"
1034
- }
1035
- },
1036
- endCaptures: {
1037
- "1": {
1038
- name: "punctuation.definition.inheritance.end.python"
1039
- }
1040
- },
1041
- patterns: [
1042
- {
1043
- name: "keyword.operator.unpacking.arguments.python",
1044
- match: "(\\*\\*|\\*)"
1045
- },
1046
- {
1047
- name: "punctuation.separator.inheritance.python",
1048
- match: ","
1049
- },
1050
- {
1051
- name: "keyword.operator.assignment.python",
1052
- match: "=(?!=)"
1053
- },
1054
- {
1055
- name: "support.type.metaclass.python",
1056
- match: "\\bmetaclass\\b"
1057
- },
1058
- {
1059
- include: "#illegal-names"
1060
- },
1061
- {
1062
- include: "#class-kwarg"
1063
- },
1064
- {
1065
- include: "#call-wrapper-inheritance"
1066
- },
1067
- {
1068
- include: "#expression-base"
1069
- },
1070
- {
1071
- include: "#member-access-class"
1072
- },
1073
- {
1074
- include: "#inheritance-identifier"
1075
- }
1076
- ]
1077
- },
1078
- "class-kwarg": {
1079
- match: "(?x)\n \\b ([[:alpha:]_]\\w*) \\s*(=)(?!=)\n",
1080
- captures: {
1081
- "1": {
1082
- name: "entity.other.inherited-class.python variable.parameter.class.python"
1083
- },
1084
- "2": {
1085
- name: "keyword.operator.assignment.python"
1086
- }
1087
- }
1088
- },
1089
- "inheritance-identifier": {
1090
- match: "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n",
1091
- captures: {
1092
- "1": {
1093
- name: "entity.other.inherited-class.python"
1094
- }
1095
- }
1096
- },
1097
- "member-access-class": {
1098
- name: "meta.member.access.python",
1099
- begin: "(\\.)\\s*(?!\\.)",
1100
- end: "(?<=\\S)(?=\\W)|$",
1101
- beginCaptures: {
1102
- "1": {
1103
- name: "punctuation.separator.period.python"
1104
- }
1105
- },
1106
- patterns: [
1107
- {
1108
- include: "#call-wrapper-inheritance"
1109
- },
1110
- {
1111
- include: "#member-access-base"
1112
- },
1113
- {
1114
- include: "#inheritance-identifier"
1115
- }
1116
- ]
1117
- },
1118
- lambda: {
1119
- patterns: [
1120
- {
1121
- match: "((?<=\\.)lambda|lambda(?=\\s*[\\.=]))",
1122
- captures: {
1123
- "1": {
1124
- name: "keyword.control.flow.python"
1125
- }
1126
- }
1127
- },
1128
- {
1129
- match: "\\b(lambda)\\s*?(?=[,\\n]|$)",
1130
- captures: {
1131
- "1": {
1132
- name: "storage.type.function.lambda.python"
1133
- }
1134
- }
1135
- },
1136
- {
1137
- name: "meta.lambda-function.python",
1138
- begin: "(?x)\n \\b (lambda) \\b\n",
1139
- end: "(:)|(\\n)",
1140
- beginCaptures: {
1141
- "1": {
1142
- name: "storage.type.function.lambda.python"
1143
- }
1144
- },
1145
- endCaptures: {
1146
- "1": {
1147
- name: "punctuation.section.function.lambda.begin.python"
1148
- }
1149
- },
1150
- contentName: "meta.function.lambda.parameters.python",
1151
- patterns: [
1152
- {
1153
- name: "keyword.operator.positional.parameter.python",
1154
- match: "/"
1155
- },
1156
- {
1157
- name: "keyword.operator.unpacking.parameter.python",
1158
- match: "(\\*\\*|\\*)"
1159
- },
1160
- {
1161
- include: "#lambda-nested-incomplete"
1162
- },
1163
- {
1164
- include: "#illegal-names"
1165
- },
1166
- {
1167
- match: "([[:alpha:]_]\\w*)\\s*(?:(,)|(?=:|$))",
1168
- captures: {
1169
- "1": {
1170
- name: "variable.parameter.function.language.python"
1171
- },
1172
- "2": {
1173
- name: "punctuation.separator.parameters.python"
1174
- }
1175
- }
1176
- },
1177
- {
1178
- include: "#comments"
1179
- },
1180
- {
1181
- include: "#backticks"
1182
- },
1183
- {
1184
- include: "#illegal-anno"
1185
- },
1186
- {
1187
- include: "#lambda-parameter-with-default"
1188
- },
1189
- {
1190
- include: "#line-continuation"
1191
- },
1192
- {
1193
- include: "#illegal-operator"
1194
- }
1195
- ]
1196
- }
1197
- ]
1198
- },
1199
- "lambda-incomplete": {
1200
- name: "storage.type.function.lambda.python",
1201
- match: "\\blambda(?=\\s*[,)])"
1202
- },
1203
- "lambda-nested-incomplete": {
1204
- name: "storage.type.function.lambda.python",
1205
- match: "\\blambda(?=\\s*[:,)])"
1206
- },
1207
- "lambda-parameter-with-default": {
1208
- begin: "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (=)\n",
1209
- end: "(,)|(?=:|$)",
1210
- beginCaptures: {
1211
- "1": {
1212
- name: "variable.parameter.function.language.python"
1213
- },
1214
- "2": {
1215
- name: "keyword.operator.python"
1216
- }
1217
- },
1218
- endCaptures: {
1219
- "1": {
1220
- name: "punctuation.separator.parameters.python"
1221
- }
1222
- },
1223
- patterns: [
1224
- {
1225
- include: "#expression"
1226
- }
1227
- ]
1228
- },
1229
- generator: {
1230
- comment: "Match \"for ... in\" construct used in generators and for loops to\ncorrectly identify the \"in\" as a control flow keyword.\n",
1231
- begin: "\\bfor\\b",
1232
- beginCaptures: {
1233
- "0": {
1234
- name: "keyword.control.flow.python"
1235
- }
1236
- },
1237
- end: "\\bin\\b",
1238
- endCaptures: {
1239
- "0": {
1240
- name: "keyword.control.flow.python"
1241
- }
1242
- },
1243
- patterns: [
1244
- {
1245
- include: "#expression"
1246
- }
1247
- ]
1248
- },
1249
- "function-declaration": {
1250
- name: "meta.function.python",
1251
- begin: "(?x)\n \\s*\n (?:\\b(async) \\s+)? \\b(def)\\s+\n (?=\n [[:alpha:]_][[:word:]]* \\s* \\(\n )\n",
1252
- end: "(:|(?=[#'\"\\n]))",
1253
- beginCaptures: {
1254
- "1": {
1255
- name: "storage.type.function.async.python"
1256
- },
1257
- "2": {
1258
- name: "storage.type.function.python"
1259
- }
1260
- },
1261
- endCaptures: {
1262
- "1": {
1263
- name: "punctuation.section.function.begin.python"
1264
- }
1265
- },
1266
- patterns: [
1267
- {
1268
- include: "#function-def-name"
1269
- },
1270
- {
1271
- include: "#parameters"
1272
- },
1273
- {
1274
- include: "#line-continuation"
1275
- },
1276
- {
1277
- include: "#return-annotation"
1278
- }
1279
- ]
1280
- },
1281
- "function-def-name": {
1282
- patterns: [
1283
- {
1284
- include: "#illegal-object-name"
1285
- },
1286
- {
1287
- include: "#builtin-possible-callables"
1288
- },
1289
- {
1290
- name: "entity.name.function.python",
1291
- match: "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
1292
- }
1293
- ]
1294
- },
1295
- parameters: {
1296
- name: "meta.function.parameters.python",
1297
- begin: "(\\()",
1298
- end: "(\\))",
1299
- beginCaptures: {
1300
- "1": {
1301
- name: "punctuation.definition.parameters.begin.python"
1302
- }
1303
- },
1304
- endCaptures: {
1305
- "1": {
1306
- name: "punctuation.definition.parameters.end.python"
1307
- }
1308
- },
1309
- patterns: [
1310
- {
1311
- name: "keyword.operator.positional.parameter.python",
1312
- match: "/"
1313
- },
1314
- {
1315
- name: "keyword.operator.unpacking.parameter.python",
1316
- match: "(\\*\\*|\\*)"
1317
- },
1318
- {
1319
- include: "#lambda-incomplete"
1320
- },
1321
- {
1322
- include: "#illegal-names"
1323
- },
1324
- {
1325
- include: "#illegal-object-name"
1326
- },
1327
- {
1328
- include: "#parameter-special"
1329
- },
1330
- {
1331
- match: "(?x)\n ([[:alpha:]_]\\w*)\n \\s* (?: (,) | (?=[)#\\n=]))\n",
1332
- captures: {
1333
- "1": {
1334
- name: "variable.parameter.function.language.python"
1335
- },
1336
- "2": {
1337
- name: "punctuation.separator.parameters.python"
1338
- }
1339
- }
1340
- },
1341
- {
1342
- include: "#comments"
1343
- },
1344
- {
1345
- include: "#loose-default"
1346
- },
1347
- {
1348
- include: "#annotated-parameter"
1349
- }
1350
- ]
1351
- },
1352
- "parameter-special": {
1353
- match: "(?x)\n \\b ((self)|(cls)) \\b \\s*(?:(,)|(?=\\)))\n",
1354
- captures: {
1355
- "1": {
1356
- name: "variable.parameter.function.language.python"
1357
- },
1358
- "2": {
1359
- name: "variable.parameter.function.language.special.self.python"
1360
- },
1361
- "3": {
1362
- name: "variable.parameter.function.language.special.cls.python"
1363
- },
1364
- "4": {
1365
- name: "punctuation.separator.parameters.python"
1366
- }
1367
- }
1368
- },
1369
- "loose-default": {
1370
- begin: "(=)",
1371
- end: "(,)|(?=\\))",
1372
- beginCaptures: {
1373
- "1": {
1374
- name: "keyword.operator.python"
1375
- }
1376
- },
1377
- endCaptures: {
1378
- "1": {
1379
- name: "punctuation.separator.parameters.python"
1380
- }
1381
- },
1382
- patterns: [
1383
- {
1384
- include: "#expression"
1385
- }
1386
- ]
1387
- },
1388
- "annotated-parameter": {
1389
- begin: "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (:)\n",
1390
- end: "(,)|(?=\\))",
1391
- beginCaptures: {
1392
- "1": {
1393
- name: "variable.parameter.function.language.python"
1394
- },
1395
- "2": {
1396
- name: "punctuation.separator.annotation.python"
1397
- }
1398
- },
1399
- endCaptures: {
1400
- "1": {
1401
- name: "punctuation.separator.parameters.python"
1402
- }
1403
- },
1404
- patterns: [
1405
- {
1406
- include: "#expression"
1407
- },
1408
- {
1409
- name: "keyword.operator.assignment.python",
1410
- match: "=(?!=)"
1411
- }
1412
- ]
1413
- },
1414
- "return-annotation": {
1415
- begin: "(->)",
1416
- end: "(?=:)",
1417
- beginCaptures: {
1418
- "1": {
1419
- name: "punctuation.separator.annotation.result.python"
1420
- }
1421
- },
1422
- patterns: [
1423
- {
1424
- include: "#expression"
1425
- }
1426
- ]
1427
- },
1428
- "item-access": {
1429
- patterns: [
1430
- {
1431
- name: "meta.item-access.python",
1432
- begin: "(?x)\n \\b(?=\n [[:alpha:]_]\\w* \\s* \\[\n )\n",
1433
- end: "(\\])",
1434
- endCaptures: {
1435
- "1": {
1436
- name: "punctuation.definition.arguments.end.python"
1437
- }
1438
- },
1439
- patterns: [
1440
- {
1441
- include: "#item-name"
1442
- },
1443
- {
1444
- include: "#item-index"
1445
- },
1446
- {
1447
- include: "#expression"
1448
- }
1449
- ]
1450
- }
1451
- ]
1452
- },
1453
- "item-name": {
1454
- patterns: [
1455
- {
1456
- include: "#special-variables"
1457
- },
1458
- {
1459
- include: "#builtin-functions"
1460
- },
1461
- {
1462
- include: "#special-names"
1463
- },
1464
- {
1465
- name: "meta.indexed-name.python",
1466
- match: "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
1467
- }
1468
- ]
1469
- },
1470
- "item-index": {
1471
- begin: "(\\[)",
1472
- end: "(?=\\])",
1473
- beginCaptures: {
1474
- "1": {
1475
- name: "punctuation.definition.arguments.begin.python"
1476
- }
1477
- },
1478
- contentName: "meta.item-access.arguments.python",
1479
- patterns: [
1480
- {
1481
- name: "punctuation.separator.slice.python",
1482
- match: ":"
1483
- },
1484
- {
1485
- include: "#expression"
1486
- }
1487
- ]
1488
- },
1489
- decorator: {
1490
- name: "meta.function.decorator.python",
1491
- begin: "(?x)\n ^\\s*\n ((@)) \\s* (?=[[:alpha:]_]\\w*)\n",
1492
- end: "(?x)\n ( \\) )\n # trailing whitespace and comments are legal\n (?: (.*?) (?=\\s*(?:\\#|$)) )\n | (?=\\n|\\#)\n",
1493
- beginCaptures: {
1494
- "1": {
1495
- name: "entity.name.function.decorator.python"
1496
- },
1497
- "2": {
1498
- name: "punctuation.definition.decorator.python"
1499
- }
1500
- },
1501
- endCaptures: {
1502
- "1": {
1503
- name: "punctuation.definition.arguments.end.python"
1504
- },
1505
- "2": {
1506
- name: "invalid.illegal.decorator.python"
1507
- }
1508
- },
1509
- patterns: [
1510
- {
1511
- include: "#decorator-name"
1512
- },
1513
- {
1514
- include: "#function-arguments"
1515
- }
1516
- ]
1517
- },
1518
- "decorator-name": {
1519
- patterns: [
1520
- {
1521
- include: "#builtin-callables"
1522
- },
1523
- {
1524
- include: "#illegal-object-name"
1525
- },
1526
- {
1527
- name: "entity.name.function.decorator.python",
1528
- match: "(?x)\n ([[:alpha:]_]\\w*) | (\\.)\n",
1529
- captures: {
1530
- "2": {
1531
- name: "punctuation.separator.period.python"
1532
- }
1533
- }
1534
- },
1535
- {
1536
- include: "#line-continuation"
1537
- },
1538
- {
1539
- name: "invalid.illegal.decorator.python",
1540
- match: "(?x)\n \\s* ([^([:alpha:]\\s_\\.#\\\\] .*?) (?=\\#|$)\n",
1541
- captures: {
1542
- "1": {
1543
- name: "invalid.illegal.decorator.python"
1544
- }
1545
- }
1546
- }
1547
- ]
1548
- },
1549
- "call-wrapper-inheritance": {
1550
- comment: "same as a function call, but in inheritance context",
1551
- name: "meta.function-call.python",
1552
- begin: "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n",
1553
- end: "(\\))",
1554
- endCaptures: {
1555
- "1": {
1556
- name: "punctuation.definition.arguments.end.python"
1557
- }
1558
- },
1559
- patterns: [
1560
- {
1561
- include: "#inheritance-name"
1562
- },
1563
- {
1564
- include: "#function-arguments"
1565
- }
1566
- ]
1567
- },
1568
- "inheritance-name": {
1569
- patterns: [
1570
- {
1571
- include: "#lambda-incomplete"
1572
- },
1573
- {
1574
- include: "#builtin-possible-callables"
1575
- },
1576
- {
1577
- include: "#inheritance-identifier"
1578
- }
1579
- ]
1580
- },
1581
- "function-call": {
1582
- name: "meta.function-call.python",
1583
- comment: "Regular function call of the type \"name(args)\"",
1584
- begin: "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n",
1585
- end: "(\\))",
1586
- endCaptures: {
1587
- "1": {
1588
- name: "punctuation.definition.arguments.end.python"
1589
- }
1590
- },
1591
- patterns: [
1592
- {
1593
- include: "#special-variables"
1594
- },
1595
- {
1596
- include: "#function-name"
1597
- },
1598
- {
1599
- include: "#function-arguments"
1600
- }
1601
- ]
1602
- },
1603
- "function-name": {
1604
- patterns: [
1605
- {
1606
- include: "#builtin-possible-callables"
1607
- },
1608
- {
1609
- comment: "Some color schemas support meta.function-call.generic scope",
1610
- name: "meta.function-call.generic.python",
1611
- match: "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
1612
- }
1613
- ]
1614
- },
1615
- "function-arguments": {
1616
- begin: "(\\()",
1617
- end: "(?=\\))(?!\\)\\s*\\()",
1618
- beginCaptures: {
1619
- "1": {
1620
- name: "punctuation.definition.arguments.begin.python"
1621
- }
1622
- },
1623
- contentName: "meta.function-call.arguments.python",
1624
- patterns: [
1625
- {
1626
- name: "punctuation.separator.arguments.python",
1627
- match: "(,)"
1628
- },
1629
- {
1630
- match: "(?x)\n (?:(?<=[,(])|^) \\s* (\\*{1,2})\n",
1631
- captures: {
1632
- "1": {
1633
- name: "keyword.operator.unpacking.arguments.python"
1634
- }
1635
- }
1636
- },
1637
- {
1638
- include: "#lambda-incomplete"
1639
- },
1640
- {
1641
- include: "#illegal-names"
1642
- },
1643
- {
1644
- match: "\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)",
1645
- captures: {
1646
- "1": {
1647
- name: "variable.parameter.function-call.python"
1648
- },
1649
- "2": {
1650
- name: "keyword.operator.assignment.python"
1651
- }
1652
- }
1653
- },
1654
- {
1655
- name: "keyword.operator.assignment.python",
1656
- match: "=(?!=)"
1657
- },
1658
- {
1659
- include: "#expression"
1660
- },
1661
- {
1662
- match: "\\s*(\\))\\s*(\\()",
1663
- captures: {
1664
- "1": {
1665
- name: "punctuation.definition.arguments.end.python"
1666
- },
1667
- "2": {
1668
- name: "punctuation.definition.arguments.begin.python"
1669
- }
1670
- }
1671
- }
1672
- ]
1673
- },
1674
- "builtin-callables": {
1675
- patterns: [
1676
- {
1677
- include: "#illegal-names"
1678
- },
1679
- {
1680
- include: "#illegal-object-name"
1681
- },
1682
- {
1683
- include: "#builtin-exceptions"
1684
- },
1685
- {
1686
- include: "#builtin-functions"
1687
- },
1688
- {
1689
- include: "#builtin-types"
1690
- }
1691
- ]
1692
- },
1693
- "builtin-possible-callables": {
1694
- patterns: [
1695
- {
1696
- include: "#builtin-callables"
1697
- },
1698
- {
1699
- include: "#magic-names"
1700
- }
1701
- ]
1702
- },
1703
- "builtin-exceptions": {
1704
- name: "support.type.exception.python",
1705
- match: "(?x) (?<!\\.) \\b(\n (\n Arithmetic | Assertion | Attribute | Buffer | BlockingIO\n | BrokenPipe | ChildProcess\n | (Connection (Aborted | Refused | Reset)?)\n | EOF | Environment | FileExists | FileNotFound\n | FloatingPoint | IO | Import | Indentation | Index | Interrupted\n | IsADirectory | NotADirectory | Permission | ProcessLookup\n | Timeout\n | Key | Lookup | Memory | Name | NotImplemented | OS | Overflow\n | Reference | Runtime | Recursion | Syntax | System\n | Tab | Type | UnboundLocal | Unicode(Encode|Decode|Translate)?\n | Value | Windows | ZeroDivision | ModuleNotFound\n ) Error\n|\n ((Pending)?Deprecation | Runtime | Syntax | User | Future | Import\n | Unicode | Bytes | Resource\n )? Warning\n|\n SystemExit | Stop(Async)?Iteration\n | KeyboardInterrupt\n | GeneratorExit | (Base)?Exception\n)\\b\n"
1706
- },
1707
- "builtin-functions": {
1708
- patterns: [
1709
- {
1710
- name: "support.function.builtin.python",
1711
- match: "(?x)\n (?<!\\.) \\b(\n __import__ | abs | aiter | all | any | anext | ascii | bin\n | breakpoint | callable | chr | compile | copyright | credits\n | delattr | dir | divmod | enumerate | eval | exec | exit\n | filter | format | getattr | globals | hasattr | hash | help\n | hex | id | input | isinstance | issubclass | iter | len\n | license | locals | map | max | memoryview | min | next\n | oct | open | ord | pow | print | quit | range | reload | repr\n | reversed | round | setattr | sorted | sum | vars | zip\n )\\b\n"
1712
- },
1713
- {
1714
- name: "variable.legacy.builtin.python",
1715
- match: "(?x)\n (?<!\\.) \\b(\n file | reduce | intern | raw_input | unicode | cmp | basestring\n | execfile | long | xrange\n )\\b\n"
1716
- }
1717
- ]
1718
- },
1719
- "builtin-types": {
1720
- name: "support.type.python",
1721
- match: "(?x)\n (?<!\\.) \\b(\n bool | bytearray | bytes | classmethod | complex | dict\n | float | frozenset | int | list | object | property\n | set | slice | staticmethod | str | tuple | type\n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n"
1722
- },
1723
- "magic-function-names": {
1724
- comment: "these methods have magic interpretation by python and are generally called\nindirectly through syntactic constructs\n",
1725
- match: "(?x)\n \\b(\n __(?:\n abs | add | aenter | aexit | aiter | and | anext\n | await | bool | call | ceil | class_getitem\n | cmp | coerce | complex | contains | copy\n | deepcopy | del | delattr | delete | delitem\n | delslice | dir | div | divmod | enter | eq\n | exit | float | floor | floordiv | format | ge\n | get | getattr | getattribute | getinitargs\n | getitem | getnewargs | getslice | getstate | gt\n | hash | hex | iadd | iand | idiv | ifloordiv |\n | ilshift | imod | imul | index | init\n | instancecheck | int | invert | ior | ipow\n | irshift | isub | iter | itruediv | ixor | le\n | len | long | lshift | lt | missing | mod | mul\n | ne | neg | new | next | nonzero | oct | or | pos\n | pow | radd | rand | rdiv | rdivmod | reduce\n | reduce_ex | repr | reversed | rfloordiv |\n | rlshift | rmod | rmul | ror | round | rpow\n | rrshift | rshift | rsub | rtruediv | rxor | set\n | setattr | setitem | set_name | setslice\n | setstate | sizeof | str | sub | subclasscheck\n | truediv | trunc | unicode | xor | matmul\n | rmatmul | imatmul | init_subclass | set_name\n | fspath | bytes | prepare | length_hint\n )__\n )\\b\n",
1726
- captures: {
1727
- "1": {
1728
- name: "support.function.magic.python"
1729
- }
1730
- }
1731
- },
1732
- "magic-variable-names": {
1733
- comment: "magic variables which a class/module may have.",
1734
- match: "(?x)\n \\b(\n __(?:\n all | annotations | bases | builtins | class\n | closure | code | debug | defaults | dict | doc | file | func\n | globals | kwdefaults | match_args | members | metaclass | methods\n | module | mro | mro_entries | name | qualname | post_init | self\n | signature | slots | subclasses | version | weakref | wrapped\n | classcell | spec | path | package | future | traceback\n )__\n )\\b\n",
1735
- captures: {
1736
- "1": {
1737
- name: "support.variable.magic.python"
1738
- }
1739
- }
1740
- },
1741
- "magic-names": {
1742
- patterns: [
1743
- {
1744
- include: "#magic-function-names"
1745
- },
1746
- {
1747
- include: "#magic-variable-names"
1748
- }
1749
- ]
1750
- },
1751
- "illegal-names": {
1752
- match: "(?x)\n \\b(?:\n (\n and | assert | async | await | break | class | continue | def\n | del | elif | else | except | finally | for | from | global\n | if | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])\n | nonlocal | not | or | pass | raise | return | try | while | with\n | yield\n ) | (\n as | import\n )\n )\\b\n",
1753
- captures: {
1754
- "1": {
1755
- name: "keyword.control.flow.python"
1756
- },
1757
- "2": {
1758
- name: "keyword.control.import.python"
1759
- }
1760
- }
1761
- },
1762
- "special-variables": {
1763
- match: "(?x)\n \\b (?<!\\.) (?:\n (self) | (cls)\n )\\b\n",
1764
- captures: {
1765
- "1": {
1766
- name: "variable.language.special.self.python"
1767
- },
1768
- "2": {
1769
- name: "variable.language.special.cls.python"
1770
- }
1771
- }
1772
- },
1773
- ellipsis: {
1774
- name: "constant.other.ellipsis.python",
1775
- match: "\\.\\.\\."
1776
- },
1777
- backticks: {
1778
- name: "invalid.deprecated.backtick.python",
1779
- begin: "\\`",
1780
- end: "(?:\\`|(?<!\\\\)(\\n))",
1781
- patterns: [
1782
- {
1783
- include: "#expression"
1784
- }
1785
- ]
1786
- },
1787
- "illegal-operator": {
1788
- patterns: [
1789
- {
1790
- name: "invalid.illegal.operator.python",
1791
- match: "&&|\\|\\||--|\\+\\+"
1792
- },
1793
- {
1794
- name: "invalid.illegal.operator.python",
1795
- match: "[?$]"
1796
- },
1797
- {
1798
- name: "invalid.illegal.operator.python",
1799
- comment: "We don't want `!` to flash when we're typing `!=`",
1800
- match: "!\\b"
1801
- }
1802
- ]
1803
- },
1804
- "illegal-object-name": {
1805
- comment: "It's illegal to name class or function \"True\"",
1806
- name: "keyword.illegal.name.python",
1807
- match: "\\b(True|False|None)\\b"
1808
- },
1809
- "illegal-anno": {
1810
- name: "invalid.illegal.annotation.python",
1811
- match: "->"
1812
- },
1813
- "regexp-base-expression": {
1814
- patterns: [
1815
- {
1816
- include: "#regexp-quantifier"
1817
- },
1818
- {
1819
- include: "#regexp-base-common"
1820
- }
1821
- ]
1822
- },
1823
- "fregexp-base-expression": {
1824
- patterns: [
1825
- {
1826
- include: "#fregexp-quantifier"
1827
- },
1828
- {
1829
- include: "#fstring-formatting-braces"
1830
- },
1831
- {
1832
- match: "\\{.*?\\}"
1833
- },
1834
- {
1835
- include: "#regexp-base-common"
1836
- }
1837
- ]
1838
- },
1839
- "fstring-formatting-braces": {
1840
- patterns: [
1841
- {
1842
- comment: "empty braces are illegal",
1843
- match: "({)(\\s*?)(})",
1844
- captures: {
1845
- "1": {
1846
- name: "constant.character.format.placeholder.other.python"
1847
- },
1848
- "2": {
1849
- name: "invalid.illegal.brace.python"
1850
- },
1851
- "3": {
1852
- name: "constant.character.format.placeholder.other.python"
1853
- }
1854
- }
1855
- },
1856
- {
1857
- name: "constant.character.escape.python",
1858
- match: "({{|}})"
1859
- }
1860
- ]
1861
- },
1862
- "regexp-base-common": {
1863
- patterns: [
1864
- {
1865
- name: "support.other.match.any.regexp",
1866
- match: "\\."
1867
- },
1868
- {
1869
- name: "support.other.match.begin.regexp",
1870
- match: "\\^"
1871
- },
1872
- {
1873
- name: "support.other.match.end.regexp",
1874
- match: "\\$"
1875
- },
1876
- {
1877
- name: "keyword.operator.quantifier.regexp",
1878
- match: "[+*?]\\??"
1879
- },
1880
- {
1881
- name: "keyword.operator.disjunction.regexp",
1882
- match: "\\|"
1883
- },
1884
- {
1885
- include: "#regexp-escape-sequence"
1886
- }
1887
- ]
1888
- },
1889
- "regexp-quantifier": {
1890
- name: "keyword.operator.quantifier.regexp",
1891
- match: "(?x)\n \\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\n"
1892
- },
1893
- "fregexp-quantifier": {
1894
- name: "keyword.operator.quantifier.regexp",
1895
- match: "(?x)\n \\{\\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\\}\n"
1896
- },
1897
- "regexp-backreference-number": {
1898
- name: "meta.backreference.regexp",
1899
- match: "(\\\\[1-9]\\d?)",
1900
- captures: {
1901
- "1": {
1902
- name: "entity.name.tag.backreference.regexp"
1903
- }
1904
- }
1905
- },
1906
- "regexp-backreference": {
1907
- name: "meta.backreference.named.regexp",
1908
- match: "(?x)\n (\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))\n",
1909
- captures: {
1910
- "1": {
1911
- name: "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.begin.regexp"
1912
- },
1913
- "2": {
1914
- name: "entity.name.tag.named.backreference.regexp"
1915
- },
1916
- "3": {
1917
- name: "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp"
1918
- }
1919
- }
1920
- },
1921
- "regexp-flags": {
1922
- name: "storage.modifier.flag.regexp",
1923
- match: "\\(\\?[aiLmsux]+\\)"
1924
- },
1925
- "regexp-escape-special": {
1926
- name: "support.other.escape.special.regexp",
1927
- match: "\\\\([AbBdDsSwWZ])"
1928
- },
1929
- "regexp-escape-character": {
1930
- name: "constant.character.escape.regexp",
1931
- match: "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | 0[0-7]{1,2}\n | [0-7]{3}\n )\n"
1932
- },
1933
- "regexp-escape-unicode": {
1934
- name: "constant.character.unicode.regexp",
1935
- match: "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n )\n"
1936
- },
1937
- "regexp-escape-catchall": {
1938
- name: "constant.character.escape.regexp",
1939
- match: "\\\\(.|\\n)"
1940
- },
1941
- "regexp-escape-sequence": {
1942
- patterns: [
1943
- {
1944
- include: "#regexp-escape-special"
1945
- },
1946
- {
1947
- include: "#regexp-escape-character"
1948
- },
1949
- {
1950
- include: "#regexp-escape-unicode"
1951
- },
1952
- {
1953
- include: "#regexp-backreference-number"
1954
- },
1955
- {
1956
- include: "#regexp-escape-catchall"
1957
- }
1958
- ]
1959
- },
1960
- "regexp-charecter-set-escapes": {
1961
- patterns: [
1962
- {
1963
- name: "constant.character.escape.regexp",
1964
- match: "\\\\[abfnrtv\\\\]"
1965
- },
1966
- {
1967
- include: "#regexp-escape-special"
1968
- },
1969
- {
1970
- name: "constant.character.escape.regexp",
1971
- match: "\\\\([0-7]{1,3})"
1972
- },
1973
- {
1974
- include: "#regexp-escape-character"
1975
- },
1976
- {
1977
- include: "#regexp-escape-unicode"
1978
- },
1979
- {
1980
- include: "#regexp-escape-catchall"
1981
- }
1982
- ]
1983
- },
1984
- codetags: {
1985
- match: "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)",
1986
- captures: {
1987
- "1": {
1988
- name: "keyword.codetag.notation.python"
1989
- }
1990
- }
1991
- },
1992
- "comments-base": {
1993
- name: "comment.line.number-sign.python",
1994
- begin: "(\\#)",
1995
- beginCaptures: {
1996
- "1": {
1997
- name: "punctuation.definition.comment.python"
1998
- }
1999
- },
2000
- end: "($)",
2001
- patterns: [
2002
- {
2003
- include: "#codetags"
2004
- }
2005
- ]
2006
- },
2007
- "comments-string-single-three": {
2008
- name: "comment.line.number-sign.python",
2009
- begin: "(\\#)",
2010
- beginCaptures: {
2011
- "1": {
2012
- name: "punctuation.definition.comment.python"
2013
- }
2014
- },
2015
- end: "($|(?='''))",
2016
- patterns: [
2017
- {
2018
- include: "#codetags"
2019
- }
2020
- ]
2021
- },
2022
- "comments-string-double-three": {
2023
- name: "comment.line.number-sign.python",
2024
- begin: "(\\#)",
2025
- beginCaptures: {
2026
- "1": {
2027
- name: "punctuation.definition.comment.python"
2028
- }
2029
- },
2030
- end: "($|(?=\"\"\"))",
2031
- patterns: [
2032
- {
2033
- include: "#codetags"
2034
- }
2035
- ]
2036
- },
2037
- "single-one-regexp-expression": {
2038
- patterns: [
2039
- {
2040
- include: "#regexp-base-expression"
2041
- },
2042
- {
2043
- include: "#single-one-regexp-character-set"
2044
- },
2045
- {
2046
- include: "#single-one-regexp-comments"
2047
- },
2048
- {
2049
- include: "#regexp-flags"
2050
- },
2051
- {
2052
- include: "#single-one-regexp-named-group"
2053
- },
2054
- {
2055
- include: "#regexp-backreference"
2056
- },
2057
- {
2058
- include: "#single-one-regexp-lookahead"
2059
- },
2060
- {
2061
- include: "#single-one-regexp-lookahead-negative"
2062
- },
2063
- {
2064
- include: "#single-one-regexp-lookbehind"
2065
- },
2066
- {
2067
- include: "#single-one-regexp-lookbehind-negative"
2068
- },
2069
- {
2070
- include: "#single-one-regexp-conditional"
2071
- },
2072
- {
2073
- include: "#single-one-regexp-parentheses-non-capturing"
2074
- },
2075
- {
2076
- include: "#single-one-regexp-parentheses"
2077
- }
2078
- ]
2079
- },
2080
- "single-one-regexp-character-set": {
2081
- patterns: [
2082
- {
2083
- match: "(?x)\n \\[ \\^? \\] (?! .*?\\])\n"
2084
- },
2085
- {
2086
- name: "meta.character.set.regexp",
2087
- begin: "(\\[)(\\^)?(\\])?",
2088
- end: "(\\]|(?=\\'))|((?=(?<!\\\\)\\n))",
2089
- beginCaptures: {
2090
- "1": {
2091
- name: "punctuation.character.set.begin.regexp constant.other.set.regexp"
2092
- },
2093
- "2": {
2094
- name: "keyword.operator.negation.regexp"
2095
- },
2096
- "3": {
2097
- name: "constant.character.set.regexp"
2098
- }
2099
- },
2100
- endCaptures: {
2101
- "1": {
2102
- name: "punctuation.character.set.end.regexp constant.other.set.regexp"
2103
- },
2104
- "2": {
2105
- name: "invalid.illegal.newline.python"
2106
- }
2107
- },
2108
- patterns: [
2109
- {
2110
- include: "#regexp-charecter-set-escapes"
2111
- },
2112
- {
2113
- name: "constant.character.set.regexp",
2114
- match: "[^\\n]"
2115
- }
2116
- ]
2117
- }
2118
- ]
2119
- },
2120
- "single-one-regexp-named-group": {
2121
- name: "meta.named.regexp",
2122
- begin: "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
2123
- end: "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2124
- beginCaptures: {
2125
- "1": {
2126
- name: "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
2127
- },
2128
- "2": {
2129
- name: "entity.name.tag.named.group.regexp"
2130
- }
2131
- },
2132
- endCaptures: {
2133
- "1": {
2134
- name: "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
2135
- },
2136
- "2": {
2137
- name: "invalid.illegal.newline.python"
2138
- }
2139
- },
2140
- patterns: [
2141
- {
2142
- include: "#single-one-regexp-expression"
2143
- }
2144
- ]
2145
- },
2146
- "single-one-regexp-comments": {
2147
- name: "comment.regexp",
2148
- begin: "\\(\\?#",
2149
- end: "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2150
- beginCaptures: {
2151
- "0": {
2152
- name: "punctuation.comment.begin.regexp"
2153
- }
2154
- },
2155
- endCaptures: {
2156
- "1": {
2157
- name: "punctuation.comment.end.regexp"
2158
- },
2159
- "2": {
2160
- name: "invalid.illegal.newline.python"
2161
- }
2162
- },
2163
- patterns: [
2164
- {
2165
- include: "#codetags"
2166
- }
2167
- ]
2168
- },
2169
- "single-one-regexp-lookahead": {
2170
- begin: "(\\()\\?=",
2171
- end: "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2172
- beginCaptures: {
2173
- "0": {
2174
- name: "keyword.operator.lookahead.regexp"
2175
- },
2176
- "1": {
2177
- name: "punctuation.parenthesis.lookahead.begin.regexp"
2178
- }
2179
- },
2180
- endCaptures: {
2181
- "1": {
2182
- name: "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
2183
- },
2184
- "2": {
2185
- name: "invalid.illegal.newline.python"
2186
- }
2187
- },
2188
- patterns: [
2189
- {
2190
- include: "#single-one-regexp-expression"
2191
- }
2192
- ]
2193
- },
2194
- "single-one-regexp-lookahead-negative": {
2195
- begin: "(\\()\\?!",
2196
- end: "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2197
- beginCaptures: {
2198
- "0": {
2199
- name: "keyword.operator.lookahead.negative.regexp"
2200
- },
2201
- "1": {
2202
- name: "punctuation.parenthesis.lookahead.begin.regexp"
2203
- }
2204
- },
2205
- endCaptures: {
2206
- "1": {
2207
- name: "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
2208
- },
2209
- "2": {
2210
- name: "invalid.illegal.newline.python"
2211
- }
2212
- },
2213
- patterns: [
2214
- {
2215
- include: "#single-one-regexp-expression"
2216
- }
2217
- ]
2218
- },
2219
- "single-one-regexp-lookbehind": {
2220
- begin: "(\\()\\?<=",
2221
- end: "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2222
- beginCaptures: {
2223
- "0": {
2224
- name: "keyword.operator.lookbehind.regexp"
2225
- },
2226
- "1": {
2227
- name: "punctuation.parenthesis.lookbehind.begin.regexp"
2228
- }
2229
- },
2230
- endCaptures: {
2231
- "1": {
2232
- name: "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
2233
- },
2234
- "2": {
2235
- name: "invalid.illegal.newline.python"
2236
- }
2237
- },
2238
- patterns: [
2239
- {
2240
- include: "#single-one-regexp-expression"
2241
- }
2242
- ]
2243
- },
2244
- "single-one-regexp-lookbehind-negative": {
2245
- begin: "(\\()\\?<!",
2246
- end: "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2247
- beginCaptures: {
2248
- "0": {
2249
- name: "keyword.operator.lookbehind.negative.regexp"
2250
- },
2251
- "1": {
2252
- name: "punctuation.parenthesis.lookbehind.begin.regexp"
2253
- }
2254
- },
2255
- endCaptures: {
2256
- "1": {
2257
- name: "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
2258
- },
2259
- "2": {
2260
- name: "invalid.illegal.newline.python"
2261
- }
2262
- },
2263
- patterns: [
2264
- {
2265
- include: "#single-one-regexp-expression"
2266
- }
2267
- ]
2268
- },
2269
- "single-one-regexp-conditional": {
2270
- begin: "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
2271
- end: "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2272
- beginCaptures: {
2273
- "0": {
2274
- name: "keyword.operator.conditional.regexp"
2275
- },
2276
- "1": {
2277
- name: "punctuation.parenthesis.conditional.begin.regexp"
2278
- }
2279
- },
2280
- endCaptures: {
2281
- "1": {
2282
- name: "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
2283
- },
2284
- "2": {
2285
- name: "invalid.illegal.newline.python"
2286
- }
2287
- },
2288
- patterns: [
2289
- {
2290
- include: "#single-one-regexp-expression"
2291
- }
2292
- ]
2293
- },
2294
- "single-one-regexp-parentheses-non-capturing": {
2295
- begin: "\\(\\?:",
2296
- end: "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2297
- beginCaptures: {
2298
- "0": {
2299
- name: "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
2300
- }
2301
- },
2302
- endCaptures: {
2303
- "1": {
2304
- name: "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
2305
- },
2306
- "2": {
2307
- name: "invalid.illegal.newline.python"
2308
- }
2309
- },
2310
- patterns: [
2311
- {
2312
- include: "#single-one-regexp-expression"
2313
- }
2314
- ]
2315
- },
2316
- "single-one-regexp-parentheses": {
2317
- begin: "\\(",
2318
- end: "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2319
- beginCaptures: {
2320
- "0": {
2321
- name: "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
2322
- }
2323
- },
2324
- endCaptures: {
2325
- "1": {
2326
- name: "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
2327
- },
2328
- "2": {
2329
- name: "invalid.illegal.newline.python"
2330
- }
2331
- },
2332
- patterns: [
2333
- {
2334
- include: "#single-one-regexp-expression"
2335
- }
2336
- ]
2337
- },
2338
- "single-three-regexp-expression": {
2339
- patterns: [
2340
- {
2341
- include: "#regexp-base-expression"
2342
- },
2343
- {
2344
- include: "#single-three-regexp-character-set"
2345
- },
2346
- {
2347
- include: "#single-three-regexp-comments"
2348
- },
2349
- {
2350
- include: "#regexp-flags"
2351
- },
2352
- {
2353
- include: "#single-three-regexp-named-group"
2354
- },
2355
- {
2356
- include: "#regexp-backreference"
2357
- },
2358
- {
2359
- include: "#single-three-regexp-lookahead"
2360
- },
2361
- {
2362
- include: "#single-three-regexp-lookahead-negative"
2363
- },
2364
- {
2365
- include: "#single-three-regexp-lookbehind"
2366
- },
2367
- {
2368
- include: "#single-three-regexp-lookbehind-negative"
2369
- },
2370
- {
2371
- include: "#single-three-regexp-conditional"
2372
- },
2373
- {
2374
- include: "#single-three-regexp-parentheses-non-capturing"
2375
- },
2376
- {
2377
- include: "#single-three-regexp-parentheses"
2378
- },
2379
- {
2380
- include: "#comments-string-single-three"
2381
- }
2382
- ]
2383
- },
2384
- "single-three-regexp-character-set": {
2385
- patterns: [
2386
- {
2387
- match: "(?x)\n \\[ \\^? \\] (?! .*?\\])\n"
2388
- },
2389
- {
2390
- name: "meta.character.set.regexp",
2391
- begin: "(\\[)(\\^)?(\\])?",
2392
- end: "(\\]|(?=\\'\\'\\'))",
2393
- beginCaptures: {
2394
- "1": {
2395
- name: "punctuation.character.set.begin.regexp constant.other.set.regexp"
2396
- },
2397
- "2": {
2398
- name: "keyword.operator.negation.regexp"
2399
- },
2400
- "3": {
2401
- name: "constant.character.set.regexp"
2402
- }
2403
- },
2404
- endCaptures: {
2405
- "1": {
2406
- name: "punctuation.character.set.end.regexp constant.other.set.regexp"
2407
- },
2408
- "2": {
2409
- name: "invalid.illegal.newline.python"
2410
- }
2411
- },
2412
- patterns: [
2413
- {
2414
- include: "#regexp-charecter-set-escapes"
2415
- },
2416
- {
2417
- name: "constant.character.set.regexp",
2418
- match: "[^\\n]"
2419
- }
2420
- ]
2421
- }
2422
- ]
2423
- },
2424
- "single-three-regexp-named-group": {
2425
- name: "meta.named.regexp",
2426
- begin: "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
2427
- end: "(\\)|(?=\\'\\'\\'))",
2428
- beginCaptures: {
2429
- "1": {
2430
- name: "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
2431
- },
2432
- "2": {
2433
- name: "entity.name.tag.named.group.regexp"
2434
- }
2435
- },
2436
- endCaptures: {
2437
- "1": {
2438
- name: "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
2439
- },
2440
- "2": {
2441
- name: "invalid.illegal.newline.python"
2442
- }
2443
- },
2444
- patterns: [
2445
- {
2446
- include: "#single-three-regexp-expression"
2447
- },
2448
- {
2449
- include: "#comments-string-single-three"
2450
- }
2451
- ]
2452
- },
2453
- "single-three-regexp-comments": {
2454
- name: "comment.regexp",
2455
- begin: "\\(\\?#",
2456
- end: "(\\)|(?=\\'\\'\\'))",
2457
- beginCaptures: {
2458
- "0": {
2459
- name: "punctuation.comment.begin.regexp"
2460
- }
2461
- },
2462
- endCaptures: {
2463
- "1": {
2464
- name: "punctuation.comment.end.regexp"
2465
- },
2466
- "2": {
2467
- name: "invalid.illegal.newline.python"
2468
- }
2469
- },
2470
- patterns: [
2471
- {
2472
- include: "#codetags"
2473
- }
2474
- ]
2475
- },
2476
- "single-three-regexp-lookahead": {
2477
- begin: "(\\()\\?=",
2478
- end: "(\\)|(?=\\'\\'\\'))",
2479
- beginCaptures: {
2480
- "0": {
2481
- name: "keyword.operator.lookahead.regexp"
2482
- },
2483
- "1": {
2484
- name: "punctuation.parenthesis.lookahead.begin.regexp"
2485
- }
2486
- },
2487
- endCaptures: {
2488
- "1": {
2489
- name: "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
2490
- },
2491
- "2": {
2492
- name: "invalid.illegal.newline.python"
2493
- }
2494
- },
2495
- patterns: [
2496
- {
2497
- include: "#single-three-regexp-expression"
2498
- },
2499
- {
2500
- include: "#comments-string-single-three"
2501
- }
2502
- ]
2503
- },
2504
- "single-three-regexp-lookahead-negative": {
2505
- begin: "(\\()\\?!",
2506
- end: "(\\)|(?=\\'\\'\\'))",
2507
- beginCaptures: {
2508
- "0": {
2509
- name: "keyword.operator.lookahead.negative.regexp"
2510
- },
2511
- "1": {
2512
- name: "punctuation.parenthesis.lookahead.begin.regexp"
2513
- }
2514
- },
2515
- endCaptures: {
2516
- "1": {
2517
- name: "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
2518
- },
2519
- "2": {
2520
- name: "invalid.illegal.newline.python"
2521
- }
2522
- },
2523
- patterns: [
2524
- {
2525
- include: "#single-three-regexp-expression"
2526
- },
2527
- {
2528
- include: "#comments-string-single-three"
2529
- }
2530
- ]
2531
- },
2532
- "single-three-regexp-lookbehind": {
2533
- begin: "(\\()\\?<=",
2534
- end: "(\\)|(?=\\'\\'\\'))",
2535
- beginCaptures: {
2536
- "0": {
2537
- name: "keyword.operator.lookbehind.regexp"
2538
- },
2539
- "1": {
2540
- name: "punctuation.parenthesis.lookbehind.begin.regexp"
2541
- }
2542
- },
2543
- endCaptures: {
2544
- "1": {
2545
- name: "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
2546
- },
2547
- "2": {
2548
- name: "invalid.illegal.newline.python"
2549
- }
2550
- },
2551
- patterns: [
2552
- {
2553
- include: "#single-three-regexp-expression"
2554
- },
2555
- {
2556
- include: "#comments-string-single-three"
2557
- }
2558
- ]
2559
- },
2560
- "single-three-regexp-lookbehind-negative": {
2561
- begin: "(\\()\\?<!",
2562
- end: "(\\)|(?=\\'\\'\\'))",
2563
- beginCaptures: {
2564
- "0": {
2565
- name: "keyword.operator.lookbehind.negative.regexp"
2566
- },
2567
- "1": {
2568
- name: "punctuation.parenthesis.lookbehind.begin.regexp"
2569
- }
2570
- },
2571
- endCaptures: {
2572
- "1": {
2573
- name: "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
2574
- },
2575
- "2": {
2576
- name: "invalid.illegal.newline.python"
2577
- }
2578
- },
2579
- patterns: [
2580
- {
2581
- include: "#single-three-regexp-expression"
2582
- },
2583
- {
2584
- include: "#comments-string-single-three"
2585
- }
2586
- ]
2587
- },
2588
- "single-three-regexp-conditional": {
2589
- begin: "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
2590
- end: "(\\)|(?=\\'\\'\\'))",
2591
- beginCaptures: {
2592
- "0": {
2593
- name: "keyword.operator.conditional.regexp"
2594
- },
2595
- "1": {
2596
- name: "punctuation.parenthesis.conditional.begin.regexp"
2597
- }
2598
- },
2599
- endCaptures: {
2600
- "1": {
2601
- name: "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
2602
- },
2603
- "2": {
2604
- name: "invalid.illegal.newline.python"
2605
- }
2606
- },
2607
- patterns: [
2608
- {
2609
- include: "#single-three-regexp-expression"
2610
- },
2611
- {
2612
- include: "#comments-string-single-three"
2613
- }
2614
- ]
2615
- },
2616
- "single-three-regexp-parentheses-non-capturing": {
2617
- begin: "\\(\\?:",
2618
- end: "(\\)|(?=\\'\\'\\'))",
2619
- beginCaptures: {
2620
- "0": {
2621
- name: "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
2622
- }
2623
- },
2624
- endCaptures: {
2625
- "1": {
2626
- name: "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
2627
- },
2628
- "2": {
2629
- name: "invalid.illegal.newline.python"
2630
- }
2631
- },
2632
- patterns: [
2633
- {
2634
- include: "#single-three-regexp-expression"
2635
- },
2636
- {
2637
- include: "#comments-string-single-three"
2638
- }
2639
- ]
2640
- },
2641
- "single-three-regexp-parentheses": {
2642
- begin: "\\(",
2643
- end: "(\\)|(?=\\'\\'\\'))",
2644
- beginCaptures: {
2645
- "0": {
2646
- name: "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
2647
- }
2648
- },
2649
- endCaptures: {
2650
- "1": {
2651
- name: "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
2652
- },
2653
- "2": {
2654
- name: "invalid.illegal.newline.python"
2655
- }
2656
- },
2657
- patterns: [
2658
- {
2659
- include: "#single-three-regexp-expression"
2660
- },
2661
- {
2662
- include: "#comments-string-single-three"
2663
- }
2664
- ]
2665
- },
2666
- "double-one-regexp-expression": {
2667
- patterns: [
2668
- {
2669
- include: "#regexp-base-expression"
2670
- },
2671
- {
2672
- include: "#double-one-regexp-character-set"
2673
- },
2674
- {
2675
- include: "#double-one-regexp-comments"
2676
- },
2677
- {
2678
- include: "#regexp-flags"
2679
- },
2680
- {
2681
- include: "#double-one-regexp-named-group"
2682
- },
2683
- {
2684
- include: "#regexp-backreference"
2685
- },
2686
- {
2687
- include: "#double-one-regexp-lookahead"
2688
- },
2689
- {
2690
- include: "#double-one-regexp-lookahead-negative"
2691
- },
2692
- {
2693
- include: "#double-one-regexp-lookbehind"
2694
- },
2695
- {
2696
- include: "#double-one-regexp-lookbehind-negative"
2697
- },
2698
- {
2699
- include: "#double-one-regexp-conditional"
2700
- },
2701
- {
2702
- include: "#double-one-regexp-parentheses-non-capturing"
2703
- },
2704
- {
2705
- include: "#double-one-regexp-parentheses"
2706
- }
2707
- ]
2708
- },
2709
- "double-one-regexp-character-set": {
2710
- patterns: [
2711
- {
2712
- match: "(?x)\n \\[ \\^? \\] (?! .*?\\])\n"
2713
- },
2714
- {
2715
- name: "meta.character.set.regexp",
2716
- begin: "(\\[)(\\^)?(\\])?",
2717
- end: "(\\]|(?=\"))|((?=(?<!\\\\)\\n))",
2718
- beginCaptures: {
2719
- "1": {
2720
- name: "punctuation.character.set.begin.regexp constant.other.set.regexp"
2721
- },
2722
- "2": {
2723
- name: "keyword.operator.negation.regexp"
2724
- },
2725
- "3": {
2726
- name: "constant.character.set.regexp"
2727
- }
2728
- },
2729
- endCaptures: {
2730
- "1": {
2731
- name: "punctuation.character.set.end.regexp constant.other.set.regexp"
2732
- },
2733
- "2": {
2734
- name: "invalid.illegal.newline.python"
2735
- }
2736
- },
2737
- patterns: [
2738
- {
2739
- include: "#regexp-charecter-set-escapes"
2740
- },
2741
- {
2742
- name: "constant.character.set.regexp",
2743
- match: "[^\\n]"
2744
- }
2745
- ]
2746
- }
2747
- ]
2748
- },
2749
- "double-one-regexp-named-group": {
2750
- name: "meta.named.regexp",
2751
- begin: "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
2752
- end: "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2753
- beginCaptures: {
2754
- "1": {
2755
- name: "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
2756
- },
2757
- "2": {
2758
- name: "entity.name.tag.named.group.regexp"
2759
- }
2760
- },
2761
- endCaptures: {
2762
- "1": {
2763
- name: "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
2764
- },
2765
- "2": {
2766
- name: "invalid.illegal.newline.python"
2767
- }
2768
- },
2769
- patterns: [
2770
- {
2771
- include: "#double-one-regexp-expression"
2772
- }
2773
- ]
2774
- },
2775
- "double-one-regexp-comments": {
2776
- name: "comment.regexp",
2777
- begin: "\\(\\?#",
2778
- end: "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2779
- beginCaptures: {
2780
- "0": {
2781
- name: "punctuation.comment.begin.regexp"
2782
- }
2783
- },
2784
- endCaptures: {
2785
- "1": {
2786
- name: "punctuation.comment.end.regexp"
2787
- },
2788
- "2": {
2789
- name: "invalid.illegal.newline.python"
2790
- }
2791
- },
2792
- patterns: [
2793
- {
2794
- include: "#codetags"
2795
- }
2796
- ]
2797
- },
2798
- "double-one-regexp-lookahead": {
2799
- begin: "(\\()\\?=",
2800
- end: "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2801
- beginCaptures: {
2802
- "0": {
2803
- name: "keyword.operator.lookahead.regexp"
2804
- },
2805
- "1": {
2806
- name: "punctuation.parenthesis.lookahead.begin.regexp"
2807
- }
2808
- },
2809
- endCaptures: {
2810
- "1": {
2811
- name: "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
2812
- },
2813
- "2": {
2814
- name: "invalid.illegal.newline.python"
2815
- }
2816
- },
2817
- patterns: [
2818
- {
2819
- include: "#double-one-regexp-expression"
2820
- }
2821
- ]
2822
- },
2823
- "double-one-regexp-lookahead-negative": {
2824
- begin: "(\\()\\?!",
2825
- end: "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2826
- beginCaptures: {
2827
- "0": {
2828
- name: "keyword.operator.lookahead.negative.regexp"
2829
- },
2830
- "1": {
2831
- name: "punctuation.parenthesis.lookahead.begin.regexp"
2832
- }
2833
- },
2834
- endCaptures: {
2835
- "1": {
2836
- name: "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
2837
- },
2838
- "2": {
2839
- name: "invalid.illegal.newline.python"
2840
- }
2841
- },
2842
- patterns: [
2843
- {
2844
- include: "#double-one-regexp-expression"
2845
- }
2846
- ]
2847
- },
2848
- "double-one-regexp-lookbehind": {
2849
- begin: "(\\()\\?<=",
2850
- end: "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2851
- beginCaptures: {
2852
- "0": {
2853
- name: "keyword.operator.lookbehind.regexp"
2854
- },
2855
- "1": {
2856
- name: "punctuation.parenthesis.lookbehind.begin.regexp"
2857
- }
2858
- },
2859
- endCaptures: {
2860
- "1": {
2861
- name: "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
2862
- },
2863
- "2": {
2864
- name: "invalid.illegal.newline.python"
2865
- }
2866
- },
2867
- patterns: [
2868
- {
2869
- include: "#double-one-regexp-expression"
2870
- }
2871
- ]
2872
- },
2873
- "double-one-regexp-lookbehind-negative": {
2874
- begin: "(\\()\\?<!",
2875
- end: "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2876
- beginCaptures: {
2877
- "0": {
2878
- name: "keyword.operator.lookbehind.negative.regexp"
2879
- },
2880
- "1": {
2881
- name: "punctuation.parenthesis.lookbehind.begin.regexp"
2882
- }
2883
- },
2884
- endCaptures: {
2885
- "1": {
2886
- name: "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
2887
- },
2888
- "2": {
2889
- name: "invalid.illegal.newline.python"
2890
- }
2891
- },
2892
- patterns: [
2893
- {
2894
- include: "#double-one-regexp-expression"
2895
- }
2896
- ]
2897
- },
2898
- "double-one-regexp-conditional": {
2899
- begin: "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
2900
- end: "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2901
- beginCaptures: {
2902
- "0": {
2903
- name: "keyword.operator.conditional.regexp"
2904
- },
2905
- "1": {
2906
- name: "punctuation.parenthesis.conditional.begin.regexp"
2907
- }
2908
- },
2909
- endCaptures: {
2910
- "1": {
2911
- name: "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
2912
- },
2913
- "2": {
2914
- name: "invalid.illegal.newline.python"
2915
- }
2916
- },
2917
- patterns: [
2918
- {
2919
- include: "#double-one-regexp-expression"
2920
- }
2921
- ]
2922
- },
2923
- "double-one-regexp-parentheses-non-capturing": {
2924
- begin: "\\(\\?:",
2925
- end: "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2926
- beginCaptures: {
2927
- "0": {
2928
- name: "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
2929
- }
2930
- },
2931
- endCaptures: {
2932
- "1": {
2933
- name: "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
2934
- },
2935
- "2": {
2936
- name: "invalid.illegal.newline.python"
2937
- }
2938
- },
2939
- patterns: [
2940
- {
2941
- include: "#double-one-regexp-expression"
2942
- }
2943
- ]
2944
- },
2945
- "double-one-regexp-parentheses": {
2946
- begin: "\\(",
2947
- end: "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2948
- beginCaptures: {
2949
- "0": {
2950
- name: "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
2951
- }
2952
- },
2953
- endCaptures: {
2954
- "1": {
2955
- name: "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
2956
- },
2957
- "2": {
2958
- name: "invalid.illegal.newline.python"
2959
- }
2960
- },
2961
- patterns: [
2962
- {
2963
- include: "#double-one-regexp-expression"
2964
- }
2965
- ]
2966
- },
2967
- "double-three-regexp-expression": {
2968
- patterns: [
2969
- {
2970
- include: "#regexp-base-expression"
2971
- },
2972
- {
2973
- include: "#double-three-regexp-character-set"
2974
- },
2975
- {
2976
- include: "#double-three-regexp-comments"
2977
- },
2978
- {
2979
- include: "#regexp-flags"
2980
- },
2981
- {
2982
- include: "#double-three-regexp-named-group"
2983
- },
2984
- {
2985
- include: "#regexp-backreference"
2986
- },
2987
- {
2988
- include: "#double-three-regexp-lookahead"
2989
- },
2990
- {
2991
- include: "#double-three-regexp-lookahead-negative"
2992
- },
2993
- {
2994
- include: "#double-three-regexp-lookbehind"
2995
- },
2996
- {
2997
- include: "#double-three-regexp-lookbehind-negative"
2998
- },
2999
- {
3000
- include: "#double-three-regexp-conditional"
3001
- },
3002
- {
3003
- include: "#double-three-regexp-parentheses-non-capturing"
3004
- },
3005
- {
3006
- include: "#double-three-regexp-parentheses"
3007
- },
3008
- {
3009
- include: "#comments-string-double-three"
3010
- }
3011
- ]
3012
- },
3013
- "double-three-regexp-character-set": {
3014
- patterns: [
3015
- {
3016
- match: "(?x)\n \\[ \\^? \\] (?! .*?\\])\n"
3017
- },
3018
- {
3019
- name: "meta.character.set.regexp",
3020
- begin: "(\\[)(\\^)?(\\])?",
3021
- end: "(\\]|(?=\"\"\"))",
3022
- beginCaptures: {
3023
- "1": {
3024
- name: "punctuation.character.set.begin.regexp constant.other.set.regexp"
3025
- },
3026
- "2": {
3027
- name: "keyword.operator.negation.regexp"
3028
- },
3029
- "3": {
3030
- name: "constant.character.set.regexp"
3031
- }
3032
- },
3033
- endCaptures: {
3034
- "1": {
3035
- name: "punctuation.character.set.end.regexp constant.other.set.regexp"
3036
- },
3037
- "2": {
3038
- name: "invalid.illegal.newline.python"
3039
- }
3040
- },
3041
- patterns: [
3042
- {
3043
- include: "#regexp-charecter-set-escapes"
3044
- },
3045
- {
3046
- name: "constant.character.set.regexp",
3047
- match: "[^\\n]"
3048
- }
3049
- ]
3050
- }
3051
- ]
3052
- },
3053
- "double-three-regexp-named-group": {
3054
- name: "meta.named.regexp",
3055
- begin: "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
3056
- end: "(\\)|(?=\"\"\"))",
3057
- beginCaptures: {
3058
- "1": {
3059
- name: "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
3060
- },
3061
- "2": {
3062
- name: "entity.name.tag.named.group.regexp"
3063
- }
3064
- },
3065
- endCaptures: {
3066
- "1": {
3067
- name: "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
3068
- },
3069
- "2": {
3070
- name: "invalid.illegal.newline.python"
3071
- }
3072
- },
3073
- patterns: [
3074
- {
3075
- include: "#double-three-regexp-expression"
3076
- },
3077
- {
3078
- include: "#comments-string-double-three"
3079
- }
3080
- ]
3081
- },
3082
- "double-three-regexp-comments": {
3083
- name: "comment.regexp",
3084
- begin: "\\(\\?#",
3085
- end: "(\\)|(?=\"\"\"))",
3086
- beginCaptures: {
3087
- "0": {
3088
- name: "punctuation.comment.begin.regexp"
3089
- }
3090
- },
3091
- endCaptures: {
3092
- "1": {
3093
- name: "punctuation.comment.end.regexp"
3094
- },
3095
- "2": {
3096
- name: "invalid.illegal.newline.python"
3097
- }
3098
- },
3099
- patterns: [
3100
- {
3101
- include: "#codetags"
3102
- }
3103
- ]
3104
- },
3105
- "double-three-regexp-lookahead": {
3106
- begin: "(\\()\\?=",
3107
- end: "(\\)|(?=\"\"\"))",
3108
- beginCaptures: {
3109
- "0": {
3110
- name: "keyword.operator.lookahead.regexp"
3111
- },
3112
- "1": {
3113
- name: "punctuation.parenthesis.lookahead.begin.regexp"
3114
- }
3115
- },
3116
- endCaptures: {
3117
- "1": {
3118
- name: "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
3119
- },
3120
- "2": {
3121
- name: "invalid.illegal.newline.python"
3122
- }
3123
- },
3124
- patterns: [
3125
- {
3126
- include: "#double-three-regexp-expression"
3127
- },
3128
- {
3129
- include: "#comments-string-double-three"
3130
- }
3131
- ]
3132
- },
3133
- "double-three-regexp-lookahead-negative": {
3134
- begin: "(\\()\\?!",
3135
- end: "(\\)|(?=\"\"\"))",
3136
- beginCaptures: {
3137
- "0": {
3138
- name: "keyword.operator.lookahead.negative.regexp"
3139
- },
3140
- "1": {
3141
- name: "punctuation.parenthesis.lookahead.begin.regexp"
3142
- }
3143
- },
3144
- endCaptures: {
3145
- "1": {
3146
- name: "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
3147
- },
3148
- "2": {
3149
- name: "invalid.illegal.newline.python"
3150
- }
3151
- },
3152
- patterns: [
3153
- {
3154
- include: "#double-three-regexp-expression"
3155
- },
3156
- {
3157
- include: "#comments-string-double-three"
3158
- }
3159
- ]
3160
- },
3161
- "double-three-regexp-lookbehind": {
3162
- begin: "(\\()\\?<=",
3163
- end: "(\\)|(?=\"\"\"))",
3164
- beginCaptures: {
3165
- "0": {
3166
- name: "keyword.operator.lookbehind.regexp"
3167
- },
3168
- "1": {
3169
- name: "punctuation.parenthesis.lookbehind.begin.regexp"
3170
- }
3171
- },
3172
- endCaptures: {
3173
- "1": {
3174
- name: "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
3175
- },
3176
- "2": {
3177
- name: "invalid.illegal.newline.python"
3178
- }
3179
- },
3180
- patterns: [
3181
- {
3182
- include: "#double-three-regexp-expression"
3183
- },
3184
- {
3185
- include: "#comments-string-double-three"
3186
- }
3187
- ]
3188
- },
3189
- "double-three-regexp-lookbehind-negative": {
3190
- begin: "(\\()\\?<!",
3191
- end: "(\\)|(?=\"\"\"))",
3192
- beginCaptures: {
3193
- "0": {
3194
- name: "keyword.operator.lookbehind.negative.regexp"
3195
- },
3196
- "1": {
3197
- name: "punctuation.parenthesis.lookbehind.begin.regexp"
3198
- }
3199
- },
3200
- endCaptures: {
3201
- "1": {
3202
- name: "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
3203
- },
3204
- "2": {
3205
- name: "invalid.illegal.newline.python"
3206
- }
3207
- },
3208
- patterns: [
3209
- {
3210
- include: "#double-three-regexp-expression"
3211
- },
3212
- {
3213
- include: "#comments-string-double-three"
3214
- }
3215
- ]
3216
- },
3217
- "double-three-regexp-conditional": {
3218
- begin: "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
3219
- end: "(\\)|(?=\"\"\"))",
3220
- beginCaptures: {
3221
- "0": {
3222
- name: "keyword.operator.conditional.regexp"
3223
- },
3224
- "1": {
3225
- name: "punctuation.parenthesis.conditional.begin.regexp"
3226
- }
3227
- },
3228
- endCaptures: {
3229
- "1": {
3230
- name: "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
3231
- },
3232
- "2": {
3233
- name: "invalid.illegal.newline.python"
3234
- }
3235
- },
3236
- patterns: [
3237
- {
3238
- include: "#double-three-regexp-expression"
3239
- },
3240
- {
3241
- include: "#comments-string-double-three"
3242
- }
3243
- ]
3244
- },
3245
- "double-three-regexp-parentheses-non-capturing": {
3246
- begin: "\\(\\?:",
3247
- end: "(\\)|(?=\"\"\"))",
3248
- beginCaptures: {
3249
- "0": {
3250
- name: "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
3251
- }
3252
- },
3253
- endCaptures: {
3254
- "1": {
3255
- name: "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
3256
- },
3257
- "2": {
3258
- name: "invalid.illegal.newline.python"
3259
- }
3260
- },
3261
- patterns: [
3262
- {
3263
- include: "#double-three-regexp-expression"
3264
- },
3265
- {
3266
- include: "#comments-string-double-three"
3267
- }
3268
- ]
3269
- },
3270
- "double-three-regexp-parentheses": {
3271
- begin: "\\(",
3272
- end: "(\\)|(?=\"\"\"))",
3273
- beginCaptures: {
3274
- "0": {
3275
- name: "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
3276
- }
3277
- },
3278
- endCaptures: {
3279
- "1": {
3280
- name: "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
3281
- },
3282
- "2": {
3283
- name: "invalid.illegal.newline.python"
3284
- }
3285
- },
3286
- patterns: [
3287
- {
3288
- include: "#double-three-regexp-expression"
3289
- },
3290
- {
3291
- include: "#comments-string-double-three"
3292
- }
3293
- ]
3294
- },
3295
- "regexp-single-one-line": {
3296
- name: "string.regexp.quoted.single.python",
3297
- begin: "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\')",
3298
- end: "(\\')|(?<!\\\\)(\\n)",
3299
- beginCaptures: {
3300
- "2": {
3301
- name: "invalid.deprecated.prefix.python"
3302
- },
3303
- "3": {
3304
- name: "storage.type.string.python"
3305
- },
3306
- "4": {
3307
- name: "storage.type.string.python"
3308
- },
3309
- "5": {
3310
- name: "punctuation.definition.string.begin.python"
3311
- }
3312
- },
3313
- endCaptures: {
3314
- "1": {
3315
- name: "punctuation.definition.string.end.python"
3316
- },
3317
- "2": {
3318
- name: "invalid.illegal.newline.python"
3319
- }
3320
- },
3321
- patterns: [
3322
- {
3323
- include: "#single-one-regexp-expression"
3324
- }
3325
- ]
3326
- },
3327
- "regexp-single-three-line": {
3328
- name: "string.regexp.quoted.multi.python",
3329
- begin: "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\'\\'\\')",
3330
- end: "(\\'\\'\\')",
3331
- beginCaptures: {
3332
- "2": {
3333
- name: "invalid.deprecated.prefix.python"
3334
- },
3335
- "3": {
3336
- name: "storage.type.string.python"
3337
- },
3338
- "4": {
3339
- name: "storage.type.string.python"
3340
- },
3341
- "5": {
3342
- name: "punctuation.definition.string.begin.python"
3343
- }
3344
- },
3345
- endCaptures: {
3346
- "1": {
3347
- name: "punctuation.definition.string.end.python"
3348
- },
3349
- "2": {
3350
- name: "invalid.illegal.newline.python"
3351
- }
3352
- },
3353
- patterns: [
3354
- {
3355
- include: "#single-three-regexp-expression"
3356
- }
3357
- ]
3358
- },
3359
- "regexp-double-one-line": {
3360
- name: "string.regexp.quoted.single.python",
3361
- begin: "\\b(([uU]r)|([bB]r)|(r[bB]?))(\")",
3362
- end: "(\")|(?<!\\\\)(\\n)",
3363
- beginCaptures: {
3364
- "2": {
3365
- name: "invalid.deprecated.prefix.python"
3366
- },
3367
- "3": {
3368
- name: "storage.type.string.python"
3369
- },
3370
- "4": {
3371
- name: "storage.type.string.python"
3372
- },
3373
- "5": {
3374
- name: "punctuation.definition.string.begin.python"
3375
- }
3376
- },
3377
- endCaptures: {
3378
- "1": {
3379
- name: "punctuation.definition.string.end.python"
3380
- },
3381
- "2": {
3382
- name: "invalid.illegal.newline.python"
3383
- }
3384
- },
3385
- patterns: [
3386
- {
3387
- include: "#double-one-regexp-expression"
3388
- }
3389
- ]
3390
- },
3391
- "regexp-double-three-line": {
3392
- name: "string.regexp.quoted.multi.python",
3393
- begin: "\\b(([uU]r)|([bB]r)|(r[bB]?))(\"\"\")",
3394
- end: "(\"\"\")",
3395
- beginCaptures: {
3396
- "2": {
3397
- name: "invalid.deprecated.prefix.python"
3398
- },
3399
- "3": {
3400
- name: "storage.type.string.python"
3401
- },
3402
- "4": {
3403
- name: "storage.type.string.python"
3404
- },
3405
- "5": {
3406
- name: "punctuation.definition.string.begin.python"
3407
- }
3408
- },
3409
- endCaptures: {
3410
- "1": {
3411
- name: "punctuation.definition.string.end.python"
3412
- },
3413
- "2": {
3414
- name: "invalid.illegal.newline.python"
3415
- }
3416
- },
3417
- patterns: [
3418
- {
3419
- include: "#double-three-regexp-expression"
3420
- }
3421
- ]
3422
- },
3423
- "string-raw-quoted-single-line": {
3424
- name: "string.quoted.raw.single.python",
3425
- begin: "\\b(([uU]R)|(R))((['\"]))",
3426
- end: "(\\4)|((?<!\\\\)\\n)",
3427
- beginCaptures: {
3428
- "2": {
3429
- name: "invalid.deprecated.prefix.python"
3430
- },
3431
- "3": {
3432
- name: "storage.type.string.python"
3433
- },
3434
- "4": {
3435
- name: "punctuation.definition.string.begin.python"
3436
- }
3437
- },
3438
- endCaptures: {
3439
- "1": {
3440
- name: "punctuation.definition.string.end.python"
3441
- },
3442
- "2": {
3443
- name: "invalid.illegal.newline.python"
3444
- }
3445
- },
3446
- patterns: [
3447
- {
3448
- include: "#string-single-bad-brace1-formatting-raw"
3449
- },
3450
- {
3451
- include: "#string-single-bad-brace2-formatting-raw"
3452
- },
3453
- {
3454
- include: "#string-raw-guts"
3455
- }
3456
- ]
3457
- },
3458
- "string-bin-quoted-single-line": {
3459
- name: "string.quoted.binary.single.python",
3460
- begin: "(\\b[bB])((['\"]))",
3461
- end: "(\\2)|((?<!\\\\)\\n)",
3462
- beginCaptures: {
3463
- "1": {
3464
- name: "storage.type.string.python"
3465
- },
3466
- "2": {
3467
- name: "punctuation.definition.string.begin.python"
3468
- }
3469
- },
3470
- endCaptures: {
3471
- "1": {
3472
- name: "punctuation.definition.string.end.python"
3473
- },
3474
- "2": {
3475
- name: "invalid.illegal.newline.python"
3476
- }
3477
- },
3478
- patterns: [
3479
- {
3480
- include: "#string-entity"
3481
- }
3482
- ]
3483
- },
3484
- "string-raw-bin-quoted-single-line": {
3485
- name: "string.quoted.raw.binary.single.python",
3486
- begin: "(\\b(?:R[bB]|[bB]R))((['\"]))",
3487
- end: "(\\2)|((?<!\\\\)\\n)",
3488
- beginCaptures: {
3489
- "1": {
3490
- name: "storage.type.string.python"
3491
- },
3492
- "2": {
3493
- name: "punctuation.definition.string.begin.python"
3494
- }
3495
- },
3496
- endCaptures: {
3497
- "1": {
3498
- name: "punctuation.definition.string.end.python"
3499
- },
3500
- "2": {
3501
- name: "invalid.illegal.newline.python"
3502
- }
3503
- },
3504
- patterns: [
3505
- {
3506
- include: "#string-raw-bin-guts"
3507
- }
3508
- ]
3509
- },
3510
- "string-quoted-single-line": {
3511
- name: "string.quoted.single.python",
3512
- begin: "(?:\\b([rR])(?=[uU]))?([uU])?((['\"]))",
3513
- end: "(\\3)|((?<!\\\\)\\n)",
3514
- beginCaptures: {
3515
- "1": {
3516
- name: "invalid.illegal.prefix.python"
3517
- },
3518
- "2": {
3519
- name: "storage.type.string.python"
3520
- },
3521
- "3": {
3522
- name: "punctuation.definition.string.begin.python"
3523
- }
3524
- },
3525
- endCaptures: {
3526
- "1": {
3527
- name: "punctuation.definition.string.end.python"
3528
- },
3529
- "2": {
3530
- name: "invalid.illegal.newline.python"
3531
- }
3532
- },
3533
- patterns: [
3534
- {
3535
- include: "#string-single-bad-brace1-formatting-unicode"
3536
- },
3537
- {
3538
- include: "#string-single-bad-brace2-formatting-unicode"
3539
- },
3540
- {
3541
- include: "#string-unicode-guts"
3542
- }
3543
- ]
3544
- },
3545
- "string-single-bad-brace1-formatting-unicode": {
3546
- comment: "template using {% ... %}",
3547
- begin: "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n",
3548
- end: "(?=(['\"])|((?<!\\\\)\\n))",
3549
- patterns: [
3550
- {
3551
- include: "#escape-sequence-unicode"
3552
- },
3553
- {
3554
- include: "#escape-sequence"
3555
- },
3556
- {
3557
- include: "#string-line-continuation"
3558
- }
3559
- ]
3560
- },
3561
- "string-single-bad-brace1-formatting-raw": {
3562
- comment: "template using {% ... %}",
3563
- begin: "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n",
3564
- end: "(?=(['\"])|((?<!\\\\)\\n))",
3565
- patterns: [
3566
- {
3567
- include: "#string-consume-escape"
3568
- }
3569
- ]
3570
- },
3571
- "string-single-bad-brace2-formatting-unicode": {
3572
- comment: "odd format or format-like syntax",
3573
- begin: "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n",
3574
- end: "(?=(['\"])|((?<!\\\\)\\n))",
3575
- patterns: [
3576
- {
3577
- include: "#escape-sequence-unicode"
3578
- },
3579
- {
3580
- include: "#string-entity"
3581
- }
3582
- ]
3583
- },
3584
- "string-single-bad-brace2-formatting-raw": {
3585
- comment: "odd format or format-like syntax",
3586
- begin: "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n",
3587
- end: "(?=(['\"])|((?<!\\\\)\\n))",
3588
- patterns: [
3589
- {
3590
- include: "#string-consume-escape"
3591
- },
3592
- {
3593
- include: "#string-formatting"
3594
- }
3595
- ]
3596
- },
3597
- "string-raw-quoted-multi-line": {
3598
- name: "string.quoted.raw.multi.python",
3599
- begin: "\\b(([uU]R)|(R))('''|\"\"\")",
3600
- end: "(\\4)",
3601
- beginCaptures: {
3602
- "2": {
3603
- name: "invalid.deprecated.prefix.python"
3604
- },
3605
- "3": {
3606
- name: "storage.type.string.python"
3607
- },
3608
- "4": {
3609
- name: "punctuation.definition.string.begin.python"
3610
- }
3611
- },
3612
- endCaptures: {
3613
- "1": {
3614
- name: "punctuation.definition.string.end.python"
3615
- },
3616
- "2": {
3617
- name: "invalid.illegal.newline.python"
3618
- }
3619
- },
3620
- patterns: [
3621
- {
3622
- include: "#string-multi-bad-brace1-formatting-raw"
3623
- },
3624
- {
3625
- include: "#string-multi-bad-brace2-formatting-raw"
3626
- },
3627
- {
3628
- include: "#string-raw-guts"
3629
- }
3630
- ]
3631
- },
3632
- "string-bin-quoted-multi-line": {
3633
- name: "string.quoted.binary.multi.python",
3634
- begin: "(\\b[bB])('''|\"\"\")",
3635
- end: "(\\2)",
3636
- beginCaptures: {
3637
- "1": {
3638
- name: "storage.type.string.python"
3639
- },
3640
- "2": {
3641
- name: "punctuation.definition.string.begin.python"
3642
- }
3643
- },
3644
- endCaptures: {
3645
- "1": {
3646
- name: "punctuation.definition.string.end.python"
3647
- },
3648
- "2": {
3649
- name: "invalid.illegal.newline.python"
3650
- }
3651
- },
3652
- patterns: [
3653
- {
3654
- include: "#string-entity"
3655
- }
3656
- ]
3657
- },
3658
- "string-raw-bin-quoted-multi-line": {
3659
- name: "string.quoted.raw.binary.multi.python",
3660
- begin: "(\\b(?:R[bB]|[bB]R))('''|\"\"\")",
3661
- end: "(\\2)",
3662
- beginCaptures: {
3663
- "1": {
3664
- name: "storage.type.string.python"
3665
- },
3666
- "2": {
3667
- name: "punctuation.definition.string.begin.python"
3668
- }
3669
- },
3670
- endCaptures: {
3671
- "1": {
3672
- name: "punctuation.definition.string.end.python"
3673
- },
3674
- "2": {
3675
- name: "invalid.illegal.newline.python"
3676
- }
3677
- },
3678
- patterns: [
3679
- {
3680
- include: "#string-raw-bin-guts"
3681
- }
3682
- ]
3683
- },
3684
- "string-quoted-multi-line": {
3685
- name: "string.quoted.multi.python",
3686
- begin: "(?:\\b([rR])(?=[uU]))?([uU])?('''|\"\"\")",
3687
- end: "(\\3)",
3688
- beginCaptures: {
3689
- "1": {
3690
- name: "invalid.illegal.prefix.python"
3691
- },
3692
- "2": {
3693
- name: "storage.type.string.python"
3694
- },
3695
- "3": {
3696
- name: "punctuation.definition.string.begin.python"
3697
- }
3698
- },
3699
- endCaptures: {
3700
- "1": {
3701
- name: "punctuation.definition.string.end.python"
3702
- },
3703
- "2": {
3704
- name: "invalid.illegal.newline.python"
3705
- }
3706
- },
3707
- patterns: [
3708
- {
3709
- include: "#string-multi-bad-brace1-formatting-unicode"
3710
- },
3711
- {
3712
- include: "#string-multi-bad-brace2-formatting-unicode"
3713
- },
3714
- {
3715
- include: "#string-unicode-guts"
3716
- }
3717
- ]
3718
- },
3719
- "string-multi-bad-brace1-formatting-unicode": {
3720
- comment: "template using {% ... %}",
3721
- begin: "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n",
3722
- end: "(?='''|\"\"\")",
3723
- patterns: [
3724
- {
3725
- include: "#escape-sequence-unicode"
3726
- },
3727
- {
3728
- include: "#escape-sequence"
3729
- },
3730
- {
3731
- include: "#string-line-continuation"
3732
- }
3733
- ]
3734
- },
3735
- "string-multi-bad-brace1-formatting-raw": {
3736
- comment: "template using {% ... %}",
3737
- begin: "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n",
3738
- end: "(?='''|\"\"\")",
3739
- patterns: [
3740
- {
3741
- include: "#string-consume-escape"
3742
- }
3743
- ]
3744
- },
3745
- "string-multi-bad-brace2-formatting-unicode": {
3746
- comment: "odd format or format-like syntax",
3747
- begin: "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n",
3748
- end: "(?='''|\"\"\")",
3749
- patterns: [
3750
- {
3751
- include: "#escape-sequence-unicode"
3752
- },
3753
- {
3754
- include: "#string-entity"
3755
- }
3756
- ]
3757
- },
3758
- "string-multi-bad-brace2-formatting-raw": {
3759
- comment: "odd format or format-like syntax",
3760
- begin: "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n",
3761
- end: "(?='''|\"\"\")",
3762
- patterns: [
3763
- {
3764
- include: "#string-consume-escape"
3765
- },
3766
- {
3767
- include: "#string-formatting"
3768
- }
3769
- ]
3770
- },
3771
- "fstring-fnorm-quoted-single-line": {
3772
- name: "meta.fstring.python",
3773
- begin: "(\\b[fF])([bBuU])?((['\"]))",
3774
- end: "(\\3)|((?<!\\\\)\\n)",
3775
- beginCaptures: {
3776
- "1": {
3777
- name: "string.interpolated.python string.quoted.single.python storage.type.string.python"
3778
- },
3779
- "2": {
3780
- name: "invalid.illegal.prefix.python"
3781
- },
3782
- "3": {
3783
- name: "punctuation.definition.string.begin.python string.interpolated.python string.quoted.single.python"
3784
- }
3785
- },
3786
- endCaptures: {
3787
- "1": {
3788
- name: "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python"
3789
- },
3790
- "2": {
3791
- name: "invalid.illegal.newline.python"
3792
- }
3793
- },
3794
- patterns: [
3795
- {
3796
- include: "#fstring-guts"
3797
- },
3798
- {
3799
- include: "#fstring-illegal-single-brace"
3800
- },
3801
- {
3802
- include: "#fstring-single-brace"
3803
- },
3804
- {
3805
- include: "#fstring-single-core"
3806
- }
3807
- ]
3808
- },
3809
- "fstring-normf-quoted-single-line": {
3810
- name: "meta.fstring.python",
3811
- begin: "(\\b[bBuU])([fF])((['\"]))",
3812
- end: "(\\3)|((?<!\\\\)\\n)",
3813
- beginCaptures: {
3814
- "1": {
3815
- name: "invalid.illegal.prefix.python"
3816
- },
3817
- "2": {
3818
- name: "string.interpolated.python string.quoted.single.python storage.type.string.python"
3819
- },
3820
- "3": {
3821
- name: "punctuation.definition.string.begin.python string.quoted.single.python"
3822
- }
3823
- },
3824
- endCaptures: {
3825
- "1": {
3826
- name: "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python"
3827
- },
3828
- "2": {
3829
- name: "invalid.illegal.newline.python"
3830
- }
3831
- },
3832
- patterns: [
3833
- {
3834
- include: "#fstring-guts"
3835
- },
3836
- {
3837
- include: "#fstring-illegal-single-brace"
3838
- },
3839
- {
3840
- include: "#fstring-single-brace"
3841
- },
3842
- {
3843
- include: "#fstring-single-core"
3844
- }
3845
- ]
3846
- },
3847
- "fstring-raw-quoted-single-line": {
3848
- name: "meta.fstring.python",
3849
- begin: "(\\b(?:[rR][fF]|[fF][rR]))((['\"]))",
3850
- end: "(\\2)|((?<!\\\\)\\n)",
3851
- beginCaptures: {
3852
- "1": {
3853
- name: "string.interpolated.python string.quoted.raw.single.python storage.type.string.python"
3854
- },
3855
- "2": {
3856
- name: "punctuation.definition.string.begin.python string.quoted.raw.single.python"
3857
- }
3858
- },
3859
- endCaptures: {
3860
- "1": {
3861
- name: "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.single.python"
3862
- },
3863
- "2": {
3864
- name: "invalid.illegal.newline.python"
3865
- }
3866
- },
3867
- patterns: [
3868
- {
3869
- include: "#fstring-raw-guts"
3870
- },
3871
- {
3872
- include: "#fstring-illegal-single-brace"
3873
- },
3874
- {
3875
- include: "#fstring-single-brace"
3876
- },
3877
- {
3878
- include: "#fstring-raw-single-core"
3879
- }
3880
- ]
3881
- },
3882
- "fstring-single-core": {
3883
- name: "string.interpolated.python string.quoted.single.python",
3884
- match: "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n"
3885
- },
3886
- "fstring-raw-single-core": {
3887
- name: "string.interpolated.python string.quoted.raw.single.python",
3888
- match: "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n"
3889
- },
3890
- "fstring-single-brace": {
3891
- comment: "value interpolation using { ... }",
3892
- begin: "(\\{)",
3893
- end: "(?x)\n (\\})|(?=\\n)\n",
3894
- beginCaptures: {
3895
- "1": {
3896
- name: "constant.character.format.placeholder.other.python"
3897
- }
3898
- },
3899
- endCaptures: {
3900
- "1": {
3901
- name: "constant.character.format.placeholder.other.python"
3902
- }
3903
- },
3904
- patterns: [
3905
- {
3906
- include: "#fstring-terminator-single"
3907
- },
3908
- {
3909
- include: "#f-expression"
3910
- }
3911
- ]
3912
- },
3913
- "fstring-terminator-single": {
3914
- patterns: [
3915
- {
3916
- name: "storage.type.format.python",
3917
- match: "(=(![rsa])?)(?=})"
3918
- },
3919
- {
3920
- name: "storage.type.format.python",
3921
- match: "(=?![rsa])(?=})"
3922
- },
3923
- {
3924
- match: "(?x)\n ( (?: =?) (?: ![rsa])? )\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n",
3925
- captures: {
3926
- "1": {
3927
- name: "storage.type.format.python"
3928
- },
3929
- "2": {
3930
- name: "storage.type.format.python"
3931
- }
3932
- }
3933
- },
3934
- {
3935
- include: "#fstring-terminator-single-tail"
3936
- }
3937
- ]
3938
- },
3939
- "fstring-terminator-single-tail": {
3940
- begin: "((?:=?)(?:![rsa])?)(:)(?=.*?{)",
3941
- end: "(?=})|(?=\\n)",
3942
- beginCaptures: {
3943
- "1": {
3944
- name: "storage.type.format.python"
3945
- },
3946
- "2": {
3947
- name: "storage.type.format.python"
3948
- }
3949
- },
3950
- patterns: [
3951
- {
3952
- include: "#fstring-illegal-single-brace"
3953
- },
3954
- {
3955
- include: "#fstring-single-brace"
3956
- },
3957
- {
3958
- name: "storage.type.format.python",
3959
- match: "([bcdeEfFgGnosxX%])(?=})"
3960
- },
3961
- {
3962
- name: "storage.type.format.python",
3963
- match: "(\\.\\d+)"
3964
- },
3965
- {
3966
- name: "storage.type.format.python",
3967
- match: "(,)"
3968
- },
3969
- {
3970
- name: "storage.type.format.python",
3971
- match: "(\\d+)"
3972
- },
3973
- {
3974
- name: "storage.type.format.python",
3975
- match: "(\\#)"
3976
- },
3977
- {
3978
- name: "storage.type.format.python",
3979
- match: "([-+ ])"
3980
- },
3981
- {
3982
- name: "storage.type.format.python",
3983
- match: "([<>=^])"
3984
- },
3985
- {
3986
- name: "storage.type.format.python",
3987
- match: "(\\w)"
3988
- }
3989
- ]
3990
- },
3991
- "fstring-fnorm-quoted-multi-line": {
3992
- name: "meta.fstring.python",
3993
- begin: "(\\b[fF])([bBuU])?('''|\"\"\")",
3994
- end: "(\\3)",
3995
- beginCaptures: {
3996
- "1": {
3997
- name: "string.interpolated.python string.quoted.multi.python storage.type.string.python"
3998
- },
3999
- "2": {
4000
- name: "invalid.illegal.prefix.python"
4001
- },
4002
- "3": {
4003
- name: "punctuation.definition.string.begin.python string.interpolated.python string.quoted.multi.python"
4004
- }
4005
- },
4006
- endCaptures: {
4007
- "1": {
4008
- name: "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python"
4009
- },
4010
- "2": {
4011
- name: "invalid.illegal.newline.python"
4012
- }
4013
- },
4014
- patterns: [
4015
- {
4016
- include: "#fstring-guts"
4017
- },
4018
- {
4019
- include: "#fstring-illegal-multi-brace"
4020
- },
4021
- {
4022
- include: "#fstring-multi-brace"
4023
- },
4024
- {
4025
- include: "#fstring-multi-core"
4026
- }
4027
- ]
4028
- },
4029
- "fstring-normf-quoted-multi-line": {
4030
- name: "meta.fstring.python",
4031
- begin: "(\\b[bBuU])([fF])('''|\"\"\")",
4032
- end: "(\\3)",
4033
- beginCaptures: {
4034
- "1": {
4035
- name: "invalid.illegal.prefix.python"
4036
- },
4037
- "2": {
4038
- name: "string.interpolated.python string.quoted.multi.python storage.type.string.python"
4039
- },
4040
- "3": {
4041
- name: "punctuation.definition.string.begin.python string.quoted.multi.python"
4042
- }
4043
- },
4044
- endCaptures: {
4045
- "1": {
4046
- name: "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python"
4047
- },
4048
- "2": {
4049
- name: "invalid.illegal.newline.python"
4050
- }
4051
- },
4052
- patterns: [
4053
- {
4054
- include: "#fstring-guts"
4055
- },
4056
- {
4057
- include: "#fstring-illegal-multi-brace"
4058
- },
4059
- {
4060
- include: "#fstring-multi-brace"
4061
- },
4062
- {
4063
- include: "#fstring-multi-core"
4064
- }
4065
- ]
4066
- },
4067
- "fstring-raw-quoted-multi-line": {
4068
- name: "meta.fstring.python",
4069
- begin: "(\\b(?:[rR][fF]|[fF][rR]))('''|\"\"\")",
4070
- end: "(\\2)",
4071
- beginCaptures: {
4072
- "1": {
4073
- name: "string.interpolated.python string.quoted.raw.multi.python storage.type.string.python"
4074
- },
4075
- "2": {
4076
- name: "punctuation.definition.string.begin.python string.quoted.raw.multi.python"
4077
- }
4078
- },
4079
- endCaptures: {
4080
- "1": {
4081
- name: "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.multi.python"
4082
- },
4083
- "2": {
4084
- name: "invalid.illegal.newline.python"
4085
- }
4086
- },
4087
- patterns: [
4088
- {
4089
- include: "#fstring-raw-guts"
4090
- },
4091
- {
4092
- include: "#fstring-illegal-multi-brace"
4093
- },
4094
- {
4095
- include: "#fstring-multi-brace"
4096
- },
4097
- {
4098
- include: "#fstring-raw-multi-core"
4099
- }
4100
- ]
4101
- },
4102
- "fstring-multi-core": {
4103
- name: "string.interpolated.python string.quoted.multi.python",
4104
- match: "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|'''|\"\"\")\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n"
4105
- },
4106
- "fstring-raw-multi-core": {
4107
- name: "string.interpolated.python string.quoted.raw.multi.python",
4108
- match: "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|'''|\"\"\")\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n"
4109
- },
4110
- "fstring-multi-brace": {
4111
- comment: "value interpolation using { ... }",
4112
- begin: "(\\{)",
4113
- end: "(?x)\n (\\})\n",
4114
- beginCaptures: {
4115
- "1": {
4116
- name: "constant.character.format.placeholder.other.python"
4117
- }
4118
- },
4119
- endCaptures: {
4120
- "1": {
4121
- name: "constant.character.format.placeholder.other.python"
4122
- }
4123
- },
4124
- patterns: [
4125
- {
4126
- include: "#fstring-terminator-multi"
4127
- },
4128
- {
4129
- include: "#f-expression"
4130
- }
4131
- ]
4132
- },
4133
- "fstring-terminator-multi": {
4134
- patterns: [
4135
- {
4136
- name: "storage.type.format.python",
4137
- match: "(=(![rsa])?)(?=})"
4138
- },
4139
- {
4140
- name: "storage.type.format.python",
4141
- match: "(=?![rsa])(?=})"
4142
- },
4143
- {
4144
- match: "(?x)\n ( (?: =?) (?: ![rsa])? )\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n",
4145
- captures: {
4146
- "1": {
4147
- name: "storage.type.format.python"
4148
- },
4149
- "2": {
4150
- name: "storage.type.format.python"
4151
- }
4152
- }
4153
- },
4154
- {
4155
- include: "#fstring-terminator-multi-tail"
4156
- }
4157
- ]
4158
- },
4159
- "fstring-terminator-multi-tail": {
4160
- begin: "((?:=?)(?:![rsa])?)(:)(?=.*?{)",
4161
- end: "(?=})",
4162
- beginCaptures: {
4163
- "1": {
4164
- name: "storage.type.format.python"
4165
- },
4166
- "2": {
4167
- name: "storage.type.format.python"
4168
- }
4169
- },
4170
- patterns: [
4171
- {
4172
- include: "#fstring-illegal-multi-brace"
4173
- },
4174
- {
4175
- include: "#fstring-multi-brace"
4176
- },
4177
- {
4178
- name: "storage.type.format.python",
4179
- match: "([bcdeEfFgGnosxX%])(?=})"
4180
- },
4181
- {
4182
- name: "storage.type.format.python",
4183
- match: "(\\.\\d+)"
4184
- },
4185
- {
4186
- name: "storage.type.format.python",
4187
- match: "(,)"
4188
- },
4189
- {
4190
- name: "storage.type.format.python",
4191
- match: "(\\d+)"
4192
- },
4193
- {
4194
- name: "storage.type.format.python",
4195
- match: "(\\#)"
4196
- },
4197
- {
4198
- name: "storage.type.format.python",
4199
- match: "([-+ ])"
4200
- },
4201
- {
4202
- name: "storage.type.format.python",
4203
- match: "([<>=^])"
4204
- },
4205
- {
4206
- name: "storage.type.format.python",
4207
- match: "(\\w)"
4208
- }
4209
- ]
4210
- }
4211
- };
4212
- var MagicPython_tmLanguage = {
4213
- information_for_contributors: information_for_contributors,
4214
- version: version,
4215
- name: name,
4216
- scopeName: scopeName,
4217
- patterns: patterns,
4218
- repository: repository
4219
- };
4220
-
4221
- export { MagicPython_tmLanguage as default, information_for_contributors, name, patterns, repository, scopeName, version };