cpp-3GEESYZ7.js 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.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", "comment"] },
  18. { open: '"', close: '"', notIn: ["string"] }
  19. ],
  20. surroundingPairs: [
  21. { open: "{", close: "}" },
  22. { open: "[", close: "]" },
  23. { open: "(", close: ")" },
  24. { open: '"', close: '"' },
  25. { open: "'", close: "'" }
  26. ],
  27. folding: {
  28. markers: {
  29. start: new RegExp("^\\s*#pragma\\s+region\\b"),
  30. end: new RegExp("^\\s*#pragma\\s+endregion\\b")
  31. }
  32. }
  33. };
  34. var language = {
  35. defaultToken: "",
  36. tokenPostfix: ".cpp",
  37. brackets: [
  38. { token: "delimiter.curly", open: "{", close: "}" },
  39. { token: "delimiter.parenthesis", open: "(", close: ")" },
  40. { token: "delimiter.square", open: "[", close: "]" },
  41. { token: "delimiter.angle", open: "<", close: ">" }
  42. ],
  43. keywords: [
  44. "abstract",
  45. "amp",
  46. "array",
  47. "auto",
  48. "bool",
  49. "break",
  50. "case",
  51. "catch",
  52. "char",
  53. "class",
  54. "const",
  55. "constexpr",
  56. "const_cast",
  57. "continue",
  58. "cpu",
  59. "decltype",
  60. "default",
  61. "delegate",
  62. "delete",
  63. "do",
  64. "double",
  65. "dynamic_cast",
  66. "each",
  67. "else",
  68. "enum",
  69. "event",
  70. "explicit",
  71. "export",
  72. "extern",
  73. "false",
  74. "final",
  75. "finally",
  76. "float",
  77. "for",
  78. "friend",
  79. "gcnew",
  80. "generic",
  81. "goto",
  82. "if",
  83. "in",
  84. "initonly",
  85. "inline",
  86. "int",
  87. "interface",
  88. "interior_ptr",
  89. "internal",
  90. "literal",
  91. "long",
  92. "mutable",
  93. "namespace",
  94. "new",
  95. "noexcept",
  96. "nullptr",
  97. "__nullptr",
  98. "operator",
  99. "override",
  100. "partial",
  101. "pascal",
  102. "pin_ptr",
  103. "private",
  104. "property",
  105. "protected",
  106. "public",
  107. "ref",
  108. "register",
  109. "reinterpret_cast",
  110. "restrict",
  111. "return",
  112. "safe_cast",
  113. "sealed",
  114. "short",
  115. "signed",
  116. "sizeof",
  117. "static",
  118. "static_assert",
  119. "static_cast",
  120. "struct",
  121. "switch",
  122. "template",
  123. "this",
  124. "thread_local",
  125. "throw",
  126. "tile_static",
  127. "true",
  128. "try",
  129. "typedef",
  130. "typeid",
  131. "typename",
  132. "union",
  133. "unsigned",
  134. "using",
  135. "virtual",
  136. "void",
  137. "volatile",
  138. "wchar_t",
  139. "where",
  140. "while",
  141. "_asm",
  142. "_based",
  143. "_cdecl",
  144. "_declspec",
  145. "_fastcall",
  146. "_if_exists",
  147. "_if_not_exists",
  148. "_inline",
  149. "_multiple_inheritance",
  150. "_pascal",
  151. "_single_inheritance",
  152. "_stdcall",
  153. "_virtual_inheritance",
  154. "_w64",
  155. "__abstract",
  156. "__alignof",
  157. "__asm",
  158. "__assume",
  159. "__based",
  160. "__box",
  161. "__builtin_alignof",
  162. "__cdecl",
  163. "__clrcall",
  164. "__declspec",
  165. "__delegate",
  166. "__event",
  167. "__except",
  168. "__fastcall",
  169. "__finally",
  170. "__forceinline",
  171. "__gc",
  172. "__hook",
  173. "__identifier",
  174. "__if_exists",
  175. "__if_not_exists",
  176. "__inline",
  177. "__int128",
  178. "__int16",
  179. "__int32",
  180. "__int64",
  181. "__int8",
  182. "__interface",
  183. "__leave",
  184. "__m128",
  185. "__m128d",
  186. "__m128i",
  187. "__m256",
  188. "__m256d",
  189. "__m256i",
  190. "__m512",
  191. "__m512d",
  192. "__m512i",
  193. "__m64",
  194. "__multiple_inheritance",
  195. "__newslot",
  196. "__nogc",
  197. "__noop",
  198. "__nounwind",
  199. "__novtordisp",
  200. "__pascal",
  201. "__pin",
  202. "__pragma",
  203. "__property",
  204. "__ptr32",
  205. "__ptr64",
  206. "__raise",
  207. "__restrict",
  208. "__resume",
  209. "__sealed",
  210. "__single_inheritance",
  211. "__stdcall",
  212. "__super",
  213. "__thiscall",
  214. "__try",
  215. "__try_cast",
  216. "__typeof",
  217. "__unaligned",
  218. "__unhook",
  219. "__uuidof",
  220. "__value",
  221. "__virtual_inheritance",
  222. "__w64",
  223. "__wchar_t"
  224. ],
  225. operators: [
  226. "=",
  227. ">",
  228. "<",
  229. "!",
  230. "~",
  231. "?",
  232. ":",
  233. "==",
  234. "<=",
  235. ">=",
  236. "!=",
  237. "&&",
  238. "||",
  239. "++",
  240. "--",
  241. "+",
  242. "-",
  243. "*",
  244. "/",
  245. "&",
  246. "|",
  247. "^",
  248. "%",
  249. "<<",
  250. ">>",
  251. ">>>",
  252. "+=",
  253. "-=",
  254. "*=",
  255. "/=",
  256. "&=",
  257. "|=",
  258. "^=",
  259. "%=",
  260. "<<=",
  261. ">>=",
  262. ">>>="
  263. ],
  264. symbols: /[=><!~?:&|+\-*\/\^%]+/,
  265. escapes: /\\(?:[0abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  266. integersuffix: /([uU](ll|LL|l|L)|(ll|LL|l|L)?[uU]?)/,
  267. floatsuffix: /[fFlL]?/,
  268. encoding: /u|u8|U|L/,
  269. tokenizer: {
  270. root: [
  271. [/@encoding?R\"(?:([^ ()\\\t]*))\(/, { token: "string.raw.begin", next: "@raw.$1" }],
  272. [
  273. /[a-zA-Z_]\w*/,
  274. {
  275. cases: {
  276. "@keywords": { token: "keyword.$0" },
  277. "@default": "identifier"
  278. }
  279. }
  280. ],
  281. [/^\s*#\s*include/, { token: "keyword.directive.include", next: "@include" }],
  282. [/^\s*#\s*\w+/, "keyword.directive"],
  283. { include: "@whitespace" },
  284. [/\[\s*\[/, { token: "annotation", next: "@annotation" }],
  285. [/[{}()\[\]]/, "@brackets"],
  286. [/[<>](?!@symbols)/, "@brackets"],
  287. [
  288. /@symbols/,
  289. {
  290. cases: {
  291. "@operators": "delimiter",
  292. "@default": ""
  293. }
  294. }
  295. ],
  296. [/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, "number.float"],
  297. [/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, "number.float"],
  298. [/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, "number.hex"],
  299. [/0[0-7']*[0-7](@integersuffix)/, "number.octal"],
  300. [/0[bB][0-1']*[0-1](@integersuffix)/, "number.binary"],
  301. [/\d[\d']*\d(@integersuffix)/, "number"],
  302. [/\d(@integersuffix)/, "number"],
  303. [/[;,.]/, "delimiter"],
  304. [/"([^"\\]|\\.)*$/, "string.invalid"],
  305. [/"/, "string", "@string"],
  306. [/'[^\\']'/, "string"],
  307. [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
  308. [/'/, "string.invalid"]
  309. ],
  310. whitespace: [
  311. [/[ \t\r\n]+/, ""],
  312. [/\/\*\*(?!\/)/, "comment.doc", "@doccomment"],
  313. [/\/\*/, "comment", "@comment"],
  314. [/\/\/.*\\$/, "comment", "@linecomment"],
  315. [/\/\/.*$/, "comment"]
  316. ],
  317. comment: [
  318. [/[^\/*]+/, "comment"],
  319. [/\*\//, "comment", "@pop"],
  320. [/[\/*]/, "comment"]
  321. ],
  322. linecomment: [
  323. [/.*[^\\]$/, "comment", "@pop"],
  324. [/[^]+/, "comment"]
  325. ],
  326. doccomment: [
  327. [/[^\/*]+/, "comment.doc"],
  328. [/\*\//, "comment.doc", "@pop"],
  329. [/[\/*]/, "comment.doc"]
  330. ],
  331. string: [
  332. [/[^\\"]+/, "string"],
  333. [/@escapes/, "string.escape"],
  334. [/\\./, "string.escape.invalid"],
  335. [/"/, "string", "@pop"]
  336. ],
  337. raw: [
  338. [
  339. /(.*)(\))(?:([^ ()\\\t"]*))(\")/,
  340. {
  341. cases: {
  342. "$3==$S2": [
  343. "string.raw",
  344. "string.raw.end",
  345. "string.raw.end",
  346. { token: "string.raw.end", next: "@pop" }
  347. ],
  348. "@default": ["string.raw", "string.raw", "string.raw", "string.raw"]
  349. }
  350. }
  351. ],
  352. [/.*/, "string.raw"]
  353. ],
  354. annotation: [
  355. { include: "@whitespace" },
  356. [/using|alignas/, "keyword"],
  357. [/[a-zA-Z0-9_]+/, "annotation"],
  358. [/[,:]/, "delimiter"],
  359. [/[()]/, "@brackets"],
  360. [/\]\s*\]/, { token: "annotation", next: "@pop" }]
  361. ],
  362. include: [
  363. [
  364. /(\s*)(<)([^<>]*)(>)/,
  365. [
  366. "",
  367. "keyword.directive.include.begin",
  368. "string.include.identifier",
  369. { token: "keyword.directive.include.end", next: "@pop" }
  370. ]
  371. ],
  372. [
  373. /(\s*)(")([^"]*)(")/,
  374. [
  375. "",
  376. "keyword.directive.include.begin",
  377. "string.include.identifier",
  378. { token: "keyword.directive.include.end", next: "@pop" }
  379. ]
  380. ]
  381. ]
  382. }
  383. };
  384. export {
  385. conf,
  386. language
  387. };
  388. /*! Bundled license information:
  389. monaco-editor/esm/vs/basic-languages/cpp/cpp.js:
  390. (*!-----------------------------------------------------------------------------
  391. * Copyright (c) Microsoft Corporation. All rights reserved.
  392. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  393. * Released under the MIT license
  394. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  395. *-----------------------------------------------------------------------------*)
  396. */
  397. //# sourceMappingURL=cpp-3GEESYZ7.js.map