@aiao/code-editor-react 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/dist/index.js +118 -2
  2. package/package.json +7 -4
  3. package/dist/apl-B2DGVGxc-Dd6D39pP.js +0 -76
  4. package/dist/asciiarmor-2LVJmxlE-CAn4gnoC.js +0 -34
  5. package/dist/asn1-jKiBa2Ya-xsKwdyq9.js +0 -95
  6. package/dist/asterisk-DS281yxp-B5eTWk_B.js +0 -271
  7. package/dist/brainfuck-C_p9pTT8-DKVQ9poL.js +0 -34
  8. package/dist/clike-BMALKCNj-Ck7Gc35_.js +0 -620
  9. package/dist/clojure-CCKyeQKf-N9sg777Z.js +0 -800
  10. package/dist/cmake-CuaCgAKt-BbEgXraO.js +0 -28
  11. package/dist/cobol-BlTKFDRj-CHCoWafp.js +0 -72
  12. package/dist/coffeescript-BVCvwO8I-Z15ai5ac.js +0 -179
  13. package/dist/commonlisp-D_kxz07b-Ce7sn14o.js +0 -75
  14. package/dist/crystal-D309uH6_-DS6LrXoE.js +0 -217
  15. package/dist/css-BkF-NPzE-DiJu9Nkd.js +0 -1553
  16. package/dist/cypher-BMq4Fwjl-Ml-omWgp.js +0 -68
  17. package/dist/d-BZcgY6La-KCW6-bIm.js +0 -127
  18. package/dist/diff-Cg9d_RX2-C01qBVFc.js +0 -18
  19. package/dist/dockerfile-DFX8bq9N-BIbYUQV0.js +0 -194
  20. package/dist/dtd-CtLokQ-U-DCbNdeIA.js +0 -84
  21. package/dist/dylan-QYeExnWK-DIUVpsct.js +0 -234
  22. package/dist/ebnf-DUPDuY4r-7HIXKmWn.js +0 -78
  23. package/dist/ecl-CiXN-g_D-DOI-W0if.js +0 -121
  24. package/dist/eiffel-yQhjl4T1-DIX8Ceq1.js +0 -110
  25. package/dist/elm-CNT9vbN0-BcYlydpO.js +0 -108
  26. package/dist/erlang-CFOYdy9e-DULXsFZl.js +0 -487
  27. package/dist/factor-Clf6BoVk-DBb2EHMF.js +0 -65
  28. package/dist/fcl-CPC2WYrI-CuXG3fcK.js +0 -103
  29. package/dist/forth-BmxRyE9S-BcFwWpeL.js +0 -60
  30. package/dist/fortran-9bvPyrOW-CuLcq-Iu.js +0 -442
  31. package/dist/gas-cpmYfFX2-sZgGhMxB.js +0 -183
  32. package/dist/gherkin-CJuwpceU-BRrr8yjO.js +0 -34
  33. package/dist/groovy-DZeT_VM--CmF8wcSo.js +0 -146
  34. package/dist/haskell-CxiO_7JL-BuULsXvv.js +0 -375
  35. package/dist/haxe-70NVW1pR-CM27SfgM.js +0 -359
  36. package/dist/http-D9LttvKF-j9E8oQ7o.js +0 -44
  37. package/dist/idl-B6TRFYjl-B6TRFYjl.js +0 -947
  38. package/dist/index-BMiCCEB1-CFMNJD60.js +0 -305
  39. package/dist/index-BNuasEBW-DZ41gDvf.js +0 -94
  40. package/dist/index-Bg1KDWyt-C0dA4q7z.js +0 -290
  41. package/dist/index-BuVm7ZG6-CVgdIGdI.js +0 -1305
  42. package/dist/index-BvS1cnHq-CvzF_kJP.js +0 -613
  43. package/dist/index-C44L0DmY-y7wRzM46.js +0 -138
  44. package/dist/index-C71CZfUx-BtWSxfva.js +0 -247
  45. package/dist/index-CGKWrtgc.js +0 -29766
  46. package/dist/index-CQ6JWNwi-DowNkPcb.js +0 -566
  47. package/dist/index-CpRVx97--DylNh-Zi.js +0 -342
  48. package/dist/index-CqvQj6d--nBAN1vpF.js +0 -270
  49. package/dist/index-CrbQBmWq-DmiRVF9u.js +0 -157
  50. package/dist/index-CzovO10m-DDglzqnG.js +0 -301
  51. package/dist/index-D0BZOY-S-rNSlBO9l.js +0 -101
  52. package/dist/index-D0svJS59-f8ZA2hgC.js +0 -555
  53. package/dist/index-D93XVMi1-CZ_Q2QZM.js +0 -136
  54. package/dist/index-DEB5VK0f-iiwOciBu.js +0 -252
  55. package/dist/index-Dp8osI_J-DDFW8XvK.js +0 -960
  56. package/dist/index-Ds4AioqO-Cg_BlAEI.js +0 -1917
  57. package/dist/index-Dy-OpkyQ-DcLuBsQT.js +0 -76
  58. package/dist/index-Dyi9rNIT-B7p7Dpus.js +0 -391
  59. package/dist/index-ZJkjD9tT-DJQk0ayW.js +0 -74
  60. package/dist/index-qH2lMs0G-Co53S8h3.js +0 -944
  61. package/dist/index-srIksFxX-BLrX1cGK.js +0 -59
  62. package/dist/javascript-DOuB9oqA-BxiygWgm.js +0 -691
  63. package/dist/julia-DpvXAuO6-Bk_IfD8X.js +0 -241
  64. package/dist/livescript-CanGTf8u-Cx6PrvS4.js +0 -272
  65. package/dist/lua-XplVlWi_-8f8obHzY.js +0 -217
  66. package/dist/mathematica-jaRHnSxC-B83gQsL2.js +0 -35
  67. package/dist/mbox-BctzC1hL-Hg5U2B4l.js +0 -76
  68. package/dist/mirc-CFBPAOaF-CfzSSk9W.js +0 -72
  69. package/dist/mllike-BSnXJBGA-Ao1NpT2u.js +0 -272
  70. package/dist/modelica-vUgVs--1-BObVpYBg.js +0 -93
  71. package/dist/mscgen-Cpl0NYLN-DqNArLGH.js +0 -104
  72. package/dist/mumps-CQoS1kWX-CkTUOQnt.js +0 -25
  73. package/dist/nginx-zDPm3Z74-DJk4KP7N.js +0 -87
  74. package/dist/nsis-BCLyjY7m-C2MffOQ3.js +0 -62
  75. package/dist/ntriples-CsNjv2QF-C4aZn3EO.js +0 -79
  76. package/dist/octave-C8PmmSRH-DM5vTWlU.js +0 -143
  77. package/dist/oz-Ce8aN8oE-BcJM4SVy.js +0 -151
  78. package/dist/pascal-De0D6mP7-D7DGFFKL.js +0 -77
  79. package/dist/perl-B4bSCe1C-6aIa2glS.js +0 -915
  80. package/dist/pig-D24Z8EXi-BD-qt5FU.js +0 -54
  81. package/dist/powershell-DkYVfTzP-Blt1Rodi.js +0 -249
  82. package/dist/properties-Dn9wna3M-EOOwnCnk.js +0 -26
  83. package/dist/protobuf-BPIjwpzm-DAButU8_.js +0 -49
  84. package/dist/pug-TGXr6c5j-C9HfQ86E.js +0 -248
  85. package/dist/puppet-nyd4dhjf-CGzH5dsa.js +0 -45
  86. package/dist/python-BkR3uSy8-CjDnyp3B.js +0 -313
  87. package/dist/q-DyHZGnqm-DGuqeH_T.js +0 -86
  88. package/dist/r-LKEuhEGI-BFQhJnTP.js +0 -104
  89. package/dist/rpm-IznJm2Xc-CbZqrWCM.js +0 -57
  90. package/dist/ruby-CcYfvIk6-DzPSfSGo.js +0 -228
  91. package/dist/sas-7E8yHoCW-D726Uzkw.js +0 -105
  92. package/dist/scheme-DjibxsNh-Bp5gVFkm.js +0 -124
  93. package/dist/shell-C0C2sNA_-BTeYg6ir.js +0 -182
  94. package/dist/sieve-Bwz7vjP5-Cw8iTBf7.js +0 -72
  95. package/dist/simple-mode-mNVtnu0l-BC8mf7KF.js +0 -89
  96. package/dist/smalltalk-Bhddl2pB-B7URiJSp.js +0 -48
  97. package/dist/solr-BNlsLglM-BM2OpfTI.js +0 -41
  98. package/dist/sparql-FarWu_Gb-FN_uQNd4.js +0 -197
  99. package/dist/spreadsheet-C-cy4P5N-5CSTwVYq.js +0 -49
  100. package/dist/sql-CfG5lQ3l-Bd4dgm_8.js +0 -278
  101. package/dist/stex-Du4h4KAU-QOov_zHj.js +0 -129
  102. package/dist/stylus-CAdqWld3-BcRBbBxD.js +0 -250
  103. package/dist/swift-DSxqR9R6-2Hz4NOoF.js +0 -230
  104. package/dist/tcl-xfoLljhY-DAZBRGQI.js +0 -81
  105. package/dist/textile-D1AWE-pc-DuiIfEnb.js +0 -295
  106. package/dist/tiddlywiki-5wqsXtSk-WuF_8VUv.js +0 -155
  107. package/dist/tiki-__Kn3CeS-CWcR9ib_.js +0 -181
  108. package/dist/toml-DWAmxCjl-CyJoDzs6.js +0 -56
  109. package/dist/troff-D2UO-fKf-DVoIzS-O.js +0 -35
  110. package/dist/ttcn-Bsa4sfRm-hoy08sYQ.js +0 -123
  111. package/dist/ttcn-cfg-Bac_acMi-DaC4kQpd.js +0 -88
  112. package/dist/turtle-xwJUxoPV-fs94wdNM.js +0 -80
  113. package/dist/vb-c2kQGd6--DU726qF0.js +0 -74
  114. package/dist/vbscript-1f_Dhg5H-DriA32xD.js +0 -324
  115. package/dist/velocity-DJd0pTTC-BG368IR6.js +0 -96
  116. package/dist/verilog-CiS1jyi5-giQA8J-e.js +0 -259
  117. package/dist/vhdl-T9HkrbI2-BJ8LEDog.js +0 -106
  118. package/dist/webidl-CjfDENEo-BM8KXKJ5.js +0 -155
  119. package/dist/xquery-Ct6lEb4B-C5KDc61l.js +0 -422
  120. package/dist/yacas-C0absKBh-B82QJ76F.js +0 -73
  121. package/dist/z80-Pki2zAjW-B0IQoIbR.js +0 -61
@@ -1,106 +0,0 @@
1
- function c(e) {
2
- for (var t = {}, n = e.split(","), r = 0; r < n.length; ++r) {
3
- var i = n[r].toUpperCase(), a = n[r].charAt(0).toUpperCase() + n[r].slice(1);
4
- t[n[r]] = !0, t[i] = !0, t[a] = !0;
5
- }
6
- return t;
7
- }
8
- function f(e) {
9
- return e.eatWhile(/[\w\$_]/), "meta";
10
- }
11
- var y = c("null"), p = { "`": f, $: f }, m = !1, b = c("abs,access,after,alias,all,and,architecture,array,assert,attribute,begin,block,body,buffer,bus,case,component,configuration,constant,disconnect,downto,else,elsif,end,end block,end case,end component,end for,end generate,end if,end loop,end process,end record,end units,entity,exit,file,for,function,generate,generic,generic map,group,guarded,if,impure,in,inertial,inout,is,label,library,linkage,literal,loop,map,mod,nand,new,next,nor,null,of,on,open,or,others,out,package,package body,port,port map,postponed,procedure,process,pure,range,record,register,reject,rem,report,return,rol,ror,select,severity,signal,sla,sll,sra,srl,subtype,then,to,transport,type,unaffected,units,until,use,variable,wait,when,while,with,xnor,xor"), h = c("architecture,entity,begin,case,port,else,elsif,end,for,function,if"), d = /[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/, o;
12
- function s(e, t) {
13
- var n = e.next();
14
- if (p[n]) {
15
- var r = p[n](e, t);
16
- if (r !== !1) return r;
17
- }
18
- if (n == '"')
19
- return t.tokenize = v(n), t.tokenize(e, t);
20
- if (n == "'")
21
- return t.tokenize = k(n), t.tokenize(e, t);
22
- if (/[\[\]{}\(\),;\:\.]/.test(n))
23
- return o = n, null;
24
- if (/[\d']/.test(n))
25
- return e.eatWhile(/[\w\.']/), "number";
26
- if (n == "-" && e.eat("-"))
27
- return e.skipToEnd(), "comment";
28
- if (d.test(n))
29
- return e.eatWhile(d), "operator";
30
- e.eatWhile(/[\w\$_]/);
31
- var i = e.current();
32
- return b.propertyIsEnumerable(i.toLowerCase()) ? (h.propertyIsEnumerable(i) && (o = "newstatement"), "keyword") : y.propertyIsEnumerable(i) ? "atom" : "variable";
33
- }
34
- function k(e) {
35
- return function(t, n) {
36
- for (var r = !1, i, a = !1; (i = t.next()) != null; ) {
37
- if (i == e && !r) {
38
- a = !0;
39
- break;
40
- }
41
- r = !r && i == "--";
42
- }
43
- return (a || !(r || m)) && (n.tokenize = s), "string";
44
- };
45
- }
46
- function v(e) {
47
- return function(t, n) {
48
- for (var r = !1, i, a = !1; (i = t.next()) != null; ) {
49
- if (i == e && !r) {
50
- a = !0;
51
- break;
52
- }
53
- r = !r && i == "--";
54
- }
55
- return (a || !(r || m)) && (n.tokenize = s), "string.special";
56
- };
57
- }
58
- function g(e, t, n, r, i) {
59
- this.indented = e, this.column = t, this.type = n, this.align = r, this.prev = i;
60
- }
61
- function u(e, t, n) {
62
- return e.context = new g(e.indented, t, n, null, e.context);
63
- }
64
- function l(e) {
65
- var t = e.context.type;
66
- return (t == ")" || t == "]" || t == "}") && (e.indented = e.context.indented), e.context = e.context.prev;
67
- }
68
- const x = {
69
- name: "vhdl",
70
- startState: function(e) {
71
- return {
72
- tokenize: null,
73
- context: new g(-e, 0, "top", !1),
74
- indented: 0,
75
- startOfLine: !0
76
- };
77
- },
78
- token: function(e, t) {
79
- var n = t.context;
80
- if (e.sol() && (n.align == null && (n.align = !1), t.indented = e.indentation(), t.startOfLine = !0), e.eatSpace()) return null;
81
- o = null;
82
- var r = (t.tokenize || s)(e, t);
83
- if (r == "comment" || r == "meta") return r;
84
- if (n.align == null && (n.align = !0), (o == ";" || o == ":") && n.type == "statement") l(t);
85
- else if (o == "{") u(t, e.column(), "}");
86
- else if (o == "[") u(t, e.column(), "]");
87
- else if (o == "(") u(t, e.column(), ")");
88
- else if (o == "}") {
89
- for (; n.type == "statement"; ) n = l(t);
90
- for (n.type == "}" && (n = l(t)); n.type == "statement"; ) n = l(t);
91
- } else o == n.type ? l(t) : (n.type == "}" || n.type == "top" || n.type == "statement" && o == "newstatement") && u(t, e.column(), "statement");
92
- return t.startOfLine = !1, r;
93
- },
94
- indent: function(e, t, n) {
95
- if (e.tokenize != s && e.tokenize != null) return 0;
96
- var r = t && t.charAt(0), i = e.context, a = r == i.type;
97
- return i.type == "statement" ? i.indented + (r == "{" ? 0 : n.unit) : i.align ? i.column + (a ? 0 : 1) : i.indented + (a ? 0 : n.unit);
98
- },
99
- languageData: {
100
- indentOnInput: /^\s*[{}]$/,
101
- commentTokens: { line: "--" }
102
- }
103
- };
104
- export {
105
- x as vhdl
106
- };
@@ -1,155 +0,0 @@
1
- function n(t) {
2
- return new RegExp("^((" + t.join(")|(") + "))\\b");
3
- }
4
- var o = [
5
- "Clamp",
6
- "Constructor",
7
- "EnforceRange",
8
- "Exposed",
9
- "ImplicitThis",
10
- "Global",
11
- "PrimaryGlobal",
12
- "LegacyArrayClass",
13
- "LegacyUnenumerableNamedProperties",
14
- "LenientThis",
15
- "NamedConstructor",
16
- "NewObject",
17
- "NoInterfaceObject",
18
- "OverrideBuiltins",
19
- "PutForwards",
20
- "Replaceable",
21
- "SameObject",
22
- "TreatNonObjectAsNull",
23
- "TreatNullAs",
24
- "EmptyString",
25
- "Unforgeable",
26
- "Unscopeable"
27
- ], s = n(o), c = [
28
- "unsigned",
29
- "short",
30
- "long",
31
- // UnsignedIntegerType
32
- "unrestricted",
33
- "float",
34
- "double",
35
- // UnrestrictedFloatType
36
- "boolean",
37
- "byte",
38
- "octet",
39
- // Rest of PrimitiveType
40
- "Promise",
41
- // PromiseType
42
- "ArrayBuffer",
43
- "DataView",
44
- "Int8Array",
45
- "Int16Array",
46
- "Int32Array",
47
- "Uint8Array",
48
- "Uint16Array",
49
- "Uint32Array",
50
- "Uint8ClampedArray",
51
- "Float32Array",
52
- "Float64Array",
53
- // BufferRelatedType
54
- "ByteString",
55
- "DOMString",
56
- "USVString",
57
- "sequence",
58
- "object",
59
- "RegExp",
60
- "Error",
61
- "DOMException",
62
- "FrozenArray",
63
- // Rest of NonAnyType
64
- "any",
65
- // Rest of SingleType
66
- "void"
67
- // Rest of ReturnType
68
- ], f = n(c), l = [
69
- "attribute",
70
- "callback",
71
- "const",
72
- "deleter",
73
- "dictionary",
74
- "enum",
75
- "getter",
76
- "implements",
77
- "inherit",
78
- "interface",
79
- "iterable",
80
- "legacycaller",
81
- "maplike",
82
- "partial",
83
- "required",
84
- "serializer",
85
- "setlike",
86
- "setter",
87
- "static",
88
- "stringifier",
89
- "typedef",
90
- // ArgumentNameKeyword except
91
- // "unrestricted"
92
- "optional",
93
- "readonly",
94
- "or"
95
- ], u = n(l), m = [
96
- "true",
97
- "false",
98
- // BooleanLiteral
99
- "Infinity",
100
- "NaN",
101
- // FloatLiteral
102
- "null"
103
- // Rest of ConstValue
104
- ], d = n(m), y = ["callback", "dictionary", "enum", "interface"], b = n(y), p = ["typedef"], h = n(p), A = /^[:<=>?]/, g = /^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/, D = /^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/, i = /^_?[A-Za-z][0-9A-Z_a-z-]*/, k = /^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/, E = /^"[^"]*"/, C = /^\/\*.*?\*\//, N = /^\/\*.*/, w = /^.*?\*\//;
105
- function S(t, e) {
106
- if (t.eatSpace()) return null;
107
- if (e.inComment)
108
- return t.match(w) ? (e.inComment = !1, "comment") : (t.skipToEnd(), "comment");
109
- if (t.match("//"))
110
- return t.skipToEnd(), "comment";
111
- if (t.match(C)) return "comment";
112
- if (t.match(N))
113
- return e.inComment = !0, "comment";
114
- if (t.match(/^-?[0-9\.]/, !1) && (t.match(g) || t.match(D)))
115
- return "number";
116
- if (t.match(E)) return "string";
117
- if (e.startDef && t.match(i)) return "def";
118
- if (e.endDef && t.match(k))
119
- return e.endDef = !1, "def";
120
- if (t.match(u)) return "keyword";
121
- if (t.match(f)) {
122
- var a = e.lastToken, r = (t.match(/^\s*(.+?)\b/, !1) || [])[1];
123
- return a === ":" || a === "implements" || r === "implements" || r === "=" ? "builtin" : "type";
124
- }
125
- return t.match(s) ? "builtin" : t.match(d) ? "atom" : t.match(i) ? "variable" : t.match(A) ? "operator" : (t.next(), null);
126
- }
127
- const T = {
128
- name: "webidl",
129
- startState: function() {
130
- return {
131
- // Is in multiline comment
132
- inComment: !1,
133
- // Last non-whitespace, matched token
134
- lastToken: "",
135
- // Next token is a definition
136
- startDef: !1,
137
- // Last token of the statement is a definition
138
- endDef: !1
139
- };
140
- },
141
- token: function(t, e) {
142
- var a = S(t, e);
143
- if (a) {
144
- var r = t.current();
145
- e.lastToken = r, a === "keyword" ? (e.startDef = b.test(r), e.endDef = e.endDef || h.test(r)) : e.startDef = !1;
146
- }
147
- return a;
148
- },
149
- languageData: {
150
- autocomplete: o.concat(c).concat(l).concat(m)
151
- }
152
- };
153
- export {
154
- T as webIDL
155
- };
@@ -1,422 +0,0 @@
1
- var d = (function() {
2
- function e(z) {
3
- return { type: z, style: "keyword" };
4
- }
5
- for (var t = e("operator"), n = { type: "atom", style: "atom" }, r = { type: "punctuation", style: null }, i = { type: "axis_specifier", style: "qualifier" }, o = {
6
- ",": r
7
- }, m = [
8
- "after",
9
- "all",
10
- "allowing",
11
- "ancestor",
12
- "ancestor-or-self",
13
- "any",
14
- "array",
15
- "as",
16
- "ascending",
17
- "at",
18
- "attribute",
19
- "base-uri",
20
- "before",
21
- "boundary-space",
22
- "by",
23
- "case",
24
- "cast",
25
- "castable",
26
- "catch",
27
- "child",
28
- "collation",
29
- "comment",
30
- "construction",
31
- "contains",
32
- "content",
33
- "context",
34
- "copy",
35
- "copy-namespaces",
36
- "count",
37
- "decimal-format",
38
- "declare",
39
- "default",
40
- "delete",
41
- "descendant",
42
- "descendant-or-self",
43
- "descending",
44
- "diacritics",
45
- "different",
46
- "distance",
47
- "document",
48
- "document-node",
49
- "element",
50
- "else",
51
- "empty",
52
- "empty-sequence",
53
- "encoding",
54
- "end",
55
- "entire",
56
- "every",
57
- "exactly",
58
- "except",
59
- "external",
60
- "first",
61
- "following",
62
- "following-sibling",
63
- "for",
64
- "from",
65
- "ftand",
66
- "ftnot",
67
- "ft-option",
68
- "ftor",
69
- "function",
70
- "fuzzy",
71
- "greatest",
72
- "group",
73
- "if",
74
- "import",
75
- "in",
76
- "inherit",
77
- "insensitive",
78
- "insert",
79
- "instance",
80
- "intersect",
81
- "into",
82
- "invoke",
83
- "is",
84
- "item",
85
- "language",
86
- "last",
87
- "lax",
88
- "least",
89
- "let",
90
- "levels",
91
- "lowercase",
92
- "map",
93
- "modify",
94
- "module",
95
- "most",
96
- "namespace",
97
- "next",
98
- "no",
99
- "node",
100
- "nodes",
101
- "no-inherit",
102
- "no-preserve",
103
- "not",
104
- "occurs",
105
- "of",
106
- "only",
107
- "option",
108
- "order",
109
- "ordered",
110
- "ordering",
111
- "paragraph",
112
- "paragraphs",
113
- "parent",
114
- "phrase",
115
- "preceding",
116
- "preceding-sibling",
117
- "preserve",
118
- "previous",
119
- "processing-instruction",
120
- "relationship",
121
- "rename",
122
- "replace",
123
- "return",
124
- "revalidation",
125
- "same",
126
- "satisfies",
127
- "schema",
128
- "schema-attribute",
129
- "schema-element",
130
- "score",
131
- "self",
132
- "sensitive",
133
- "sentence",
134
- "sentences",
135
- "sequence",
136
- "skip",
137
- "sliding",
138
- "some",
139
- "stable",
140
- "start",
141
- "stemming",
142
- "stop",
143
- "strict",
144
- "strip",
145
- "switch",
146
- "text",
147
- "then",
148
- "thesaurus",
149
- "times",
150
- "to",
151
- "transform",
152
- "treat",
153
- "try",
154
- "tumbling",
155
- "type",
156
- "typeswitch",
157
- "union",
158
- "unordered",
159
- "update",
160
- "updating",
161
- "uppercase",
162
- "using",
163
- "validate",
164
- "value",
165
- "variable",
166
- "version",
167
- "weight",
168
- "when",
169
- "where",
170
- "wildcards",
171
- "window",
172
- "with",
173
- "without",
174
- "word",
175
- "words",
176
- "xquery"
177
- ], a = 0, s = m.length; a < s; a++)
178
- o[m[a]] = e(m[a]);
179
- for (var p = [
180
- "xs:anyAtomicType",
181
- "xs:anySimpleType",
182
- "xs:anyType",
183
- "xs:anyURI",
184
- "xs:base64Binary",
185
- "xs:boolean",
186
- "xs:byte",
187
- "xs:date",
188
- "xs:dateTime",
189
- "xs:dateTimeStamp",
190
- "xs:dayTimeDuration",
191
- "xs:decimal",
192
- "xs:double",
193
- "xs:duration",
194
- "xs:ENTITIES",
195
- "xs:ENTITY",
196
- "xs:float",
197
- "xs:gDay",
198
- "xs:gMonth",
199
- "xs:gMonthDay",
200
- "xs:gYear",
201
- "xs:gYearMonth",
202
- "xs:hexBinary",
203
- "xs:ID",
204
- "xs:IDREF",
205
- "xs:IDREFS",
206
- "xs:int",
207
- "xs:integer",
208
- "xs:item",
209
- "xs:java",
210
- "xs:language",
211
- "xs:long",
212
- "xs:Name",
213
- "xs:NCName",
214
- "xs:negativeInteger",
215
- "xs:NMTOKEN",
216
- "xs:NMTOKENS",
217
- "xs:nonNegativeInteger",
218
- "xs:nonPositiveInteger",
219
- "xs:normalizedString",
220
- "xs:NOTATION",
221
- "xs:numeric",
222
- "xs:positiveInteger",
223
- "xs:precisionDecimal",
224
- "xs:QName",
225
- "xs:short",
226
- "xs:string",
227
- "xs:time",
228
- "xs:token",
229
- "xs:unsignedByte",
230
- "xs:unsignedInt",
231
- "xs:unsignedLong",
232
- "xs:unsignedShort",
233
- "xs:untyped",
234
- "xs:untypedAtomic",
235
- "xs:yearMonthDuration"
236
- ], a = 0, s = p.length; a < s; a++)
237
- o[p[a]] = n;
238
- for (var f = ["eq", "ne", "lt", "le", "gt", "ge", ":=", "=", ">", ">=", "<", "<=", ".", "|", "?", "and", "or", "div", "idiv", "mod", "*", "/", "+", "-"], a = 0, s = f.length; a < s; a++)
239
- o[f[a]] = t;
240
- for (var v = [
241
- "self::",
242
- "attribute::",
243
- "child::",
244
- "descendant::",
245
- "descendant-or-self::",
246
- "parent::",
247
- "ancestor::",
248
- "ancestor-or-self::",
249
- "following::",
250
- "preceding::",
251
- "following-sibling::",
252
- "preceding-sibling::"
253
- ], a = 0, s = v.length; a < s; a++)
254
- o[v[a]] = i;
255
- return o;
256
- })();
257
- function x(e, t, n) {
258
- return t.tokenize = n, n(e, t);
259
- }
260
- function u(e, t) {
261
- var n = e.next(), r = !1, i = A(e);
262
- if (n == "<") {
263
- if (e.match("!--", !0))
264
- return x(e, t, S);
265
- if (e.match("![CDATA", !1))
266
- return t.tokenize = D, "tag";
267
- if (e.match("?", !1))
268
- return x(e, t, E);
269
- var o = e.eat("/");
270
- e.eatSpace();
271
- for (var m = "", a; a = e.eat(/[^\s\u00a0=<>\"\'\/?]/); ) m += a;
272
- return x(e, t, N(m, o));
273
- } else {
274
- if (n == "{")
275
- return l(t, { type: "codeblock" }), null;
276
- if (n == "}")
277
- return c(t), null;
278
- if (b(t))
279
- return n == ">" ? "tag" : n == "/" && e.eat(">") ? (c(t), "tag") : "variable";
280
- if (/\d/.test(n))
281
- return e.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/), "atom";
282
- if (n === "(" && e.eat(":"))
283
- return l(t, { type: "comment" }), x(e, t, w);
284
- if (!i && (n === '"' || n === "'"))
285
- return k(e, t, n);
286
- if (n === "$")
287
- return x(e, t, T);
288
- if (n === ":" && e.eat("="))
289
- return "keyword";
290
- if (n === "(")
291
- return l(t, { type: "paren" }), null;
292
- if (n === ")")
293
- return c(t), null;
294
- if (n === "[")
295
- return l(t, { type: "bracket" }), null;
296
- if (n === "]")
297
- return c(t), null;
298
- var s = d.propertyIsEnumerable(n) && d[n];
299
- if (i && n === '"') for (; e.next() !== '"'; )
300
- ;
301
- if (i && n === "'") for (; e.next() !== "'"; )
302
- ;
303
- s || e.eatWhile(/[\w\$_-]/);
304
- var p = e.eat(":");
305
- !e.eat(":") && p && e.eatWhile(/[\w\$_-]/), e.match(/^[ \t]*\(/, !1) && (r = !0);
306
- var f = e.current();
307
- return s = d.propertyIsEnumerable(f) && d[f], r && !s && (s = { type: "function_call", style: "def" }), _(t) ? (c(t), "variable") : ((f == "element" || f == "attribute" || s.type == "axis_specifier") && l(t, { type: "xmlconstructor" }), s ? s.style : "variable");
308
- }
309
- }
310
- function w(e, t) {
311
- for (var n = !1, r = !1, i = 0, o; o = e.next(); ) {
312
- if (o == ")" && n)
313
- if (i > 0)
314
- i--;
315
- else {
316
- c(t);
317
- break;
318
- }
319
- else o == ":" && r && i++;
320
- n = o == ":", r = o == "(";
321
- }
322
- return "comment";
323
- }
324
- function I(e, t) {
325
- return function(n, r) {
326
- for (var i; i = n.next(); )
327
- if (i == e) {
328
- c(r), t && (r.tokenize = t);
329
- break;
330
- } else if (n.match("{", !1) && g(r))
331
- return l(r, { type: "codeblock" }), r.tokenize = u, "string";
332
- return "string";
333
- };
334
- }
335
- function k(e, t, n, r) {
336
- let i = I(n, r);
337
- return l(t, { type: "string", name: n, tokenize: i }), x(e, t, i);
338
- }
339
- function T(e, t) {
340
- var n = /[\w\$_-]/;
341
- if (e.eat('"')) {
342
- for (; e.next() !== '"'; )
343
- ;
344
- e.eat(":");
345
- } else
346
- e.eatWhile(n), e.match(":=", !1) || e.eat(":");
347
- return e.eatWhile(n), t.tokenize = u, "variable";
348
- }
349
- function N(e, t) {
350
- return function(n, r) {
351
- if (n.eatSpace(), t && n.eat(">"))
352
- return c(r), r.tokenize = u, "tag";
353
- if (n.eat("/") || l(r, { type: "tag", name: e, tokenize: u }), n.eat(">"))
354
- r.tokenize = u;
355
- else
356
- return r.tokenize = y, "tag";
357
- return "tag";
358
- };
359
- }
360
- function y(e, t) {
361
- var n = e.next();
362
- return n == "/" && e.eat(">") ? (g(t) && c(t), b(t) && c(t), "tag") : n == ">" ? (g(t) && c(t), "tag") : n == "=" ? null : n == '"' || n == "'" ? k(e, t, n, y) : (g(t) || l(t, { type: "attribute", tokenize: y }), e.eat(/[a-zA-Z_:]/), e.eatWhile(/[-a-zA-Z0-9_:.]/), e.eatSpace(), (e.match(">", !1) || e.match("/", !1)) && (c(t), t.tokenize = u), "attribute");
363
- }
364
- function S(e, t) {
365
- for (var n; n = e.next(); )
366
- if (n == "-" && e.match("->", !0))
367
- return t.tokenize = u, "comment";
368
- }
369
- function D(e, t) {
370
- for (var n; n = e.next(); )
371
- if (n == "]" && e.match("]", !0))
372
- return t.tokenize = u, "comment";
373
- }
374
- function E(e, t) {
375
- for (var n; n = e.next(); )
376
- if (n == "?" && e.match(">", !0))
377
- return t.tokenize = u, "processingInstruction";
378
- }
379
- function b(e) {
380
- return h(e, "tag");
381
- }
382
- function g(e) {
383
- return h(e, "attribute");
384
- }
385
- function _(e) {
386
- return h(e, "xmlconstructor");
387
- }
388
- function A(e) {
389
- return e.current() === '"' ? e.match(/^[^\"]+\"\:/, !1) : e.current() === "'" ? e.match(/^[^\"]+\'\:/, !1) : !1;
390
- }
391
- function h(e, t) {
392
- return e.stack.length && e.stack[e.stack.length - 1].type == t;
393
- }
394
- function l(e, t) {
395
- e.stack.push(t);
396
- }
397
- function c(e) {
398
- e.stack.pop();
399
- var t = e.stack.length && e.stack[e.stack.length - 1].tokenize;
400
- e.tokenize = t || u;
401
- }
402
- const q = {
403
- name: "xquery",
404
- startState: function() {
405
- return {
406
- tokenize: u,
407
- cc: [],
408
- stack: []
409
- };
410
- },
411
- token: function(e, t) {
412
- if (e.eatSpace()) return null;
413
- var n = t.tokenize(e, t);
414
- return n;
415
- },
416
- languageData: {
417
- commentTokens: { block: { open: "(:", close: ":)" } }
418
- }
419
- };
420
- export {
421
- q as xQuery
422
- };