kotlin-GASJF7LG.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.js
  3. var conf = {
  4. wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
  5. comments: {
  6. lineComment: "//",
  7. blockComment: ["/*", "*/"]
  8. },
  9. brackets: [
  10. ["{", "}"],
  11. ["[", "]"],
  12. ["(", ")"]
  13. ],
  14. autoClosingPairs: [
  15. { open: "{", close: "}" },
  16. { open: "[", close: "]" },
  17. { open: "(", close: ")" },
  18. { open: '"', close: '"' },
  19. { open: "'", close: "'" }
  20. ],
  21. surroundingPairs: [
  22. { open: "{", close: "}" },
  23. { open: "[", close: "]" },
  24. { open: "(", close: ")" },
  25. { open: '"', close: '"' },
  26. { open: "'", close: "'" },
  27. { open: "<", close: ">" }
  28. ],
  29. folding: {
  30. markers: {
  31. start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
  32. end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
  33. }
  34. }
  35. };
  36. var language = {
  37. defaultToken: "",
  38. tokenPostfix: ".kt",
  39. keywords: [
  40. "as",
  41. "as?",
  42. "break",
  43. "class",
  44. "continue",
  45. "do",
  46. "else",
  47. "false",
  48. "for",
  49. "fun",
  50. "if",
  51. "in",
  52. "!in",
  53. "interface",
  54. "is",
  55. "!is",
  56. "null",
  57. "object",
  58. "package",
  59. "return",
  60. "super",
  61. "this",
  62. "throw",
  63. "true",
  64. "try",
  65. "typealias",
  66. "val",
  67. "var",
  68. "when",
  69. "while",
  70. "by",
  71. "catch",
  72. "constructor",
  73. "delegate",
  74. "dynamic",
  75. "field",
  76. "file",
  77. "finally",
  78. "get",
  79. "import",
  80. "init",
  81. "param",
  82. "property",
  83. "receiver",
  84. "set",
  85. "setparam",
  86. "where",
  87. "actual",
  88. "abstract",
  89. "annotation",
  90. "companion",
  91. "const",
  92. "crossinline",
  93. "data",
  94. "enum",
  95. "expect",
  96. "external",
  97. "final",
  98. "infix",
  99. "inline",
  100. "inner",
  101. "internal",
  102. "lateinit",
  103. "noinline",
  104. "open",
  105. "operator",
  106. "out",
  107. "override",
  108. "private",
  109. "protected",
  110. "public",
  111. "reified",
  112. "sealed",
  113. "suspend",
  114. "tailrec",
  115. "vararg",
  116. "field",
  117. "it"
  118. ],
  119. operators: [
  120. "+",
  121. "-",
  122. "*",
  123. "/",
  124. "%",
  125. "=",
  126. "+=",
  127. "-=",
  128. "*=",
  129. "/=",
  130. "%=",
  131. "++",
  132. "--",
  133. "&&",
  134. "||",
  135. "!",
  136. "==",
  137. "!=",
  138. "===",
  139. "!==",
  140. ">",
  141. "<",
  142. "<=",
  143. ">=",
  144. "[",
  145. "]",
  146. "!!",
  147. "?.",
  148. "?:",
  149. "::",
  150. "..",
  151. ":",
  152. "?",
  153. "->",
  154. "@",
  155. ";",
  156. "$",
  157. "_"
  158. ],
  159. symbols: /[=><!~?:&|+\-*\/\^%]+/,
  160. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  161. digits: /\d+(_+\d+)*/,
  162. octaldigits: /[0-7]+(_+[0-7]+)*/,
  163. binarydigits: /[0-1]+(_+[0-1]+)*/,
  164. hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
  165. tokenizer: {
  166. root: [
  167. [/[A-Z][\w\$]*/, "type.identifier"],
  168. [
  169. /[a-zA-Z_$][\w$]*/,
  170. {
  171. cases: {
  172. "@keywords": { token: "keyword.$0" },
  173. "@default": "identifier"
  174. }
  175. }
  176. ],
  177. { include: "@whitespace" },
  178. [/[{}()\[\]]/, "@brackets"],
  179. [/[<>](?!@symbols)/, "@brackets"],
  180. [
  181. /@symbols/,
  182. {
  183. cases: {
  184. "@operators": "delimiter",
  185. "@default": ""
  186. }
  187. }
  188. ],
  189. [/@\s*[a-zA-Z_\$][\w\$]*/, "annotation"],
  190. [/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, "number.float"],
  191. [/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, "number.float"],
  192. [/0[xX](@hexdigits)[Ll]?/, "number.hex"],
  193. [/0(@octaldigits)[Ll]?/, "number.octal"],
  194. [/0[bB](@binarydigits)[Ll]?/, "number.binary"],
  195. [/(@digits)[fFdD]/, "number.float"],
  196. [/(@digits)[lL]?/, "number"],
  197. [/[;,.]/, "delimiter"],
  198. [/"([^"\\]|\\.)*$/, "string.invalid"],
  199. [/"""/, "string", "@multistring"],
  200. [/"/, "string", "@string"],
  201. [/'[^\\']'/, "string"],
  202. [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
  203. [/'/, "string.invalid"]
  204. ],
  205. whitespace: [
  206. [/[ \t\r\n]+/, ""],
  207. [/\/\*\*(?!\/)/, "comment.doc", "@javadoc"],
  208. [/\/\*/, "comment", "@comment"],
  209. [/\/\/.*$/, "comment"]
  210. ],
  211. comment: [
  212. [/[^\/*]+/, "comment"],
  213. [/\/\*/, "comment", "@comment"],
  214. [/\*\//, "comment", "@pop"],
  215. [/[\/*]/, "comment"]
  216. ],
  217. javadoc: [
  218. [/[^\/*]+/, "comment.doc"],
  219. [/\/\*/, "comment.doc", "@push"],
  220. [/\/\*/, "comment.doc.invalid"],
  221. [/\*\//, "comment.doc", "@pop"],
  222. [/[\/*]/, "comment.doc"]
  223. ],
  224. string: [
  225. [/[^\\"]+/, "string"],
  226. [/@escapes/, "string.escape"],
  227. [/\\./, "string.escape.invalid"],
  228. [/"/, "string", "@pop"]
  229. ],
  230. multistring: [
  231. [/[^\\"]+/, "string"],
  232. [/@escapes/, "string.escape"],
  233. [/\\./, "string.escape.invalid"],
  234. [/"""/, "string", "@pop"],
  235. [/./, "string"]
  236. ]
  237. }
  238. };
  239. export {
  240. conf,
  241. language
  242. };
  243. /*! Bundled license information:
  244. monaco-editor/esm/vs/basic-languages/kotlin/kotlin.js:
  245. (*!-----------------------------------------------------------------------------
  246. * Copyright (c) Microsoft Corporation. All rights reserved.
  247. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  248. * Released under the MIT license
  249. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  250. *-----------------------------------------------------------------------------*)
  251. */
  252. //# sourceMappingURL=kotlin-GASJF7LG.js.map