go-CFWAUCOD.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/go/go.js
  3. var conf = {
  4. comments: {
  5. lineComment: "//",
  6. blockComment: ["/*", "*/"]
  7. },
  8. brackets: [
  9. ["{", "}"],
  10. ["[", "]"],
  11. ["(", ")"]
  12. ],
  13. autoClosingPairs: [
  14. { open: "{", close: "}" },
  15. { open: "[", close: "]" },
  16. { open: "(", close: ")" },
  17. { open: "`", close: "`", notIn: ["string"] },
  18. { open: '"', close: '"', notIn: ["string"] },
  19. { open: "'", close: "'", notIn: ["string", "comment"] }
  20. ],
  21. surroundingPairs: [
  22. { open: "{", close: "}" },
  23. { open: "[", close: "]" },
  24. { open: "(", close: ")" },
  25. { open: "`", close: "`" },
  26. { open: '"', close: '"' },
  27. { open: "'", close: "'" }
  28. ]
  29. };
  30. var language = {
  31. defaultToken: "",
  32. tokenPostfix: ".go",
  33. keywords: [
  34. "break",
  35. "case",
  36. "chan",
  37. "const",
  38. "continue",
  39. "default",
  40. "defer",
  41. "else",
  42. "fallthrough",
  43. "for",
  44. "func",
  45. "go",
  46. "goto",
  47. "if",
  48. "import",
  49. "interface",
  50. "map",
  51. "package",
  52. "range",
  53. "return",
  54. "select",
  55. "struct",
  56. "switch",
  57. "type",
  58. "var",
  59. "bool",
  60. "true",
  61. "false",
  62. "uint8",
  63. "uint16",
  64. "uint32",
  65. "uint64",
  66. "int8",
  67. "int16",
  68. "int32",
  69. "int64",
  70. "float32",
  71. "float64",
  72. "complex64",
  73. "complex128",
  74. "byte",
  75. "rune",
  76. "uint",
  77. "int",
  78. "uintptr",
  79. "string",
  80. "nil"
  81. ],
  82. operators: [
  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. "<=",
  117. ">=",
  118. ":=",
  119. "...",
  120. "(",
  121. ")",
  122. "",
  123. "]",
  124. "{",
  125. "}",
  126. ",",
  127. ";",
  128. ".",
  129. ":"
  130. ],
  131. symbols: /[=><!~?:&|+\-*\/\^%]+/,
  132. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  133. tokenizer: {
  134. root: [
  135. [
  136. /[a-zA-Z_]\w*/,
  137. {
  138. cases: {
  139. "@keywords": { token: "keyword.$0" },
  140. "@default": "identifier"
  141. }
  142. }
  143. ],
  144. { include: "@whitespace" },
  145. [/\[\[.*\]\]/, "annotation"],
  146. [/^\s*#\w+/, "keyword"],
  147. [/[{}()\[\]]/, "@brackets"],
  148. [/[<>](?!@symbols)/, "@brackets"],
  149. [
  150. /@symbols/,
  151. {
  152. cases: {
  153. "@operators": "delimiter",
  154. "@default": ""
  155. }
  156. }
  157. ],
  158. [/\d*\d+[eE]([\-+]?\d+)?/, "number.float"],
  159. [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
  160. [/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, "number.hex"],
  161. [/0[0-7']*[0-7]/, "number.octal"],
  162. [/0[bB][0-1']*[0-1]/, "number.binary"],
  163. [/\d[\d']*/, "number"],
  164. [/\d/, "number"],
  165. [/[;,.]/, "delimiter"],
  166. [/"([^"\\]|\\.)*$/, "string.invalid"],
  167. [/"/, "string", "@string"],
  168. [/`/, "string", "@rawstring"],
  169. [/'[^\\']'/, "string"],
  170. [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
  171. [/'/, "string.invalid"]
  172. ],
  173. whitespace: [
  174. [/[ \t\r\n]+/, ""],
  175. [/\/\*\*(?!\/)/, "comment.doc", "@doccomment"],
  176. [/\/\*/, "comment", "@comment"],
  177. [/\/\/.*$/, "comment"]
  178. ],
  179. comment: [
  180. [/[^\/*]+/, "comment"],
  181. [/\*\//, "comment", "@pop"],
  182. [/[\/*]/, "comment"]
  183. ],
  184. doccomment: [
  185. [/[^\/*]+/, "comment.doc"],
  186. [/\/\*/, "comment.doc.invalid"],
  187. [/\*\//, "comment.doc", "@pop"],
  188. [/[\/*]/, "comment.doc"]
  189. ],
  190. string: [
  191. [/[^\\"]+/, "string"],
  192. [/@escapes/, "string.escape"],
  193. [/\\./, "string.escape.invalid"],
  194. [/"/, "string", "@pop"]
  195. ],
  196. rawstring: [
  197. [/[^\`]/, "string"],
  198. [/`/, "string", "@pop"]
  199. ]
  200. }
  201. };
  202. export {
  203. conf,
  204. language
  205. };
  206. /*! Bundled license information:
  207. monaco-editor/esm/vs/basic-languages/go/go.js:
  208. (*!-----------------------------------------------------------------------------
  209. * Copyright (c) Microsoft Corporation. All rights reserved.
  210. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  211. * Released under the MIT license
  212. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  213. *-----------------------------------------------------------------------------*)
  214. */
  215. //# sourceMappingURL=go-CFWAUCOD.js.map