postiats-UEOCL3IR.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.js
  3. var conf = {
  4. comments: {
  5. lineComment: "//",
  6. blockComment: ["(*", "*)"]
  7. },
  8. brackets: [
  9. ["{", "}"],
  10. ["[", "]"],
  11. ["(", ")"],
  12. ["<", ">"]
  13. ],
  14. autoClosingPairs: [
  15. { open: '"', close: '"', notIn: ["string", "comment"] },
  16. { open: "{", close: "}", notIn: ["string", "comment"] },
  17. { open: "[", close: "]", notIn: ["string", "comment"] },
  18. { open: "(", close: ")", notIn: ["string", "comment"] }
  19. ]
  20. };
  21. var language = {
  22. tokenPostfix: ".pats",
  23. defaultToken: "invalid",
  24. keywords: [
  25. "abstype",
  26. "abst0ype",
  27. "absprop",
  28. "absview",
  29. "absvtype",
  30. "absviewtype",
  31. "absvt0ype",
  32. "absviewt0ype",
  33. "as",
  34. "and",
  35. "assume",
  36. "begin",
  37. "classdec",
  38. "datasort",
  39. "datatype",
  40. "dataprop",
  41. "dataview",
  42. "datavtype",
  43. "dataviewtype",
  44. "do",
  45. "end",
  46. "extern",
  47. "extype",
  48. "extvar",
  49. "exception",
  50. "fn",
  51. "fnx",
  52. "fun",
  53. "prfn",
  54. "prfun",
  55. "praxi",
  56. "castfn",
  57. "if",
  58. "then",
  59. "else",
  60. "ifcase",
  61. "in",
  62. "infix",
  63. "infixl",
  64. "infixr",
  65. "prefix",
  66. "postfix",
  67. "implmnt",
  68. "implement",
  69. "primplmnt",
  70. "primplement",
  71. "import",
  72. "let",
  73. "local",
  74. "macdef",
  75. "macrodef",
  76. "nonfix",
  77. "symelim",
  78. "symintr",
  79. "overload",
  80. "of",
  81. "op",
  82. "rec",
  83. "sif",
  84. "scase",
  85. "sortdef",
  86. "sta",
  87. "stacst",
  88. "stadef",
  89. "static",
  90. "staload",
  91. "dynload",
  92. "try",
  93. "tkindef",
  94. "typedef",
  95. "propdef",
  96. "viewdef",
  97. "vtypedef",
  98. "viewtypedef",
  99. "prval",
  100. "var",
  101. "prvar",
  102. "when",
  103. "where",
  104. "with",
  105. "withtype",
  106. "withprop",
  107. "withview",
  108. "withvtype",
  109. "withviewtype"
  110. ],
  111. keywords_dlr: [
  112. "$delay",
  113. "$ldelay",
  114. "$arrpsz",
  115. "$arrptrsize",
  116. "$d2ctype",
  117. "$effmask",
  118. "$effmask_ntm",
  119. "$effmask_exn",
  120. "$effmask_ref",
  121. "$effmask_wrt",
  122. "$effmask_all",
  123. "$extern",
  124. "$extkind",
  125. "$extype",
  126. "$extype_struct",
  127. "$extval",
  128. "$extfcall",
  129. "$extmcall",
  130. "$literal",
  131. "$myfilename",
  132. "$mylocation",
  133. "$myfunction",
  134. "$lst",
  135. "$lst_t",
  136. "$lst_vt",
  137. "$list",
  138. "$list_t",
  139. "$list_vt",
  140. "$rec",
  141. "$rec_t",
  142. "$rec_vt",
  143. "$record",
  144. "$record_t",
  145. "$record_vt",
  146. "$tup",
  147. "$tup_t",
  148. "$tup_vt",
  149. "$tuple",
  150. "$tuple_t",
  151. "$tuple_vt",
  152. "$break",
  153. "$continue",
  154. "$raise",
  155. "$showtype",
  156. "$vcopyenv_v",
  157. "$vcopyenv_vt",
  158. "$tempenver",
  159. "$solver_assert",
  160. "$solver_verify"
  161. ],
  162. keywords_srp: [
  163. "#if",
  164. "#ifdef",
  165. "#ifndef",
  166. "#then",
  167. "#elif",
  168. "#elifdef",
  169. "#elifndef",
  170. "#else",
  171. "#endif",
  172. "#error",
  173. "#prerr",
  174. "#print",
  175. "#assert",
  176. "#undef",
  177. "#define",
  178. "#include",
  179. "#require",
  180. "#pragma",
  181. "#codegen2",
  182. "#codegen3"
  183. ],
  184. irregular_keyword_list: [
  185. "val+",
  186. "val-",
  187. "val",
  188. "case+",
  189. "case-",
  190. "case",
  191. "addr@",
  192. "addr",
  193. "fold@",
  194. "free@",
  195. "fix@",
  196. "fix",
  197. "lam@",
  198. "lam",
  199. "llam@",
  200. "llam",
  201. "viewt@ype+",
  202. "viewt@ype-",
  203. "viewt@ype",
  204. "viewtype+",
  205. "viewtype-",
  206. "viewtype",
  207. "view+",
  208. "view-",
  209. "view@",
  210. "view",
  211. "type+",
  212. "type-",
  213. "type",
  214. "vtype+",
  215. "vtype-",
  216. "vtype",
  217. "vt@ype+",
  218. "vt@ype-",
  219. "vt@ype",
  220. "viewt@ype+",
  221. "viewt@ype-",
  222. "viewt@ype",
  223. "viewtype+",
  224. "viewtype-",
  225. "viewtype",
  226. "prop+",
  227. "prop-",
  228. "prop",
  229. "type+",
  230. "type-",
  231. "type",
  232. "t@ype",
  233. "t@ype+",
  234. "t@ype-",
  235. "abst@ype",
  236. "abstype",
  237. "absviewt@ype",
  238. "absvt@ype",
  239. "for*",
  240. "for",
  241. "while*",
  242. "while"
  243. ],
  244. keywords_types: [
  245. "bool",
  246. "double",
  247. "byte",
  248. "int",
  249. "short",
  250. "char",
  251. "void",
  252. "unit",
  253. "long",
  254. "float",
  255. "string",
  256. "strptr"
  257. ],
  258. keywords_effects: [
  259. "0",
  260. "fun",
  261. "clo",
  262. "prf",
  263. "funclo",
  264. "cloptr",
  265. "cloref",
  266. "ref",
  267. "ntm",
  268. "1"
  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. brackets: [
  298. { open: ",(", close: ")", token: "delimiter.parenthesis" },
  299. { open: "`(", close: ")", token: "delimiter.parenthesis" },
  300. { open: "%(", close: ")", token: "delimiter.parenthesis" },
  301. { open: "'(", close: ")", token: "delimiter.parenthesis" },
  302. { open: "'{", close: "}", token: "delimiter.parenthesis" },
  303. { open: "@(", close: ")", token: "delimiter.parenthesis" },
  304. { open: "@{", close: "}", token: "delimiter.brace" },
  305. { open: "@[", close: "]", token: "delimiter.square" },
  306. { open: "#[", close: "]", token: "delimiter.square" },
  307. { open: "{", close: "}", token: "delimiter.curly" },
  308. { open: "[", close: "]", token: "delimiter.square" },
  309. { open: "(", close: ")", token: "delimiter.parenthesis" },
  310. { open: "<", close: ">", token: "delimiter.angle" }
  311. ],
  312. symbols: /[=><!~?:&|+\-*\/\^%]+/,
  313. IDENTFST: /[a-zA-Z_]/,
  314. IDENTRST: /[a-zA-Z0-9_'$]/,
  315. symbolic: /[%&+-./:=@~`^|*!$#?<>]/,
  316. digit: /[0-9]/,
  317. digitseq0: /@digit*/,
  318. xdigit: /[0-9A-Za-z]/,
  319. xdigitseq0: /@xdigit*/,
  320. INTSP: /[lLuU]/,
  321. FLOATSP: /[fFlL]/,
  322. fexponent: /[eE][+-]?[0-9]+/,
  323. fexponent_bin: /[pP][+-]?[0-9]+/,
  324. deciexp: /\.[0-9]*@fexponent?/,
  325. hexiexp: /\.[0-9a-zA-Z]*@fexponent_bin?/,
  326. irregular_keywords: /val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,
  327. ESCHAR: /[ntvbrfa\\\?'"\(\[\{]/,
  328. start: "root",
  329. tokenizer: {
  330. root: [
  331. { regex: /[ \t\r\n]+/, action: { token: "" } },
  332. { regex: /\(\*\)/, action: { token: "invalid" } },
  333. {
  334. regex: /\(\*/,
  335. action: { token: "comment", next: "lexing_COMMENT_block_ml" }
  336. },
  337. {
  338. regex: /\(/,
  339. action: "@brackets"
  340. },
  341. {
  342. regex: /\)/,
  343. action: "@brackets"
  344. },
  345. {
  346. regex: /\[/,
  347. action: "@brackets"
  348. },
  349. {
  350. regex: /\]/,
  351. action: "@brackets"
  352. },
  353. {
  354. regex: /\{/,
  355. action: "@brackets"
  356. },
  357. {
  358. regex: /\}/,
  359. action: "@brackets"
  360. },
  361. {
  362. regex: /,\(/,
  363. action: "@brackets"
  364. },
  365. { regex: /,/, action: { token: "delimiter.comma" } },
  366. { regex: /;/, action: { token: "delimiter.semicolon" } },
  367. {
  368. regex: /@\(/,
  369. action: "@brackets"
  370. },
  371. {
  372. regex: /@\[/,
  373. action: "@brackets"
  374. },
  375. {
  376. regex: /@\{/,
  377. action: "@brackets"
  378. },
  379. {
  380. regex: /:</,
  381. action: { token: "keyword", next: "@lexing_EFFECT_commaseq0" }
  382. },
  383. { regex: /\.@symbolic+/, action: { token: "identifier.sym" } },
  384. {
  385. regex: /\.@digit*@fexponent@FLOATSP*/,
  386. action: { token: "number.float" }
  387. },
  388. { regex: /\.@digit+/, action: { token: "number.float" } },
  389. {
  390. regex: /\$@IDENTFST@IDENTRST*/,
  391. action: {
  392. cases: {
  393. "@keywords_dlr": { token: "keyword.dlr" },
  394. "@default": { token: "namespace" }
  395. }
  396. }
  397. },
  398. {
  399. regex: /\#@IDENTFST@IDENTRST*/,
  400. action: {
  401. cases: {
  402. "@keywords_srp": { token: "keyword.srp" },
  403. "@default": { token: "identifier" }
  404. }
  405. }
  406. },
  407. { regex: /%\(/, action: { token: "delimiter.parenthesis" } },
  408. {
  409. regex: /^%{(#|\^|\$)?/,
  410. action: {
  411. token: "keyword",
  412. next: "@lexing_EXTCODE",
  413. nextEmbedded: "text/javascript"
  414. }
  415. },
  416. { regex: /^%}/, action: { token: "keyword" } },
  417. { regex: /'\(/, action: { token: "delimiter.parenthesis" } },
  418. { regex: /'\[/, action: { token: "delimiter.bracket" } },
  419. { regex: /'\{/, action: { token: "delimiter.brace" } },
  420. [/(')(\\@ESCHAR|\\[xX]@xdigit+|\\@digit+)(')/, ["string", "string.escape", "string"]],
  421. [/'[^\\']'/, "string"],
  422. [/"/, "string.quote", "@lexing_DQUOTE"],
  423. {
  424. regex: /`\(/,
  425. action: "@brackets"
  426. },
  427. { regex: /\\/, action: { token: "punctuation" } },
  428. {
  429. regex: /@irregular_keywords(?!@IDENTRST)/,
  430. action: { token: "keyword" }
  431. },
  432. {
  433. regex: /@IDENTFST@IDENTRST*[<!\[]?/,
  434. action: {
  435. cases: {
  436. "@keywords": { token: "keyword" },
  437. "@keywords_types": { token: "type" },
  438. "@default": { token: "identifier" }
  439. }
  440. }
  441. },
  442. {
  443. regex: /\/\/\/\//,
  444. action: { token: "comment", next: "@lexing_COMMENT_rest" }
  445. },
  446. { regex: /\/\/.*$/, action: { token: "comment" } },
  447. {
  448. regex: /\/\*/,
  449. action: { token: "comment", next: "@lexing_COMMENT_block_c" }
  450. },
  451. {
  452. regex: /-<|=</,
  453. action: { token: "keyword", next: "@lexing_EFFECT_commaseq0" }
  454. },
  455. {
  456. regex: /@symbolic+/,
  457. action: {
  458. cases: {
  459. "@operators": "keyword",
  460. "@default": "operator"
  461. }
  462. }
  463. },
  464. {
  465. regex: /0[xX]@xdigit+(@hexiexp|@fexponent_bin)@FLOATSP*/,
  466. action: { token: "number.float" }
  467. },
  468. { regex: /0[xX]@xdigit+@INTSP*/, action: { token: "number.hex" } },
  469. {
  470. regex: /0[0-7]+(?![0-9])@INTSP*/,
  471. action: { token: "number.octal" }
  472. },
  473. {
  474. regex: /@digit+(@fexponent|@deciexp)@FLOATSP*/,
  475. action: { token: "number.float" }
  476. },
  477. {
  478. regex: /@digit@digitseq0@INTSP*/,
  479. action: { token: "number.decimal" }
  480. },
  481. { regex: /@digit+@INTSP*/, action: { token: "number" } }
  482. ],
  483. lexing_COMMENT_block_ml: [
  484. [/[^\(\*]+/, "comment"],
  485. [/\(\*/, "comment", "@push"],
  486. [/\(\*/, "comment.invalid"],
  487. [/\*\)/, "comment", "@pop"],
  488. [/\*/, "comment"]
  489. ],
  490. lexing_COMMENT_block_c: [
  491. [/[^\/*]+/, "comment"],
  492. [/\*\//, "comment", "@pop"],
  493. [/[\/*]/, "comment"]
  494. ],
  495. lexing_COMMENT_rest: [
  496. [/$/, "comment", "@pop"],
  497. [/.*/, "comment"]
  498. ],
  499. lexing_EFFECT_commaseq0: [
  500. {
  501. regex: /@IDENTFST@IDENTRST+|@digit+/,
  502. action: {
  503. cases: {
  504. "@keywords_effects": { token: "type.effect" },
  505. "@default": { token: "identifier" }
  506. }
  507. }
  508. },
  509. { regex: /,/, action: { token: "punctuation" } },
  510. { regex: />/, action: { token: "@rematch", next: "@pop" } }
  511. ],
  512. lexing_EXTCODE: [
  513. {
  514. regex: /^%}/,
  515. action: {
  516. token: "@rematch",
  517. next: "@pop",
  518. nextEmbedded: "@pop"
  519. }
  520. },
  521. { regex: /[^%]+/, action: "" }
  522. ],
  523. lexing_DQUOTE: [
  524. { regex: /"/, action: { token: "string.quote", next: "@pop" } },
  525. {
  526. regex: /(\{\$)(@IDENTFST@IDENTRST*)(\})/,
  527. action: [{ token: "string.escape" }, { token: "identifier" }, { token: "string.escape" }]
  528. },
  529. { regex: /\\$/, action: { token: "string.escape" } },
  530. {
  531. regex: /\\(@ESCHAR|[xX]@xdigit+|@digit+)/,
  532. action: { token: "string.escape" }
  533. },
  534. { regex: /[^\\"]+/, action: { token: "string" } }
  535. ]
  536. }
  537. };
  538. export {
  539. conf,
  540. language
  541. };
  542. /*! Bundled license information:
  543. monaco-editor/esm/vs/basic-languages/postiats/postiats.js:
  544. (*!-----------------------------------------------------------------------------
  545. * Copyright (c) Microsoft Corporation. All rights reserved.
  546. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  547. * Released under the MIT license
  548. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  549. *-----------------------------------------------------------------------------*)
  550. */
  551. //# sourceMappingURL=postiats-UEOCL3IR.js.map