python-L325RIL5.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. import {
  2. editor_api_exports
  3. } from "./chunk-5Q5BEFT4.js";
  4. import "./chunk-FBUDSZGC.js";
  5. import "./chunk-2LSFTFF7.js";
  6. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/python/python.js
  7. var __defProp = Object.defineProperty;
  8. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  9. var __getOwnPropNames = Object.getOwnPropertyNames;
  10. var __hasOwnProp = Object.prototype.hasOwnProperty;
  11. var __copyProps = (to, from, except, desc) => {
  12. if (from && typeof from === "object" || typeof from === "function") {
  13. for (let key of __getOwnPropNames(from))
  14. if (!__hasOwnProp.call(to, key) && key !== except)
  15. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  16. }
  17. return to;
  18. };
  19. var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
  20. var monaco_editor_core_exports = {};
  21. __reExport(monaco_editor_core_exports, editor_api_exports);
  22. var conf = {
  23. comments: {
  24. lineComment: "#",
  25. blockComment: ["'''", "'''"]
  26. },
  27. brackets: [
  28. ["{", "}"],
  29. ["[", "]"],
  30. ["(", ")"]
  31. ],
  32. autoClosingPairs: [
  33. { open: "{", close: "}" },
  34. { open: "[", close: "]" },
  35. { open: "(", close: ")" },
  36. { open: '"', close: '"', notIn: ["string"] },
  37. { open: "'", close: "'", notIn: ["string", "comment"] }
  38. ],
  39. surroundingPairs: [
  40. { open: "{", close: "}" },
  41. { open: "[", close: "]" },
  42. { open: "(", close: ")" },
  43. { open: '"', close: '"' },
  44. { open: "'", close: "'" }
  45. ],
  46. onEnterRules: [
  47. {
  48. beforeText: new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),
  49. action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Indent }
  50. }
  51. ],
  52. folding: {
  53. offSide: true,
  54. markers: {
  55. start: new RegExp("^\\s*#region\\b"),
  56. end: new RegExp("^\\s*#endregion\\b")
  57. }
  58. }
  59. };
  60. var language = {
  61. defaultToken: "",
  62. tokenPostfix: ".python",
  63. keywords: [
  64. "False",
  65. "None",
  66. "True",
  67. "_",
  68. "and",
  69. "as",
  70. "assert",
  71. "async",
  72. "await",
  73. "break",
  74. "case",
  75. "class",
  76. "continue",
  77. "def",
  78. "del",
  79. "elif",
  80. "else",
  81. "except",
  82. "exec",
  83. "finally",
  84. "for",
  85. "from",
  86. "global",
  87. "if",
  88. "import",
  89. "in",
  90. "is",
  91. "lambda",
  92. "match",
  93. "nonlocal",
  94. "not",
  95. "or",
  96. "pass",
  97. "print",
  98. "raise",
  99. "return",
  100. "try",
  101. "while",
  102. "with",
  103. "yield",
  104. "int",
  105. "float",
  106. "long",
  107. "complex",
  108. "hex",
  109. "abs",
  110. "all",
  111. "any",
  112. "apply",
  113. "basestring",
  114. "bin",
  115. "bool",
  116. "buffer",
  117. "bytearray",
  118. "callable",
  119. "chr",
  120. "classmethod",
  121. "cmp",
  122. "coerce",
  123. "compile",
  124. "complex",
  125. "delattr",
  126. "dict",
  127. "dir",
  128. "divmod",
  129. "enumerate",
  130. "eval",
  131. "execfile",
  132. "file",
  133. "filter",
  134. "format",
  135. "frozenset",
  136. "getattr",
  137. "globals",
  138. "hasattr",
  139. "hash",
  140. "help",
  141. "id",
  142. "input",
  143. "intern",
  144. "isinstance",
  145. "issubclass",
  146. "iter",
  147. "len",
  148. "locals",
  149. "list",
  150. "map",
  151. "max",
  152. "memoryview",
  153. "min",
  154. "next",
  155. "object",
  156. "oct",
  157. "open",
  158. "ord",
  159. "pow",
  160. "print",
  161. "property",
  162. "reversed",
  163. "range",
  164. "raw_input",
  165. "reduce",
  166. "reload",
  167. "repr",
  168. "reversed",
  169. "round",
  170. "self",
  171. "set",
  172. "setattr",
  173. "slice",
  174. "sorted",
  175. "staticmethod",
  176. "str",
  177. "sum",
  178. "super",
  179. "tuple",
  180. "type",
  181. "unichr",
  182. "unicode",
  183. "vars",
  184. "xrange",
  185. "zip",
  186. "__dict__",
  187. "__methods__",
  188. "__members__",
  189. "__class__",
  190. "__bases__",
  191. "__name__",
  192. "__mro__",
  193. "__subclasses__",
  194. "__init__",
  195. "__import__"
  196. ],
  197. brackets: [
  198. { open: "{", close: "}", token: "delimiter.curly" },
  199. { open: "[", close: "]", token: "delimiter.bracket" },
  200. { open: "(", close: ")", token: "delimiter.parenthesis" }
  201. ],
  202. tokenizer: {
  203. root: [
  204. { include: "@whitespace" },
  205. { include: "@numbers" },
  206. { include: "@strings" },
  207. [/[,:;]/, "delimiter"],
  208. [/[{}\[\]()]/, "@brackets"],
  209. [/@[a-zA-Z_]\w*/, "tag"],
  210. [
  211. /[a-zA-Z_]\w*/,
  212. {
  213. cases: {
  214. "@keywords": "keyword",
  215. "@default": "identifier"
  216. }
  217. }
  218. ]
  219. ],
  220. whitespace: [
  221. [/\s+/, "white"],
  222. [/(^#.*$)/, "comment"],
  223. [/'''/, "string", "@endDocString"],
  224. [/"""/, "string", "@endDblDocString"]
  225. ],
  226. endDocString: [
  227. [/[^']+/, "string"],
  228. [/\\'/, "string"],
  229. [/'''/, "string", "@popall"],
  230. [/'/, "string"]
  231. ],
  232. endDblDocString: [
  233. [/[^"]+/, "string"],
  234. [/\\"/, "string"],
  235. [/"""/, "string", "@popall"],
  236. [/"/, "string"]
  237. ],
  238. numbers: [
  239. [/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/, "number.hex"],
  240. [/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/, "number"]
  241. ],
  242. strings: [
  243. [/'$/, "string.escape", "@popall"],
  244. [/'/, "string.escape", "@stringBody"],
  245. [/"$/, "string.escape", "@popall"],
  246. [/"/, "string.escape", "@dblStringBody"]
  247. ],
  248. stringBody: [
  249. [/[^\\']+$/, "string", "@popall"],
  250. [/[^\\']+/, "string"],
  251. [/\\./, "string"],
  252. [/'/, "string.escape", "@popall"],
  253. [/\\$/, "string"]
  254. ],
  255. dblStringBody: [
  256. [/[^\\"]+$/, "string", "@popall"],
  257. [/[^\\"]+/, "string"],
  258. [/\\./, "string"],
  259. [/"/, "string.escape", "@popall"],
  260. [/\\$/, "string"]
  261. ]
  262. }
  263. };
  264. export {
  265. conf,
  266. language
  267. };
  268. /*! Bundled license information:
  269. monaco-editor/esm/vs/basic-languages/python/python.js:
  270. (*!-----------------------------------------------------------------------------
  271. * Copyright (c) Microsoft Corporation. All rights reserved.
  272. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  273. * Released under the MIT license
  274. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  275. *-----------------------------------------------------------------------------*)
  276. */
  277. //# sourceMappingURL=python-L325RIL5.js.map