@aiao/code-editor 0.0.7 → 0.0.8

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 (125) hide show
  1. package/dist/apl-B2DGVGxc.js +76 -0
  2. package/dist/asciiarmor-2LVJmxlE.js +34 -0
  3. package/dist/asn1-jKiBa2Ya.js +95 -0
  4. package/dist/asterisk-DS281yxp.js +271 -0
  5. package/dist/brainfuck-C_p9pTT8.js +34 -0
  6. package/dist/clike-BMALKCNj.js +620 -0
  7. package/dist/clojure-CCKyeQKf.js +800 -0
  8. package/dist/cmake-CuaCgAKt.js +28 -0
  9. package/dist/cobol-BlTKFDRj.js +72 -0
  10. package/dist/coffeescript-BVCvwO8I.js +179 -0
  11. package/dist/commonlisp-D_kxz07b.js +75 -0
  12. package/dist/crystal-D309uH6_.js +217 -0
  13. package/dist/css-BkF-NPzE.js +1553 -0
  14. package/dist/cypher-BMq4Fwjl.js +68 -0
  15. package/dist/d-BZcgY6La.js +127 -0
  16. package/dist/diff-Cg9d_RX2.js +18 -0
  17. package/dist/dockerfile-DFX8bq9N.js +194 -0
  18. package/dist/dtd-CtLokQ-U.js +84 -0
  19. package/dist/dylan-QYeExnWK.js +234 -0
  20. package/dist/ebnf-DUPDuY4r.js +78 -0
  21. package/dist/ecl-CiXN-g_D.js +121 -0
  22. package/dist/eiffel-yQhjl4T1.js +110 -0
  23. package/dist/elm-CNT9vbN0.js +108 -0
  24. package/dist/erlang-CFOYdy9e.js +487 -0
  25. package/dist/factor-Clf6BoVk.js +65 -0
  26. package/dist/fcl-CPC2WYrI.js +103 -0
  27. package/dist/forth-BmxRyE9S.js +60 -0
  28. package/dist/fortran-9bvPyrOW.js +442 -0
  29. package/dist/gas-cpmYfFX2.js +183 -0
  30. package/dist/gherkin-CJuwpceU.js +34 -0
  31. package/dist/groovy-DZeT_VM-.js +146 -0
  32. package/dist/haskell-CxiO_7JL.js +375 -0
  33. package/dist/haxe-70NVW1pR.js +359 -0
  34. package/dist/http-D9LttvKF.js +44 -0
  35. package/dist/idl-B6TRFYjl.js +947 -0
  36. package/dist/index-BMiCCEB1.js +309 -0
  37. package/dist/index-BNuasEBW.js +94 -0
  38. package/dist/index-Bg1KDWyt.js +290 -0
  39. package/dist/index-BuVm7ZG6.js +1305 -0
  40. package/dist/index-BvS1cnHq.js +613 -0
  41. package/dist/index-C44L0DmY.js +138 -0
  42. package/dist/index-C71CZfUx.js +247 -0
  43. package/dist/index-CQ6JWNwi.js +566 -0
  44. package/dist/index-CpRVx97-.js +342 -0
  45. package/dist/index-CqvQj6d-.js +270 -0
  46. package/dist/index-CrbQBmWq.js +157 -0
  47. package/dist/index-CzovO10m.js +302 -0
  48. package/dist/index-D0BZOY-S.js +101 -0
  49. package/dist/index-D0svJS59.js +555 -0
  50. package/dist/index-D93XVMi1.js +136 -0
  51. package/dist/index-DEB5VK0f.js +252 -0
  52. package/dist/index-DIaXGPFp.js +12936 -0
  53. package/dist/index-Dp8osI_J.js +960 -0
  54. package/dist/index-Ds4AioqO.js +1918 -0
  55. package/dist/index-Dy-OpkyQ.js +76 -0
  56. package/dist/index-Dyi9rNIT.js +391 -0
  57. package/dist/index-ZJkjD9tT.js +74 -0
  58. package/dist/index-qH2lMs0G.js +945 -0
  59. package/dist/index-srIksFxX.js +59 -0
  60. package/dist/index.d.ts +1 -0
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +19 -1
  63. package/dist/javascript-DOuB9oqA.js +691 -0
  64. package/dist/julia-DpvXAuO6.js +241 -0
  65. package/dist/languages.d.ts +18 -0
  66. package/dist/languages.d.ts.map +1 -0
  67. package/dist/livescript-CanGTf8u.js +272 -0
  68. package/dist/lua-XplVlWi_.js +217 -0
  69. package/dist/mathematica-jaRHnSxC.js +35 -0
  70. package/dist/mbox-BctzC1hL.js +76 -0
  71. package/dist/mirc-CFBPAOaF.js +72 -0
  72. package/dist/mllike-BSnXJBGA.js +272 -0
  73. package/dist/modelica-vUgVs--1.js +93 -0
  74. package/dist/mscgen-Cpl0NYLN.js +104 -0
  75. package/dist/mumps-CQoS1kWX.js +25 -0
  76. package/dist/nginx-zDPm3Z74.js +89 -0
  77. package/dist/nsis-BCLyjY7m.js +62 -0
  78. package/dist/ntriples-CsNjv2QF.js +79 -0
  79. package/dist/octave-C8PmmSRH.js +143 -0
  80. package/dist/oz-Ce8aN8oE.js +151 -0
  81. package/dist/pascal-De0D6mP7.js +77 -0
  82. package/dist/perl-B4bSCe1C.js +915 -0
  83. package/dist/pig-D24Z8EXi.js +54 -0
  84. package/dist/powershell-DkYVfTzP.js +249 -0
  85. package/dist/properties-Dn9wna3M.js +26 -0
  86. package/dist/protobuf-BPIjwpzm.js +49 -0
  87. package/dist/pug-TGXr6c5j.js +248 -0
  88. package/dist/puppet-nyd4dhjf.js +45 -0
  89. package/dist/python-BkR3uSy8.js +313 -0
  90. package/dist/q-DyHZGnqm.js +86 -0
  91. package/dist/r-LKEuhEGI.js +104 -0
  92. package/dist/rpm-IznJm2Xc.js +57 -0
  93. package/dist/ruby-CcYfvIk6.js +228 -0
  94. package/dist/sas-7E8yHoCW.js +105 -0
  95. package/dist/scheme-DjibxsNh.js +124 -0
  96. package/dist/shell-C0C2sNA_.js +182 -0
  97. package/dist/sieve-Bwz7vjP5.js +72 -0
  98. package/dist/simple-mode-mNVtnu0l.js +89 -0
  99. package/dist/smalltalk-Bhddl2pB.js +48 -0
  100. package/dist/solr-BNlsLglM.js +41 -0
  101. package/dist/sparql-FarWu_Gb.js +197 -0
  102. package/dist/spreadsheet-C-cy4P5N.js +49 -0
  103. package/dist/sql-CfG5lQ3l.js +282 -0
  104. package/dist/stex-Du4h4KAU.js +129 -0
  105. package/dist/stylus-CAdqWld3.js +250 -0
  106. package/dist/swift-DSxqR9R6.js +230 -0
  107. package/dist/tcl-xfoLljhY.js +81 -0
  108. package/dist/textile-D1AWE-pc.js +295 -0
  109. package/dist/tiddlywiki-5wqsXtSk.js +155 -0
  110. package/dist/tiki-__Kn3CeS.js +181 -0
  111. package/dist/toml-DWAmxCjl.js +58 -0
  112. package/dist/troff-D2UO-fKf.js +35 -0
  113. package/dist/ttcn-Bsa4sfRm.js +123 -0
  114. package/dist/ttcn-cfg-Bac_acMi.js +88 -0
  115. package/dist/turtle-xwJUxoPV.js +80 -0
  116. package/dist/vb-c2kQGd6-.js +74 -0
  117. package/dist/vbscript-1f_Dhg5H.js +324 -0
  118. package/dist/velocity-DJd0pTTC.js +96 -0
  119. package/dist/verilog-CiS1jyi5.js +262 -0
  120. package/dist/vhdl-T9HkrbI2.js +106 -0
  121. package/dist/webidl-CjfDENEo.js +155 -0
  122. package/dist/xquery-Ct6lEb4B.js +422 -0
  123. package/dist/yacas-C0absKBh.js +73 -0
  124. package/dist/z80-Pki2zAjW.js +61 -0
  125. package/package.json +14 -8
@@ -0,0 +1,106 @@
1
+ function f(e) {
2
+ for (var t = {}, n = e.split(","), r = 0; r < n.length; ++r) {
3
+ var i = n[r].toUpperCase(), l = n[r].charAt(0).toUpperCase() + n[r].slice(1);
4
+ t[n[r]] = !0, t[i] = !0, t[l] = !0;
5
+ }
6
+ return t;
7
+ }
8
+ function p(e) {
9
+ return e.eatWhile(/[\w\$_]/), "meta";
10
+ }
11
+ var k = f("null"), s = { "`": p, $: p }, g = !1, y = f("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"), v = f("architecture,entity,begin,case,port,else,elsif,end,for,function,if"), d = /[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/, o;
12
+ function c(e, t) {
13
+ var n = e.next();
14
+ if (s[n]) {
15
+ var r = s[n](e, t);
16
+ if (r !== !1) return r;
17
+ }
18
+ if (n == '"')
19
+ return t.tokenize = m(n), t.tokenize(e, t);
20
+ if (n == "'")
21
+ return t.tokenize = b(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 y.propertyIsEnumerable(i.toLowerCase()) ? (v.propertyIsEnumerable(i) && (o = "newstatement"), "keyword") : k.propertyIsEnumerable(i) ? "atom" : "variable";
33
+ }
34
+ function b(e) {
35
+ return function(t, n) {
36
+ for (var r = !1, i, l = !1; (i = t.next()) != null; ) {
37
+ if (i == e && !r) {
38
+ l = !0;
39
+ break;
40
+ }
41
+ r = !r && i == "--";
42
+ }
43
+ return (l || !(r || g)) && (n.tokenize = c), "string";
44
+ };
45
+ }
46
+ function m(e) {
47
+ return function(t, n) {
48
+ for (var r = !1, i, l = !1; (i = t.next()) != null; ) {
49
+ if (i == e && !r) {
50
+ l = !0;
51
+ break;
52
+ }
53
+ r = !r && i == "--";
54
+ }
55
+ return (l || !(r || g)) && (n.tokenize = c), "string.special";
56
+ };
57
+ }
58
+ function h(e, t, n, r, i) {
59
+ this.indented = e, this.column = t, this.type = n, this.align = r, this.prev = i;
60
+ }
61
+ function a(e, t, n) {
62
+ return e.context = new h(e.indented, t, n, null, e.context);
63
+ }
64
+ function u(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 w = {
69
+ name: "vhdl",
70
+ startState: function(e) {
71
+ return {
72
+ tokenize: null,
73
+ context: new h(-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 || c)(e, t);
83
+ if (r == "comment" || r == "meta") return r;
84
+ if (n.align == null && (n.align = !0), (o == ";" || o == ":") && n.type == "statement") u(t);
85
+ else if (o == "{") a(t, e.column(), "}");
86
+ else if (o == "[") a(t, e.column(), "]");
87
+ else if (o == "(") a(t, e.column(), ")");
88
+ else if (o == "}") {
89
+ for (; n.type == "statement"; ) n = u(t);
90
+ for (n.type == "}" && (n = u(t)); n.type == "statement"; ) n = u(t);
91
+ } else o == n.type ? u(t) : (n.type == "}" || n.type == "top" || n.type == "statement" && o == "newstatement") && a(t, e.column(), "statement");
92
+ return t.startOfLine = !1, r;
93
+ },
94
+ indent: function(e, t, n) {
95
+ if (e.tokenize != c && e.tokenize != null) return 0;
96
+ var r = t && t.charAt(0), i = e.context, l = r == i.type;
97
+ return i.type == "statement" ? i.indented + (r == "{" ? 0 : n.unit) : i.align ? i.column + (l ? 0 : 1) : i.indented + (l ? 0 : n.unit);
98
+ },
99
+ languageData: {
100
+ indentOnInput: /^\s*[{}]$/,
101
+ commentTokens: { line: "--" }
102
+ }
103
+ };
104
+ export {
105
+ w as vhdl
106
+ };
@@ -0,0 +1,155 @@
1
+ function a(e) {
2
+ return new RegExp("^((" + e.join(")|(") + "))\\b");
3
+ }
4
+ var l = [
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
+ ], u = a(l), o = [
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
+ ], m = a(o), c = [
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
+ ], s = a(c), f = [
96
+ "true",
97
+ "false",
98
+ // BooleanLiteral
99
+ "Infinity",
100
+ "NaN",
101
+ // FloatLiteral
102
+ "null"
103
+ // Rest of ConstValue
104
+ ], y = a(f), d = ["callback", "dictionary", "enum", "interface"], p = a(d), b = ["typedef"], v = a(b), A = /^[:<=>?]/, g = /^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/, h = /^-?(([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-]*/, D = /^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/, k = /^"[^"]*"/, E = /^\/\*.*?\*\//, C = /^\/\*.*/, w = /^.*?\*\//;
105
+ function N(e, r) {
106
+ if (e.eatSpace()) return null;
107
+ if (r.inComment)
108
+ return e.match(w) ? (r.inComment = !1, "comment") : (e.skipToEnd(), "comment");
109
+ if (e.match("//"))
110
+ return e.skipToEnd(), "comment";
111
+ if (e.match(E)) return "comment";
112
+ if (e.match(C))
113
+ return r.inComment = !0, "comment";
114
+ if (e.match(/^-?[0-9\.]/, !1) && (e.match(g) || e.match(h)))
115
+ return "number";
116
+ if (e.match(k)) return "string";
117
+ if (r.startDef && e.match(i)) return "def";
118
+ if (r.endDef && e.match(D))
119
+ return r.endDef = !1, "def";
120
+ if (e.match(s)) return "keyword";
121
+ if (e.match(m)) {
122
+ var t = r.lastToken, n = (e.match(/^\s*(.+?)\b/, !1) || [])[1];
123
+ return t === ":" || t === "implements" || n === "implements" || n === "=" ? "builtin" : "type";
124
+ }
125
+ return e.match(u) ? "builtin" : e.match(y) ? "atom" : e.match(i) ? "variable" : e.match(A) ? "operator" : (e.next(), null);
126
+ }
127
+ const S = {
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(e, r) {
142
+ var t = N(e, r);
143
+ if (t) {
144
+ var n = e.current();
145
+ r.lastToken = n, t === "keyword" ? (r.startDef = p.test(n), r.endDef = r.endDef || v.test(n)) : r.startDef = !1;
146
+ }
147
+ return t;
148
+ },
149
+ languageData: {
150
+ autocomplete: l.concat(o).concat(c).concat(f)
151
+ }
152
+ };
153
+ export {
154
+ S as webIDL
155
+ };
@@ -0,0 +1,422 @@
1
+ var d = (function() {
2
+ function e(w) {
3
+ return { type: w, style: "keyword" };
4
+ }
5
+ for (var n = e("operator"), t = { type: "atom", style: "atom" }, i = { type: "punctuation", style: null }, o = { type: "axis_specifier", style: "qualifier" }, l = {
6
+ ",": i
7
+ }, p = [
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
+ ], r = 0, a = p.length; r < a; r++)
178
+ l[p[r]] = e(p[r]);
179
+ for (var g = [
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
+ ], r = 0, a = g.length; r < a; r++)
237
+ l[g[r]] = t;
238
+ for (var f = ["eq", "ne", "lt", "le", "gt", "ge", ":=", "=", ">", ">=", "<", "<=", ".", "|", "?", "and", "or", "div", "idiv", "mod", "*", "/", "+", "-"], r = 0, a = f.length; r < a; r++)
239
+ l[f[r]] = n;
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
+ ], r = 0, a = v.length; r < a; r++)
254
+ l[v[r]] = o;
255
+ return l;
256
+ })();
257
+ function x(e, n, t) {
258
+ return n.tokenize = t, t(e, n);
259
+ }
260
+ function u(e, n) {
261
+ var t = e.next(), i = !1, o = _(e);
262
+ if (t == "<") {
263
+ if (e.match("!--", !0))
264
+ return x(e, n, N);
265
+ if (e.match("![CDATA", !1))
266
+ return n.tokenize = E, "tag";
267
+ if (e.match("?", !1))
268
+ return x(e, n, A);
269
+ var l = e.eat("/");
270
+ e.eatSpace();
271
+ for (var p = "", r; r = e.eat(/[^\s\u00a0=<>\"\'\/?]/); ) p += r;
272
+ return x(e, n, S(p, l));
273
+ } else {
274
+ if (t == "{")
275
+ return s(n, { type: "codeblock" }), null;
276
+ if (t == "}")
277
+ return c(n), null;
278
+ if (b(n))
279
+ return t == ">" ? "tag" : t == "/" && e.eat(">") ? (c(n), "tag") : "variable";
280
+ if (/\d/.test(t))
281
+ return e.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/), "atom";
282
+ if (t === "(" && e.eat(":"))
283
+ return s(n, { type: "comment" }), x(e, n, z);
284
+ if (!o && (t === '"' || t === "'"))
285
+ return m(e, n, t);
286
+ if (t === "$")
287
+ return x(e, n, T);
288
+ if (t === ":" && e.eat("="))
289
+ return "keyword";
290
+ if (t === "(")
291
+ return s(n, { type: "paren" }), null;
292
+ if (t === ")")
293
+ return c(n), null;
294
+ if (t === "[")
295
+ return s(n, { type: "bracket" }), null;
296
+ if (t === "]")
297
+ return c(n), null;
298
+ var a = d.propertyIsEnumerable(t) && d[t];
299
+ if (o && t === '"') for (; e.next() !== '"'; )
300
+ ;
301
+ if (o && t === "'") for (; e.next() !== "'"; )
302
+ ;
303
+ a || e.eatWhile(/[\w\$_-]/);
304
+ var g = e.eat(":");
305
+ !e.eat(":") && g && e.eatWhile(/[\w\$_-]/), e.match(/^[ \t]*\(/, !1) && (i = !0);
306
+ var f = e.current();
307
+ return a = d.propertyIsEnumerable(f) && d[f], i && !a && (a = { type: "function_call", style: "def" }), D(n) ? (c(n), "variable") : ((f == "element" || f == "attribute" || a.type == "axis_specifier") && s(n, { type: "xmlconstructor" }), a ? a.style : "variable");
308
+ }
309
+ }
310
+ function z(e, n) {
311
+ for (var t = !1, i = !1, o = 0, l; l = e.next(); ) {
312
+ if (l == ")" && t)
313
+ if (o > 0)
314
+ o--;
315
+ else {
316
+ c(n);
317
+ break;
318
+ }
319
+ else l == ":" && i && o++;
320
+ t = l == ":", i = l == "(";
321
+ }
322
+ return "comment";
323
+ }
324
+ function I(e, n) {
325
+ return function(t, i) {
326
+ for (var o; o = t.next(); )
327
+ if (o == e) {
328
+ c(i), n && (i.tokenize = n);
329
+ break;
330
+ } else if (t.match("{", !1) && h(i))
331
+ return s(i, { type: "codeblock" }), i.tokenize = u, "string";
332
+ return "string";
333
+ };
334
+ }
335
+ function m(e, n, t, i) {
336
+ let o = I(t, i);
337
+ return s(n, { type: "string", name: t, tokenize: o }), x(e, n, o);
338
+ }
339
+ function T(e, n) {
340
+ var t = /[\w\$_-]/;
341
+ if (e.eat('"')) {
342
+ for (; e.next() !== '"'; )
343
+ ;
344
+ e.eat(":");
345
+ } else
346
+ e.eatWhile(t), e.match(":=", !1) || e.eat(":");
347
+ return e.eatWhile(t), n.tokenize = u, "variable";
348
+ }
349
+ function S(e, n) {
350
+ return function(t, i) {
351
+ if (t.eatSpace(), n && t.eat(">"))
352
+ return c(i), i.tokenize = u, "tag";
353
+ if (t.eat("/") || s(i, { type: "tag", name: e, tokenize: u }), t.eat(">"))
354
+ i.tokenize = u;
355
+ else
356
+ return i.tokenize = y, "tag";
357
+ return "tag";
358
+ };
359
+ }
360
+ function y(e, n) {
361
+ var t = e.next();
362
+ return t == "/" && e.eat(">") ? (h(n) && c(n), b(n) && c(n), "tag") : t == ">" ? (h(n) && c(n), "tag") : t == "=" ? null : t == '"' || t == "'" ? m(e, n, t, y) : (h(n) || s(n, { type: "attribute", tokenize: y }), e.eat(/[a-zA-Z_:]/), e.eatWhile(/[-a-zA-Z0-9_:.]/), e.eatSpace(), (e.match(">", !1) || e.match("/", !1)) && (c(n), n.tokenize = u), "attribute");
363
+ }
364
+ function N(e, n) {
365
+ for (var t; t = e.next(); )
366
+ if (t == "-" && e.match("->", !0))
367
+ return n.tokenize = u, "comment";
368
+ }
369
+ function E(e, n) {
370
+ for (var t; t = e.next(); )
371
+ if (t == "]" && e.match("]", !0))
372
+ return n.tokenize = u, "comment";
373
+ }
374
+ function A(e, n) {
375
+ for (var t; t = e.next(); )
376
+ if (t == "?" && e.match(">", !0))
377
+ return n.tokenize = u, "processingInstruction";
378
+ }
379
+ function b(e) {
380
+ return k(e, "tag");
381
+ }
382
+ function h(e) {
383
+ return k(e, "attribute");
384
+ }
385
+ function D(e) {
386
+ return k(e, "xmlconstructor");
387
+ }
388
+ function _(e) {
389
+ return e.current() === '"' ? e.match(/^[^\"]+\"\:/, !1) : e.current() === "'" ? e.match(/^[^\"]+\'\:/, !1) : !1;
390
+ }
391
+ function k(e, n) {
392
+ return e.stack.length && e.stack[e.stack.length - 1].type == n;
393
+ }
394
+ function s(e, n) {
395
+ e.stack.push(n);
396
+ }
397
+ function c(e) {
398
+ e.stack.pop();
399
+ var n = e.stack.length && e.stack[e.stack.length - 1].tokenize;
400
+ e.tokenize = n || u;
401
+ }
402
+ const C = {
403
+ name: "xquery",
404
+ startState: function() {
405
+ return {
406
+ tokenize: u,
407
+ cc: [],
408
+ stack: []
409
+ };
410
+ },
411
+ token: function(e, n) {
412
+ if (e.eatSpace()) return null;
413
+ var t = n.tokenize(e, n);
414
+ return t;
415
+ },
416
+ languageData: {
417
+ commentTokens: { block: { open: "(:", close: ":)" } }
418
+ }
419
+ };
420
+ export {
421
+ C as xQuery
422
+ };