sophia-SH5T2BSZ.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.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. defaultToken: "",
  23. tokenPostfix: ".aes",
  24. brackets: [
  25. { token: "delimiter.curly", open: "{", close: "}" },
  26. { token: "delimiter.parenthesis", open: "(", close: ")" },
  27. { token: "delimiter.square", open: "[", close: "]" },
  28. { token: "delimiter.angle", open: "<", close: ">" }
  29. ],
  30. keywords: [
  31. "contract",
  32. "library",
  33. "entrypoint",
  34. "function",
  35. "stateful",
  36. "state",
  37. "hash",
  38. "signature",
  39. "tuple",
  40. "list",
  41. "address",
  42. "string",
  43. "bool",
  44. "int",
  45. "record",
  46. "datatype",
  47. "type",
  48. "option",
  49. "oracle",
  50. "oracle_query",
  51. "Call",
  52. "Bits",
  53. "Bytes",
  54. "Oracle",
  55. "String",
  56. "Crypto",
  57. "Address",
  58. "Auth",
  59. "Chain",
  60. "None",
  61. "Some",
  62. "bits",
  63. "bytes",
  64. "event",
  65. "let",
  66. "map",
  67. "private",
  68. "public",
  69. "true",
  70. "false",
  71. "var",
  72. "if",
  73. "else",
  74. "throw"
  75. ],
  76. operators: [
  77. "=",
  78. ">",
  79. "<",
  80. "!",
  81. "~",
  82. "?",
  83. "::",
  84. ":",
  85. "==",
  86. "<=",
  87. ">=",
  88. "!=",
  89. "&&",
  90. "||",
  91. "++",
  92. "--",
  93. "+",
  94. "-",
  95. "*",
  96. "/",
  97. "&",
  98. "|",
  99. "^",
  100. "%",
  101. "<<",
  102. ">>",
  103. ">>>",
  104. "+=",
  105. "-=",
  106. "*=",
  107. "/=",
  108. "&=",
  109. "|=",
  110. "^=",
  111. "%=",
  112. "<<=",
  113. ">>=",
  114. ">>>="
  115. ],
  116. symbols: /[=><!~?:&|+\-*\/\^%]+/,
  117. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  118. integersuffix: /(ll|LL|u|U|l|L)?(ll|LL|u|U|l|L)?/,
  119. floatsuffix: /[fFlL]?/,
  120. tokenizer: {
  121. root: [
  122. [
  123. /[a-zA-Z_]\w*/,
  124. {
  125. cases: {
  126. "@keywords": { token: "keyword.$0" },
  127. "@default": "identifier"
  128. }
  129. }
  130. ],
  131. { include: "@whitespace" },
  132. [/\[\[.*\]\]/, "annotation"],
  133. [/^\s*#\w+/, "keyword"],
  134. [/int\d*/, "keyword"],
  135. [/[{}()\[\]]/, "@brackets"],
  136. [/[<>](?!@symbols)/, "@brackets"],
  137. [
  138. /@symbols/,
  139. {
  140. cases: {
  141. "@operators": "delimiter",
  142. "@default": ""
  143. }
  144. }
  145. ],
  146. [/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, "number.float"],
  147. [/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, "number.float"],
  148. [/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, "number.hex"],
  149. [/0[0-7']*[0-7](@integersuffix)/, "number.octal"],
  150. [/0[bB][0-1']*[0-1](@integersuffix)/, "number.binary"],
  151. [/\d[\d']*\d(@integersuffix)/, "number"],
  152. [/\d(@integersuffix)/, "number"],
  153. [/[;,.]/, "delimiter"],
  154. [/"([^"\\]|\\.)*$/, "string.invalid"],
  155. [/"/, "string", "@string"],
  156. [/'[^\\']'/, "string"],
  157. [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
  158. [/'/, "string.invalid"]
  159. ],
  160. whitespace: [
  161. [/[ \t\r\n]+/, ""],
  162. [/\/\*\*(?!\/)/, "comment.doc", "@doccomment"],
  163. [/\/\*/, "comment", "@comment"],
  164. [/\/\/.*$/, "comment"]
  165. ],
  166. comment: [
  167. [/[^\/*]+/, "comment"],
  168. [/\*\//, "comment", "@pop"],
  169. [/[\/*]/, "comment"]
  170. ],
  171. doccomment: [
  172. [/[^\/*]+/, "comment.doc"],
  173. [/\*\//, "comment.doc", "@pop"],
  174. [/[\/*]/, "comment.doc"]
  175. ],
  176. string: [
  177. [/[^\\"]+/, "string"],
  178. [/@escapes/, "string.escape"],
  179. [/\\./, "string.escape.invalid"],
  180. [/"/, "string", "@pop"]
  181. ]
  182. }
  183. };
  184. export {
  185. conf,
  186. language
  187. };
  188. /*! Bundled license information:
  189. monaco-editor/esm/vs/basic-languages/sophia/sophia.js:
  190. (*!-----------------------------------------------------------------------------
  191. * Copyright (c) Microsoft Corporation. All rights reserved.
  192. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  193. * Released under the MIT license
  194. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  195. *-----------------------------------------------------------------------------*)
  196. */
  197. //# sourceMappingURL=sophia-SH5T2BSZ.js.map