cameligo-2TX35IBM.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.js
  3. var conf = {
  4. comments: {
  5. lineComment: "//",
  6. blockComment: ["(*", "*)"]
  7. },
  8. brackets: [
  9. ["{", "}"],
  10. ["[", "]"],
  11. ["(", ")"],
  12. ["<", ">"]
  13. ],
  14. autoClosingPairs: [
  15. { open: "{", close: "}" },
  16. { open: "[", close: "]" },
  17. { open: "(", close: ")" },
  18. { open: "<", close: ">" },
  19. { open: "'", close: "'" },
  20. { open: '"', close: '"' },
  21. { open: "(*", close: "*)" }
  22. ],
  23. surroundingPairs: [
  24. { open: "{", close: "}" },
  25. { open: "[", close: "]" },
  26. { open: "(", close: ")" },
  27. { open: "<", close: ">" },
  28. { open: "'", close: "'" },
  29. { open: '"', close: '"' },
  30. { open: "(*", close: "*)" }
  31. ]
  32. };
  33. var language = {
  34. defaultToken: "",
  35. tokenPostfix: ".cameligo",
  36. ignoreCase: true,
  37. brackets: [
  38. { open: "{", close: "}", token: "delimiter.curly" },
  39. { open: "[", close: "]", token: "delimiter.square" },
  40. { open: "(", close: ")", token: "delimiter.parenthesis" },
  41. { open: "<", close: ">", token: "delimiter.angle" }
  42. ],
  43. keywords: [
  44. "abs",
  45. "assert",
  46. "block",
  47. "Bytes",
  48. "case",
  49. "Crypto",
  50. "Current",
  51. "else",
  52. "failwith",
  53. "false",
  54. "for",
  55. "fun",
  56. "if",
  57. "in",
  58. "let",
  59. "let%entry",
  60. "let%init",
  61. "List",
  62. "list",
  63. "Map",
  64. "map",
  65. "match",
  66. "match%nat",
  67. "mod",
  68. "not",
  69. "operation",
  70. "Operation",
  71. "of",
  72. "record",
  73. "Set",
  74. "set",
  75. "sender",
  76. "skip",
  77. "source",
  78. "String",
  79. "then",
  80. "to",
  81. "true",
  82. "type",
  83. "with"
  84. ],
  85. typeKeywords: ["int", "unit", "string", "tz", "nat", "bool"],
  86. operators: [
  87. "=",
  88. ">",
  89. "<",
  90. "<=",
  91. ">=",
  92. "<>",
  93. ":",
  94. ":=",
  95. "and",
  96. "mod",
  97. "or",
  98. "+",
  99. "-",
  100. "*",
  101. "/",
  102. "@",
  103. "&",
  104. "^",
  105. "%",
  106. "->",
  107. "<-",
  108. "&&",
  109. "||"
  110. ],
  111. symbols: /[=><:@\^&|+\-*\/\^%]+/,
  112. tokenizer: {
  113. root: [
  114. [
  115. /[a-zA-Z_][\w]*/,
  116. {
  117. cases: {
  118. "@keywords": { token: "keyword.$0" },
  119. "@default": "identifier"
  120. }
  121. }
  122. ],
  123. { include: "@whitespace" },
  124. [/[{}()\[\]]/, "@brackets"],
  125. [/[<>](?!@symbols)/, "@brackets"],
  126. [
  127. /@symbols/,
  128. {
  129. cases: {
  130. "@operators": "delimiter",
  131. "@default": ""
  132. }
  133. }
  134. ],
  135. [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
  136. [/\$[0-9a-fA-F]{1,16}/, "number.hex"],
  137. [/\d+/, "number"],
  138. [/[;,.]/, "delimiter"],
  139. [/'([^'\\]|\\.)*$/, "string.invalid"],
  140. [/'/, "string", "@string"],
  141. [/'[^\\']'/, "string"],
  142. [/'/, "string.invalid"],
  143. [/\#\d+/, "string"]
  144. ],
  145. comment: [
  146. [/[^\(\*]+/, "comment"],
  147. [/\*\)/, "comment", "@pop"],
  148. [/\(\*/, "comment"]
  149. ],
  150. string: [
  151. [/[^\\']+/, "string"],
  152. [/\\./, "string.escape.invalid"],
  153. [/'/, { token: "string.quote", bracket: "@close", next: "@pop" }]
  154. ],
  155. whitespace: [
  156. [/[ \t\r\n]+/, "white"],
  157. [/\(\*/, "comment", "@comment"],
  158. [/\/\/.*$/, "comment"]
  159. ]
  160. }
  161. };
  162. export {
  163. conf,
  164. language
  165. };
  166. /*! Bundled license information:
  167. monaco-editor/esm/vs/basic-languages/cameligo/cameligo.js:
  168. (*!-----------------------------------------------------------------------------
  169. * Copyright (c) Microsoft Corporation. All rights reserved.
  170. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  171. * Released under the MIT license
  172. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  173. *-----------------------------------------------------------------------------*)
  174. */
  175. //# sourceMappingURL=cameligo-2TX35IBM.js.map