ecl.js 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. "use strict";
  2. /*!-----------------------------------------------------------------------------
  3. * Copyright (c) Microsoft Corporation. All rights reserved.
  4. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  5. * Released under the MIT license
  6. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  7. *-----------------------------------------------------------------------------*/
  8. define("vs/basic-languages/ecl/ecl", ["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/ecl/ecl.ts
  28. var ecl_exports = {};
  29. __export(ecl_exports, {
  30. conf: () => conf,
  31. language: () => language
  32. });
  33. var conf = {
  34. comments: {
  35. lineComment: "//",
  36. blockComment: ["/*", "*/"]
  37. },
  38. brackets: [
  39. ["{", "}"],
  40. ["[", "]"],
  41. ["(", ")"]
  42. ],
  43. autoClosingPairs: [
  44. { open: "{", close: "}" },
  45. { open: "[", close: "]" },
  46. { open: "(", close: ")" },
  47. { open: "'", close: "'", notIn: ["string", "comment"] },
  48. { open: '"', close: '"', notIn: ["string", "comment"] }
  49. ],
  50. surroundingPairs: [
  51. { open: "{", close: "}" },
  52. { open: "[", close: "]" },
  53. { open: "(", close: ")" },
  54. { open: "<", close: ">" },
  55. { open: "'", close: "'" },
  56. { open: '"', close: '"' }
  57. ]
  58. };
  59. var language = {
  60. defaultToken: "",
  61. tokenPostfix: ".ecl",
  62. ignoreCase: true,
  63. brackets: [
  64. { open: "{", close: "}", token: "delimiter.curly" },
  65. { open: "[", close: "]", token: "delimiter.square" },
  66. { open: "(", close: ")", token: "delimiter.parenthesis" },
  67. { open: "<", close: ">", token: "delimiter.angle" }
  68. ],
  69. pounds: [
  70. "append",
  71. "break",
  72. "declare",
  73. "demangle",
  74. "end",
  75. "for",
  76. "getdatatype",
  77. "if",
  78. "inmodule",
  79. "loop",
  80. "mangle",
  81. "onwarning",
  82. "option",
  83. "set",
  84. "stored",
  85. "uniquename"
  86. ].join("|"),
  87. keywords: [
  88. "__compressed__",
  89. "after",
  90. "all",
  91. "and",
  92. "any",
  93. "as",
  94. "atmost",
  95. "before",
  96. "beginc",
  97. "best",
  98. "between",
  99. "case",
  100. "cluster",
  101. "compressed",
  102. "compression",
  103. "const",
  104. "counter",
  105. "csv",
  106. "default",
  107. "descend",
  108. "embed",
  109. "encoding",
  110. "encrypt",
  111. "end",
  112. "endc",
  113. "endembed",
  114. "endmacro",
  115. "enum",
  116. "escape",
  117. "except",
  118. "exclusive",
  119. "expire",
  120. "export",
  121. "extend",
  122. "fail",
  123. "few",
  124. "fileposition",
  125. "first",
  126. "flat",
  127. "forward",
  128. "from",
  129. "full",
  130. "function",
  131. "functionmacro",
  132. "group",
  133. "grouped",
  134. "heading",
  135. "hole",
  136. "ifblock",
  137. "import",
  138. "in",
  139. "inner",
  140. "interface",
  141. "internal",
  142. "joined",
  143. "keep",
  144. "keyed",
  145. "last",
  146. "left",
  147. "limit",
  148. "linkcounted",
  149. "literal",
  150. "little_endian",
  151. "load",
  152. "local",
  153. "locale",
  154. "lookup",
  155. "lzw",
  156. "macro",
  157. "many",
  158. "maxcount",
  159. "maxlength",
  160. "min skew",
  161. "module",
  162. "mofn",
  163. "multiple",
  164. "named",
  165. "namespace",
  166. "nocase",
  167. "noroot",
  168. "noscan",
  169. "nosort",
  170. "not",
  171. "noxpath",
  172. "of",
  173. "onfail",
  174. "only",
  175. "opt",
  176. "or",
  177. "outer",
  178. "overwrite",
  179. "packed",
  180. "partition",
  181. "penalty",
  182. "physicallength",
  183. "pipe",
  184. "prefetch",
  185. "quote",
  186. "record",
  187. "repeat",
  188. "retry",
  189. "return",
  190. "right",
  191. "right1",
  192. "right2",
  193. "rows",
  194. "rowset",
  195. "scan",
  196. "scope",
  197. "self",
  198. "separator",
  199. "service",
  200. "shared",
  201. "skew",
  202. "skip",
  203. "smart",
  204. "soapaction",
  205. "sql",
  206. "stable",
  207. "store",
  208. "terminator",
  209. "thor",
  210. "threshold",
  211. "timelimit",
  212. "timeout",
  213. "token",
  214. "transform",
  215. "trim",
  216. "type",
  217. "unicodeorder",
  218. "unordered",
  219. "unsorted",
  220. "unstable",
  221. "update",
  222. "use",
  223. "validate",
  224. "virtual",
  225. "whole",
  226. "width",
  227. "wild",
  228. "within",
  229. "wnotrim",
  230. "xml",
  231. "xpath"
  232. ],
  233. functions: [
  234. "abs",
  235. "acos",
  236. "aggregate",
  237. "allnodes",
  238. "apply",
  239. "ascii",
  240. "asin",
  241. "assert",
  242. "asstring",
  243. "atan",
  244. "atan2",
  245. "ave",
  246. "build",
  247. "buildindex",
  248. "case",
  249. "catch",
  250. "choose",
  251. "choosen",
  252. "choosesets",
  253. "clustersize",
  254. "combine",
  255. "correlation",
  256. "cos",
  257. "cosh",
  258. "count",
  259. "covariance",
  260. "cron",
  261. "dataset",
  262. "dedup",
  263. "define",
  264. "denormalize",
  265. "dictionary",
  266. "distribute",
  267. "distributed",
  268. "distribution",
  269. "ebcdic",
  270. "enth",
  271. "error",
  272. "evaluate",
  273. "event",
  274. "eventextra",
  275. "eventname",
  276. "exists",
  277. "exp",
  278. "fail",
  279. "failcode",
  280. "failmessage",
  281. "fetch",
  282. "fromunicode",
  283. "fromxml",
  284. "getenv",
  285. "getisvalid",
  286. "global",
  287. "graph",
  288. "group",
  289. "hash",
  290. "hash32",
  291. "hash64",
  292. "hashcrc",
  293. "hashmd5",
  294. "having",
  295. "httpcall",
  296. "httpheader",
  297. "if",
  298. "iff",
  299. "index",
  300. "intformat",
  301. "isvalid",
  302. "iterate",
  303. "join",
  304. "keydiff",
  305. "keypatch",
  306. "keyunicode",
  307. "length",
  308. "library",
  309. "limit",
  310. "ln",
  311. "loadxml",
  312. "local",
  313. "log",
  314. "loop",
  315. "map",
  316. "matched",
  317. "matchlength",
  318. "matchposition",
  319. "matchtext",
  320. "matchunicode",
  321. "max",
  322. "merge",
  323. "mergejoin",
  324. "min",
  325. "nofold",
  326. "nolocal",
  327. "nonempty",
  328. "normalize",
  329. "nothor",
  330. "notify",
  331. "output",
  332. "parallel",
  333. "parse",
  334. "pipe",
  335. "power",
  336. "preload",
  337. "process",
  338. "project",
  339. "pull",
  340. "random",
  341. "range",
  342. "rank",
  343. "ranked",
  344. "realformat",
  345. "recordof",
  346. "regexfind",
  347. "regexreplace",
  348. "regroup",
  349. "rejected",
  350. "rollup",
  351. "round",
  352. "roundup",
  353. "row",
  354. "rowdiff",
  355. "sample",
  356. "sequential",
  357. "set",
  358. "sin",
  359. "sinh",
  360. "sizeof",
  361. "soapcall",
  362. "sort",
  363. "sorted",
  364. "sqrt",
  365. "stepped",
  366. "stored",
  367. "sum",
  368. "table",
  369. "tan",
  370. "tanh",
  371. "thisnode",
  372. "topn",
  373. "tounicode",
  374. "toxml",
  375. "transfer",
  376. "transform",
  377. "trim",
  378. "truncate",
  379. "typeof",
  380. "ungroup",
  381. "unicodeorder",
  382. "variance",
  383. "wait",
  384. "which",
  385. "workunit",
  386. "xmldecode",
  387. "xmlencode",
  388. "xmltext",
  389. "xmlunicode"
  390. ],
  391. typesint: ["integer", "unsigned"].join("|"),
  392. typesnum: ["data", "qstring", "string", "unicode", "utf8", "varstring", "varunicode"],
  393. typesone: [
  394. "ascii",
  395. "big_endian",
  396. "boolean",
  397. "data",
  398. "decimal",
  399. "ebcdic",
  400. "grouped",
  401. "integer",
  402. "linkcounted",
  403. "pattern",
  404. "qstring",
  405. "real",
  406. "record",
  407. "rule",
  408. "set of",
  409. "streamed",
  410. "string",
  411. "token",
  412. "udecimal",
  413. "unicode",
  414. "unsigned",
  415. "utf8",
  416. "varstring",
  417. "varunicode"
  418. ].join("|"),
  419. operators: ["+", "-", "/", ":=", "<", "<>", "=", ">", "\\", "and", "in", "not", "or"],
  420. symbols: /[=><!~?:&|+\-*\/\^%]+/,
  421. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  422. tokenizer: {
  423. root: [
  424. [/@typesint[4|8]/, "type"],
  425. [/#(@pounds)/, "type"],
  426. [/@typesone/, "type"],
  427. [
  428. /[a-zA-Z_$][\w-$]*/,
  429. {
  430. cases: {
  431. "@functions": "keyword.function",
  432. "@keywords": "keyword",
  433. "@operators": "operator"
  434. }
  435. }
  436. ],
  437. { include: "@whitespace" },
  438. [/[{}()\[\]]/, "@brackets"],
  439. [/[<>](?!@symbols)/, "@brackets"],
  440. [
  441. /@symbols/,
  442. {
  443. cases: {
  444. "@operators": "delimiter",
  445. "@default": ""
  446. }
  447. }
  448. ],
  449. [/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?/, "number.float"],
  450. [/0[xX][0-9a-fA-F_]+/, "number.hex"],
  451. [/0[bB][01]+/, "number.hex"],
  452. [/[0-9_]+/, "number"],
  453. [/[;,.]/, "delimiter"],
  454. [/"([^"\\]|\\.)*$/, "string.invalid"],
  455. [/"/, "string", "@string"],
  456. [/'[^\\']'/, "string"],
  457. [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
  458. [/'/, "string.invalid"]
  459. ],
  460. whitespace: [
  461. [/[ \t\v\f\r\n]+/, ""],
  462. [/\/\*/, "comment", "@comment"],
  463. [/\/\/.*$/, "comment"]
  464. ],
  465. comment: [
  466. [/[^\/*]+/, "comment"],
  467. [/\*\//, "comment", "@pop"],
  468. [/[\/*]/, "comment"]
  469. ],
  470. string: [
  471. [/[^\\']+/, "string"],
  472. [/@escapes/, "string.escape"],
  473. [/\\./, "string.escape.invalid"],
  474. [/'/, "string", "@pop"]
  475. ]
  476. }
  477. };
  478. return __toCommonJS(ecl_exports);
  479. })();
  480. return moduleExports;
  481. });