c29ac8cb76a6ad44a24569f931a88e6a13ee9eb25e5e7811f909785a23c2ae0d3d2523ea505fc638ec5c49dfef0b1a50f6410325183d73683a11449a9f01fe 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. "use strict";
  2. /*!-----------------------------------------------------------------------------
  3. * Copyright (c) Microsoft Corporation. All rights reserved.
  4. * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f)
  5. * Released under the MIT license
  6. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  7. *-----------------------------------------------------------------------------*/
  8. define("vs/basic-languages/apex/apex", ["require"],(require)=>{
  9. var moduleExports = (() => {
  10. var __defProp = Object.defineProperty;
  11. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  12. var __getOwnPropNames = Object.getOwnPropertyNames;
  13. var __hasOwnProp = Object.prototype.hasOwnProperty;
  14. var __export = (target, all) => {
  15. for (var name in all)
  16. __defProp(target, name, { get: all[name], enumerable: true });
  17. };
  18. var __copyProps = (to, from, except, desc) => {
  19. if (from && typeof from === "object" || typeof from === "function") {
  20. for (let key of __getOwnPropNames(from))
  21. if (!__hasOwnProp.call(to, key) && key !== except)
  22. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  23. }
  24. return to;
  25. };
  26. var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
  27. // src/basic-languages/apex/apex.ts
  28. var apex_exports = {};
  29. __export(apex_exports, {
  30. conf: () => conf,
  31. language: () => language
  32. });
  33. var conf = {
  34. wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
  35. comments: {
  36. lineComment: "//",
  37. blockComment: ["/*", "*/"]
  38. },
  39. brackets: [
  40. ["{", "}"],
  41. ["[", "]"],
  42. ["(", ")"]
  43. ],
  44. autoClosingPairs: [
  45. { open: "{", close: "}" },
  46. { open: "[", close: "]" },
  47. { open: "(", close: ")" },
  48. { open: '"', close: '"' },
  49. { open: "'", close: "'" }
  50. ],
  51. surroundingPairs: [
  52. { open: "{", close: "}" },
  53. { open: "[", close: "]" },
  54. { open: "(", close: ")" },
  55. { open: '"', close: '"' },
  56. { open: "'", close: "'" },
  57. { open: "<", close: ">" }
  58. ],
  59. folding: {
  60. markers: {
  61. start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
  62. end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
  63. }
  64. }
  65. };
  66. var keywords = [
  67. "abstract",
  68. "activate",
  69. "and",
  70. "any",
  71. "array",
  72. "as",
  73. "asc",
  74. "assert",
  75. "autonomous",
  76. "begin",
  77. "bigdecimal",
  78. "blob",
  79. "boolean",
  80. "break",
  81. "bulk",
  82. "by",
  83. "case",
  84. "cast",
  85. "catch",
  86. "char",
  87. "class",
  88. "collect",
  89. "commit",
  90. "const",
  91. "continue",
  92. "convertcurrency",
  93. "decimal",
  94. "default",
  95. "delete",
  96. "desc",
  97. "do",
  98. "double",
  99. "else",
  100. "end",
  101. "enum",
  102. "exception",
  103. "exit",
  104. "export",
  105. "extends",
  106. "false",
  107. "final",
  108. "finally",
  109. "float",
  110. "for",
  111. "from",
  112. "future",
  113. "get",
  114. "global",
  115. "goto",
  116. "group",
  117. "having",
  118. "hint",
  119. "if",
  120. "implements",
  121. "import",
  122. "in",
  123. "inner",
  124. "insert",
  125. "instanceof",
  126. "int",
  127. "interface",
  128. "into",
  129. "join",
  130. "last_90_days",
  131. "last_month",
  132. "last_n_days",
  133. "last_week",
  134. "like",
  135. "limit",
  136. "list",
  137. "long",
  138. "loop",
  139. "map",
  140. "merge",
  141. "native",
  142. "new",
  143. "next_90_days",
  144. "next_month",
  145. "next_n_days",
  146. "next_week",
  147. "not",
  148. "null",
  149. "nulls",
  150. "number",
  151. "object",
  152. "of",
  153. "on",
  154. "or",
  155. "outer",
  156. "override",
  157. "package",
  158. "parallel",
  159. "pragma",
  160. "private",
  161. "protected",
  162. "public",
  163. "retrieve",
  164. "return",
  165. "returning",
  166. "rollback",
  167. "savepoint",
  168. "search",
  169. "select",
  170. "set",
  171. "short",
  172. "sort",
  173. "stat",
  174. "static",
  175. "strictfp",
  176. "super",
  177. "switch",
  178. "synchronized",
  179. "system",
  180. "testmethod",
  181. "then",
  182. "this",
  183. "this_month",
  184. "this_week",
  185. "throw",
  186. "throws",
  187. "today",
  188. "tolabel",
  189. "tomorrow",
  190. "transaction",
  191. "transient",
  192. "trigger",
  193. "true",
  194. "try",
  195. "type",
  196. "undelete",
  197. "update",
  198. "upsert",
  199. "using",
  200. "virtual",
  201. "void",
  202. "volatile",
  203. "webservice",
  204. "when",
  205. "where",
  206. "while",
  207. "yesterday"
  208. ];
  209. var uppercaseFirstLetter = (lowercase) => lowercase.charAt(0).toUpperCase() + lowercase.substr(1);
  210. var keywordsWithCaseVariations = [];
  211. keywords.forEach((lowercase) => {
  212. keywordsWithCaseVariations.push(lowercase);
  213. keywordsWithCaseVariations.push(lowercase.toUpperCase());
  214. keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase));
  215. });
  216. var language = {
  217. defaultToken: "",
  218. tokenPostfix: ".apex",
  219. keywords: keywordsWithCaseVariations,
  220. operators: [
  221. "=",
  222. ">",
  223. "<",
  224. "!",
  225. "~",
  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. symbols: /[=><!~?:&|+\-*\/\^%]+/,
  260. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  261. digits: /\d+(_+\d+)*/,
  262. octaldigits: /[0-7]+(_+[0-7]+)*/,
  263. binarydigits: /[0-1]+(_+[0-1]+)*/,
  264. hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
  265. tokenizer: {
  266. root: [
  267. [
  268. /[a-z_$][\w$]*/,
  269. {
  270. cases: {
  271. "@keywords": { token: "keyword.$0" },
  272. "@default": "identifier"
  273. }
  274. }
  275. ],
  276. [
  277. /[A-Z][\w\$]*/,
  278. {
  279. cases: {
  280. "@keywords": { token: "keyword.$0" },
  281. "@default": "type.identifier"
  282. }
  283. }
  284. ],
  285. { include: "@whitespace" },
  286. [/[{}()\[\]]/, "@brackets"],
  287. [/[<>](?!@symbols)/, "@brackets"],
  288. [
  289. /@symbols/,
  290. {
  291. cases: {
  292. "@operators": "delimiter",
  293. "@default": ""
  294. }
  295. }
  296. ],
  297. [/@\s*[a-zA-Z_\$][\w\$]*/, "annotation"],
  298. [/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, "number.float"],
  299. [/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, "number.float"],
  300. [/(@digits)[fFdD]/, "number.float"],
  301. [/(@digits)[lL]?/, "number"],
  302. [/[;,.]/, "delimiter"],
  303. [/"([^"\\]|\\.)*$/, "string.invalid"],
  304. [/'([^'\\]|\\.)*$/, "string.invalid"],
  305. [/"/, "string", '@string."'],
  306. [/'/, "string", "@string.'"],
  307. [/'[^\\']'/, "string"],
  308. [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
  309. [/'/, "string.invalid"]
  310. ],
  311. whitespace: [
  312. [/[ \t\r\n]+/, ""],
  313. [/\/\*\*(?!\/)/, "comment.doc", "@apexdoc"],
  314. [/\/\*/, "comment", "@comment"],
  315. [/\/\/.*$/, "comment"]
  316. ],
  317. comment: [
  318. [/[^\/*]+/, "comment"],
  319. [/\*\//, "comment", "@pop"],
  320. [/[\/*]/, "comment"]
  321. ],
  322. apexdoc: [
  323. [/[^\/*]+/, "comment.doc"],
  324. [/\*\//, "comment.doc", "@pop"],
  325. [/[\/*]/, "comment.doc"]
  326. ],
  327. string: [
  328. [/[^\\"']+/, "string"],
  329. [/@escapes/, "string.escape"],
  330. [/\\./, "string.escape.invalid"],
  331. [
  332. /["']/,
  333. {
  334. cases: {
  335. "$#==$S2": { token: "string", next: "@pop" },
  336. "@default": "string"
  337. }
  338. }
  339. ]
  340. ]
  341. }
  342. };
  343. return __toCommonJS(apex_exports);
  344. })();
  345. return moduleExports;
  346. });