ecl.js 9.3 KB

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