csharp-CODLQU7B.js 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.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: "'", notIn: ["string", "comment"] },
  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. folding: {
  30. markers: {
  31. start: new RegExp("^\\s*#region\\b"),
  32. end: new RegExp("^\\s*#endregion\\b")
  33. }
  34. }
  35. };
  36. var language = {
  37. defaultToken: "",
  38. tokenPostfix: ".cs",
  39. brackets: [
  40. { open: "{", close: "}", token: "delimiter.curly" },
  41. { open: "[", close: "]", token: "delimiter.square" },
  42. { open: "(", close: ")", token: "delimiter.parenthesis" },
  43. { open: "<", close: ">", token: "delimiter.angle" }
  44. ],
  45. keywords: [
  46. "extern",
  47. "alias",
  48. "using",
  49. "bool",
  50. "decimal",
  51. "sbyte",
  52. "byte",
  53. "short",
  54. "ushort",
  55. "int",
  56. "uint",
  57. "long",
  58. "ulong",
  59. "char",
  60. "float",
  61. "double",
  62. "object",
  63. "dynamic",
  64. "string",
  65. "assembly",
  66. "is",
  67. "as",
  68. "ref",
  69. "out",
  70. "this",
  71. "base",
  72. "new",
  73. "typeof",
  74. "void",
  75. "checked",
  76. "unchecked",
  77. "default",
  78. "delegate",
  79. "var",
  80. "const",
  81. "if",
  82. "else",
  83. "switch",
  84. "case",
  85. "while",
  86. "do",
  87. "for",
  88. "foreach",
  89. "in",
  90. "break",
  91. "continue",
  92. "goto",
  93. "return",
  94. "throw",
  95. "try",
  96. "catch",
  97. "finally",
  98. "lock",
  99. "yield",
  100. "from",
  101. "let",
  102. "where",
  103. "join",
  104. "on",
  105. "equals",
  106. "into",
  107. "orderby",
  108. "ascending",
  109. "descending",
  110. "select",
  111. "group",
  112. "by",
  113. "namespace",
  114. "partial",
  115. "class",
  116. "field",
  117. "event",
  118. "method",
  119. "param",
  120. "public",
  121. "protected",
  122. "internal",
  123. "private",
  124. "abstract",
  125. "sealed",
  126. "static",
  127. "struct",
  128. "readonly",
  129. "volatile",
  130. "virtual",
  131. "override",
  132. "params",
  133. "get",
  134. "set",
  135. "add",
  136. "remove",
  137. "operator",
  138. "true",
  139. "false",
  140. "implicit",
  141. "explicit",
  142. "interface",
  143. "enum",
  144. "null",
  145. "async",
  146. "await",
  147. "fixed",
  148. "sizeof",
  149. "stackalloc",
  150. "unsafe",
  151. "nameof",
  152. "when"
  153. ],
  154. namespaceFollows: ["namespace", "using"],
  155. parenFollows: ["if", "for", "while", "switch", "foreach", "using", "catch", "when"],
  156. operators: [
  157. "=",
  158. "??",
  159. "||",
  160. "&&",
  161. "|",
  162. "^",
  163. "&",
  164. "==",
  165. "!=",
  166. "<=",
  167. ">=",
  168. "<<",
  169. "+",
  170. "-",
  171. "*",
  172. "/",
  173. "%",
  174. "!",
  175. "~",
  176. "++",
  177. "--",
  178. "+=",
  179. "-=",
  180. "*=",
  181. "/=",
  182. "%=",
  183. "&=",
  184. "|=",
  185. "^=",
  186. "<<=",
  187. ">>=",
  188. ">>",
  189. "=>"
  190. ],
  191. symbols: /[=><!~?:&|+\-*\/\^%]+/,
  192. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  193. tokenizer: {
  194. root: [
  195. [
  196. /\@?[a-zA-Z_]\w*/,
  197. {
  198. cases: {
  199. "@namespaceFollows": {
  200. token: "keyword.$0",
  201. next: "@namespace"
  202. },
  203. "@keywords": {
  204. token: "keyword.$0",
  205. next: "@qualified"
  206. },
  207. "@default": { token: "identifier", next: "@qualified" }
  208. }
  209. }
  210. ],
  211. { include: "@whitespace" },
  212. [
  213. /}/,
  214. {
  215. cases: {
  216. "$S2==interpolatedstring": {
  217. token: "string.quote",
  218. next: "@pop"
  219. },
  220. "$S2==litinterpstring": {
  221. token: "string.quote",
  222. next: "@pop"
  223. },
  224. "@default": "@brackets"
  225. }
  226. }
  227. ],
  228. [/[{}()\[\]]/, "@brackets"],
  229. [/[<>](?!@symbols)/, "@brackets"],
  230. [
  231. /@symbols/,
  232. {
  233. cases: {
  234. "@operators": "delimiter",
  235. "@default": ""
  236. }
  237. }
  238. ],
  239. [/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/, "number.float"],
  240. [/0[xX][0-9a-fA-F_]+/, "number.hex"],
  241. [/0[bB][01_]+/, "number.hex"],
  242. [/[0-9_]+/, "number"],
  243. [/[;,.]/, "delimiter"],
  244. [/"([^"\\]|\\.)*$/, "string.invalid"],
  245. [/"/, { token: "string.quote", next: "@string" }],
  246. [/\$\@"/, { token: "string.quote", next: "@litinterpstring" }],
  247. [/\@"/, { token: "string.quote", next: "@litstring" }],
  248. [/\$"/, { token: "string.quote", next: "@interpolatedstring" }],
  249. [/'[^\\']'/, "string"],
  250. [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
  251. [/'/, "string.invalid"]
  252. ],
  253. qualified: [
  254. [
  255. /[a-zA-Z_][\w]*/,
  256. {
  257. cases: {
  258. "@keywords": { token: "keyword.$0" },
  259. "@default": "identifier"
  260. }
  261. }
  262. ],
  263. [/\./, "delimiter"],
  264. ["", "", "@pop"]
  265. ],
  266. namespace: [
  267. { include: "@whitespace" },
  268. [/[A-Z]\w*/, "namespace"],
  269. [/[\.=]/, "delimiter"],
  270. ["", "", "@pop"]
  271. ],
  272. comment: [
  273. [/[^\/*]+/, "comment"],
  274. ["\\*/", "comment", "@pop"],
  275. [/[\/*]/, "comment"]
  276. ],
  277. string: [
  278. [/[^\\"]+/, "string"],
  279. [/@escapes/, "string.escape"],
  280. [/\\./, "string.escape.invalid"],
  281. [/"/, { token: "string.quote", next: "@pop" }]
  282. ],
  283. litstring: [
  284. [/[^"]+/, "string"],
  285. [/""/, "string.escape"],
  286. [/"/, { token: "string.quote", next: "@pop" }]
  287. ],
  288. litinterpstring: [
  289. [/[^"{]+/, "string"],
  290. [/""/, "string.escape"],
  291. [/{{/, "string.escape"],
  292. [/}}/, "string.escape"],
  293. [/{/, { token: "string.quote", next: "root.litinterpstring" }],
  294. [/"/, { token: "string.quote", next: "@pop" }]
  295. ],
  296. interpolatedstring: [
  297. [/[^\\"{]+/, "string"],
  298. [/@escapes/, "string.escape"],
  299. [/\\./, "string.escape.invalid"],
  300. [/{{/, "string.escape"],
  301. [/}}/, "string.escape"],
  302. [/{/, { token: "string.quote", next: "root.interpolatedstring" }],
  303. [/"/, { token: "string.quote", next: "@pop" }]
  304. ],
  305. whitespace: [
  306. [/^[ \t\v\f]*#((r)|(load))(?=\s)/, "directive.csx"],
  307. [/^[ \t\v\f]*#\w.*$/, "namespace.cpp"],
  308. [/[ \t\v\f\r\n]+/, ""],
  309. [/\/\*/, "comment", "@comment"],
  310. [/\/\/.*$/, "comment"]
  311. ]
  312. }
  313. };
  314. export {
  315. conf,
  316. language
  317. };
  318. /*! Bundled license information:
  319. monaco-editor/esm/vs/basic-languages/csharp/csharp.js:
  320. (*!-----------------------------------------------------------------------------
  321. * Copyright (c) Microsoft Corporation. All rights reserved.
  322. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  323. * Released under the MIT license
  324. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  325. *-----------------------------------------------------------------------------*)
  326. */
  327. //# sourceMappingURL=csharp-CODLQU7B.js.map