julia-NX4YGBYK.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.js
  3. var conf = {
  4. brackets: [
  5. ["{", "}"],
  6. ["[", "]"],
  7. ["(", ")"]
  8. ],
  9. autoClosingPairs: [
  10. { open: "{", close: "}" },
  11. { open: "[", close: "]" },
  12. { open: "(", close: ")" },
  13. { open: '"', close: '"' },
  14. { open: "'", close: "'" }
  15. ],
  16. surroundingPairs: [
  17. { open: "{", close: "}" },
  18. { open: "[", close: "]" },
  19. { open: "(", close: ")" },
  20. { open: '"', close: '"' },
  21. { open: "'", close: "'" }
  22. ]
  23. };
  24. var language = {
  25. tokenPostfix: ".julia",
  26. keywords: [
  27. "begin",
  28. "while",
  29. "if",
  30. "for",
  31. "try",
  32. "return",
  33. "break",
  34. "continue",
  35. "function",
  36. "macro",
  37. "quote",
  38. "let",
  39. "local",
  40. "global",
  41. "const",
  42. "do",
  43. "struct",
  44. "module",
  45. "baremodule",
  46. "using",
  47. "import",
  48. "export",
  49. "end",
  50. "else",
  51. "elseif",
  52. "catch",
  53. "finally",
  54. "mutable",
  55. "primitive",
  56. "abstract",
  57. "type",
  58. "in",
  59. "isa",
  60. "where",
  61. "new"
  62. ],
  63. types: [
  64. "LinRange",
  65. "LineNumberNode",
  66. "LinearIndices",
  67. "LoadError",
  68. "MIME",
  69. "Matrix",
  70. "Method",
  71. "MethodError",
  72. "Missing",
  73. "MissingException",
  74. "Module",
  75. "NTuple",
  76. "NamedTuple",
  77. "Nothing",
  78. "Number",
  79. "OrdinalRange",
  80. "OutOfMemoryError",
  81. "OverflowError",
  82. "Pair",
  83. "PartialQuickSort",
  84. "PermutedDimsArray",
  85. "Pipe",
  86. "Ptr",
  87. "QuoteNode",
  88. "Rational",
  89. "RawFD",
  90. "ReadOnlyMemoryError",
  91. "Real",
  92. "ReentrantLock",
  93. "Ref",
  94. "Regex",
  95. "RegexMatch",
  96. "RoundingMode",
  97. "SegmentationFault",
  98. "Set",
  99. "Signed",
  100. "Some",
  101. "StackOverflowError",
  102. "StepRange",
  103. "StepRangeLen",
  104. "StridedArray",
  105. "StridedMatrix",
  106. "StridedVecOrMat",
  107. "StridedVector",
  108. "String",
  109. "StringIndexError",
  110. "SubArray",
  111. "SubString",
  112. "SubstitutionString",
  113. "Symbol",
  114. "SystemError",
  115. "Task",
  116. "Text",
  117. "TextDisplay",
  118. "Timer",
  119. "Tuple",
  120. "Type",
  121. "TypeError",
  122. "TypeVar",
  123. "UInt",
  124. "UInt128",
  125. "UInt16",
  126. "UInt32",
  127. "UInt64",
  128. "UInt8",
  129. "UndefInitializer",
  130. "AbstractArray",
  131. "UndefKeywordError",
  132. "AbstractChannel",
  133. "UndefRefError",
  134. "AbstractChar",
  135. "UndefVarError",
  136. "AbstractDict",
  137. "Union",
  138. "AbstractDisplay",
  139. "UnionAll",
  140. "AbstractFloat",
  141. "UnitRange",
  142. "AbstractIrrational",
  143. "Unsigned",
  144. "AbstractMatrix",
  145. "AbstractRange",
  146. "Val",
  147. "AbstractSet",
  148. "Vararg",
  149. "AbstractString",
  150. "VecElement",
  151. "AbstractUnitRange",
  152. "VecOrMat",
  153. "AbstractVecOrMat",
  154. "Vector",
  155. "AbstractVector",
  156. "VersionNumber",
  157. "Any",
  158. "WeakKeyDict",
  159. "ArgumentError",
  160. "WeakRef",
  161. "Array",
  162. "AssertionError",
  163. "BigFloat",
  164. "BigInt",
  165. "BitArray",
  166. "BitMatrix",
  167. "BitSet",
  168. "BitVector",
  169. "Bool",
  170. "BoundsError",
  171. "CapturedException",
  172. "CartesianIndex",
  173. "CartesianIndices",
  174. "Cchar",
  175. "Cdouble",
  176. "Cfloat",
  177. "Channel",
  178. "Char",
  179. "Cint",
  180. "Cintmax_t",
  181. "Clong",
  182. "Clonglong",
  183. "Cmd",
  184. "Colon",
  185. "Complex",
  186. "ComplexF16",
  187. "ComplexF32",
  188. "ComplexF64",
  189. "CompositeException",
  190. "Condition",
  191. "Cptrdiff_t",
  192. "Cshort",
  193. "Csize_t",
  194. "Cssize_t",
  195. "Cstring",
  196. "Cuchar",
  197. "Cuint",
  198. "Cuintmax_t",
  199. "Culong",
  200. "Culonglong",
  201. "Cushort",
  202. "Cvoid",
  203. "Cwchar_t",
  204. "Cwstring",
  205. "DataType",
  206. "DenseArray",
  207. "DenseMatrix",
  208. "DenseVecOrMat",
  209. "DenseVector",
  210. "Dict",
  211. "DimensionMismatch",
  212. "Dims",
  213. "DivideError",
  214. "DomainError",
  215. "EOFError",
  216. "Enum",
  217. "ErrorException",
  218. "Exception",
  219. "ExponentialBackOff",
  220. "Expr",
  221. "Float16",
  222. "Float32",
  223. "Float64",
  224. "Function",
  225. "GlobalRef",
  226. "HTML",
  227. "IO",
  228. "IOBuffer",
  229. "IOContext",
  230. "IOStream",
  231. "IdDict",
  232. "IndexCartesian",
  233. "IndexLinear",
  234. "IndexStyle",
  235. "InexactError",
  236. "InitError",
  237. "Int",
  238. "Int128",
  239. "Int16",
  240. "Int32",
  241. "Int64",
  242. "Int8",
  243. "Integer",
  244. "InterruptException",
  245. "InvalidStateException",
  246. "Irrational",
  247. "KeyError"
  248. ],
  249. keywordops: ["<:", ">:", ":", "=>", "...", ".", "->", "?"],
  250. allops: /[^\w\d\s()\[\]{}"'#]+/,
  251. constants: [
  252. "true",
  253. "false",
  254. "nothing",
  255. "missing",
  256. "undef",
  257. "Inf",
  258. "pi",
  259. "NaN",
  260. "π",
  261. "ℯ",
  262. "ans",
  263. "PROGRAM_FILE",
  264. "ARGS",
  265. "C_NULL",
  266. "VERSION",
  267. "DEPOT_PATH",
  268. "LOAD_PATH"
  269. ],
  270. operators: [
  271. "!",
  272. "!=",
  273. "!==",
  274. "%",
  275. "&",
  276. "*",
  277. "+",
  278. "-",
  279. "/",
  280. "//",
  281. "<",
  282. "<<",
  283. "<=",
  284. "==",
  285. "===",
  286. "=>",
  287. ">",
  288. ">=",
  289. ">>",
  290. ">>>",
  291. "\\",
  292. "^",
  293. "|",
  294. "|>",
  295. "~",
  296. "÷",
  297. "∈",
  298. "∉",
  299. "∋",
  300. "∌",
  301. "∘",
  302. "√",
  303. "∛",
  304. "∩",
  305. "∪",
  306. "≈",
  307. "≉",
  308. "≠",
  309. "≡",
  310. "≢",
  311. "≤",
  312. "≥",
  313. "⊆",
  314. "⊇",
  315. "⊈",
  316. "⊉",
  317. "⊊",
  318. "⊋",
  319. "⊻"
  320. ],
  321. brackets: [
  322. { open: "(", close: ")", token: "delimiter.parenthesis" },
  323. { open: "{", close: "}", token: "delimiter.curly" },
  324. { open: "[", close: "]", token: "delimiter.square" }
  325. ],
  326. ident: /π|ℯ|\b(?!\d)\w+\b/,
  327. escape: /(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,
  328. escapes: /\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,
  329. tokenizer: {
  330. root: [
  331. [/(::)\s*|\b(isa)\s+/, "keyword", "@typeanno"],
  332. [/\b(isa)(\s*\(@ident\s*,\s*)/, ["keyword", { token: "", next: "@typeanno" }]],
  333. [/\b(type|struct)[ \t]+/, "keyword", "@typeanno"],
  334. [/^\s*:@ident[!?]?/, "metatag"],
  335. [/(return)(\s*:@ident[!?]?)/, ["keyword", "metatag"]],
  336. [/(\(|\[|\{|@allops)(\s*:@ident[!?]?)/, ["", "metatag"]],
  337. [/:\(/, "metatag", "@quote"],
  338. [/r"""/, "regexp.delim", "@tregexp"],
  339. [/r"/, "regexp.delim", "@sregexp"],
  340. [/raw"""/, "string.delim", "@rtstring"],
  341. [/[bv]?"""/, "string.delim", "@dtstring"],
  342. [/raw"/, "string.delim", "@rsstring"],
  343. [/[bv]?"/, "string.delim", "@dsstring"],
  344. [
  345. /(@ident)\{/,
  346. {
  347. cases: {
  348. "$1@types": { token: "type", next: "@gen" },
  349. "@default": { token: "type", next: "@gen" }
  350. }
  351. }
  352. ],
  353. [
  354. /@ident[!?'']?(?=\.?\()/,
  355. {
  356. cases: {
  357. "@types": "type",
  358. "@keywords": "keyword",
  359. "@constants": "variable",
  360. "@default": "keyword.flow"
  361. }
  362. }
  363. ],
  364. [
  365. /@ident[!?']?/,
  366. {
  367. cases: {
  368. "@types": "type",
  369. "@keywords": "keyword",
  370. "@constants": "variable",
  371. "@default": "identifier"
  372. }
  373. }
  374. ],
  375. [/\$\w+/, "key"],
  376. [/\$\(/, "key", "@paste"],
  377. [/@@@ident/, "annotation"],
  378. { include: "@whitespace" },
  379. [/'(?:@escapes|.)'/, "string.character"],
  380. [/[()\[\]{}]/, "@brackets"],
  381. [
  382. /@allops/,
  383. {
  384. cases: {
  385. "@keywordops": "keyword",
  386. "@operators": "operator"
  387. }
  388. }
  389. ],
  390. [/[;,]/, "delimiter"],
  391. [/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/, "number.hex"],
  392. [/0[_oO][0-7](_?[0-7])*/, "number.octal"],
  393. [/0[bB][01](_?[01])*/, "number.binary"],
  394. [/[+\-]?\d+(\.\d+)?(im?|[eE][+\-]?\d+(\.\d+)?)?/, "number"]
  395. ],
  396. typeanno: [
  397. [/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/, "type", "@gen"],
  398. [/([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(\s*<:\s*)/, ["type", "keyword"]],
  399. [/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/, "type", "@pop"],
  400. ["", "", "@pop"]
  401. ],
  402. gen: [
  403. [/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/, "type", "@push"],
  404. [/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/, "type"],
  405. [/<:/, "keyword"],
  406. [/(\})(\s*<:\s*)/, ["type", { token: "keyword", next: "@pop" }]],
  407. [/\}/, "type", "@pop"],
  408. { include: "@root" }
  409. ],
  410. quote: [
  411. [/\$\(/, "key", "@paste"],
  412. [/\(/, "@brackets", "@paren"],
  413. [/\)/, "metatag", "@pop"],
  414. { include: "@root" }
  415. ],
  416. paste: [
  417. [/:\(/, "metatag", "@quote"],
  418. [/\(/, "@brackets", "@paren"],
  419. [/\)/, "key", "@pop"],
  420. { include: "@root" }
  421. ],
  422. paren: [
  423. [/\$\(/, "key", "@paste"],
  424. [/:\(/, "metatag", "@quote"],
  425. [/\(/, "@brackets", "@push"],
  426. [/\)/, "@brackets", "@pop"],
  427. { include: "@root" }
  428. ],
  429. sregexp: [
  430. [/^.*/, "invalid"],
  431. [/[^\\"()\[\]{}]/, "regexp"],
  432. [/[()\[\]{}]/, "@brackets"],
  433. [/\\./, "operator.scss"],
  434. [/"[imsx]*/, "regexp.delim", "@pop"]
  435. ],
  436. tregexp: [
  437. [/[^\\"()\[\]{}]/, "regexp"],
  438. [/[()\[\]{}]/, "@brackets"],
  439. [/\\./, "operator.scss"],
  440. [/"(?!"")/, "string"],
  441. [/"""[imsx]*/, "regexp.delim", "@pop"]
  442. ],
  443. rsstring: [
  444. [/^.*/, "invalid"],
  445. [/[^\\"]/, "string"],
  446. [/\\./, "string.escape"],
  447. [/"/, "string.delim", "@pop"]
  448. ],
  449. rtstring: [
  450. [/[^\\"]/, "string"],
  451. [/\\./, "string.escape"],
  452. [/"(?!"")/, "string"],
  453. [/"""/, "string.delim", "@pop"]
  454. ],
  455. dsstring: [
  456. [/^.*/, "invalid"],
  457. [/[^\\"\$]/, "string"],
  458. [/\$/, "", "@interpolated"],
  459. [/@escapes/, "string.escape"],
  460. [/\\./, "string.escape.invalid"],
  461. [/"/, "string.delim", "@pop"]
  462. ],
  463. dtstring: [
  464. [/[^\\"\$]/, "string"],
  465. [/\$/, "", "@interpolated"],
  466. [/@escapes/, "string.escape"],
  467. [/\\./, "string.escape.invalid"],
  468. [/"(?!"")/, "string"],
  469. [/"""/, "string.delim", "@pop"]
  470. ],
  471. interpolated: [
  472. [/\(/, { token: "", switchTo: "@interpolated_compound" }],
  473. [/[a-zA-Z_]\w*/, "identifier"],
  474. ["", "", "@pop"]
  475. ],
  476. interpolated_compound: [[/\)/, "", "@pop"], { include: "@root" }],
  477. whitespace: [
  478. [/[ \t\r\n]+/, ""],
  479. [/#=/, "comment", "@multi_comment"],
  480. [/#.*$/, "comment"]
  481. ],
  482. multi_comment: [
  483. [/#=/, "comment", "@push"],
  484. [/=#/, "comment", "@pop"],
  485. [/=(?!#)|#(?!=)/, "comment"],
  486. [/[^#=]+/, "comment"]
  487. ]
  488. }
  489. };
  490. export {
  491. conf,
  492. language
  493. };
  494. /*! Bundled license information:
  495. monaco-editor/esm/vs/basic-languages/julia/julia.js:
  496. (*!-----------------------------------------------------------------------------
  497. * Copyright (c) Microsoft Corporation. All rights reserved.
  498. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  499. * Released under the MIT license
  500. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  501. *-----------------------------------------------------------------------------*)
  502. */
  503. //# sourceMappingURL=julia-NX4YGBYK.js.map