@aiao/code-editor 0.0.7 → 0.0.9

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-4oLq9F9B.js +945 -0
  37. package/dist/index-9NH8hlZ-.js +342 -0
  38. package/dist/index-BFXNCCbG.js +253 -0
  39. package/dist/index-BLHYcXXK.js +101 -0
  40. package/dist/index-BQU3Rb2C.js +290 -0
  41. package/dist/index-Bg18ePld.js +157 -0
  42. package/dist/index-Bp5lqnbN.js +555 -0
  43. package/dist/index-Bqzq8A1N.js +59 -0
  44. package/dist/index-Bx-s4g99.js +76 -0
  45. package/dist/index-BxX25QmV.js +248 -0
  46. package/dist/index-CFCzgc33.js +1918 -0
  47. package/dist/index-CL7JTU9M.js +136 -0
  48. package/dist/index-CZGsg2Zk.js +12945 -0
  49. package/dist/index-CipmEceX.js +74 -0
  50. package/dist/index-Cv4vvpa2.js +1305 -0
  51. package/dist/index-D4hhdPbZ.js +6153 -0
  52. package/dist/index-DhNQ8g9I.js +270 -0
  53. package/dist/index-Djp53tAP.js +94 -0
  54. package/dist/index-KlsAFhIj.js +566 -0
  55. package/dist/index-OntZqtu6.js +309 -0
  56. package/dist/index-PGnZjMCR.js +302 -0
  57. package/dist/index-TyYoYgss.js +613 -0
  58. package/dist/index-oMSPmlXA.js +960 -0
  59. package/dist/index-rQC6Gbk0.js +138 -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 +16 -7
@@ -0,0 +1,68 @@
1
+ var l = function(n) {
2
+ return new RegExp("^(?:" + n.join("|") + ")$", "i");
3
+ }, p = function(n) {
4
+ i = null;
5
+ var e = n.next();
6
+ if (e === '"')
7
+ return n.match(/^.*?"/), "string";
8
+ if (e === "'")
9
+ return n.match(/^.*?'/), "string";
10
+ if (/[{}\(\),\.;\[\]]/.test(e))
11
+ return i = e, "punctuation";
12
+ if (e === "/" && n.eat("/"))
13
+ return n.skipToEnd(), "comment";
14
+ if (u.test(e))
15
+ return n.eatWhile(u), null;
16
+ if (n.eatWhile(/[_\w\d]/), n.eat(":"))
17
+ return n.eatWhile(/[\w\d_\-]/), "atom";
18
+ var t = n.current();
19
+ return d.test(t) ? "builtin" : f.test(t) ? "def" : h.test(t) || x.test(t) ? "keyword" : "variable";
20
+ }, o = function(n, e, t) {
21
+ return n.context = {
22
+ prev: n.context,
23
+ indent: n.indent,
24
+ col: t,
25
+ type: e
26
+ };
27
+ }, c = function(n) {
28
+ return n.indent = n.context.indent, n.context = n.context.prev;
29
+ }, i, d = l(["abs", "acos", "allShortestPaths", "asin", "atan", "atan2", "avg", "ceil", "coalesce", "collect", "cos", "cot", "count", "degrees", "e", "endnode", "exp", "extract", "filter", "floor", "haversin", "head", "id", "keys", "labels", "last", "left", "length", "log", "log10", "lower", "ltrim", "max", "min", "node", "nodes", "percentileCont", "percentileDisc", "pi", "radians", "rand", "range", "reduce", "rel", "relationship", "relationships", "replace", "reverse", "right", "round", "rtrim", "shortestPath", "sign", "sin", "size", "split", "sqrt", "startnode", "stdev", "stdevp", "str", "substring", "sum", "tail", "tan", "timestamp", "toFloat", "toInt", "toString", "trim", "type", "upper"]), f = l(["all", "and", "any", "contains", "exists", "has", "in", "none", "not", "or", "single", "xor"]), h = l(["as", "asc", "ascending", "assert", "by", "case", "commit", "constraint", "create", "csv", "cypher", "delete", "desc", "descending", "detach", "distinct", "drop", "else", "end", "ends", "explain", "false", "fieldterminator", "foreach", "from", "headers", "in", "index", "is", "join", "limit", "load", "match", "merge", "null", "on", "optional", "order", "periodic", "profile", "remove", "return", "scan", "set", "skip", "start", "starts", "then", "true", "union", "unique", "unwind", "using", "when", "where", "with", "call", "yield"]), x = l(["access", "active", "assign", "all", "alter", "as", "catalog", "change", "copy", "create", "constraint", "constraints", "current", "database", "databases", "dbms", "default", "deny", "drop", "element", "elements", "exists", "from", "grant", "graph", "graphs", "if", "index", "indexes", "label", "labels", "management", "match", "name", "names", "new", "node", "nodes", "not", "of", "on", "or", "password", "populated", "privileges", "property", "read", "relationship", "relationships", "remove", "replace", "required", "revoke", "role", "roles", "set", "show", "start", "status", "stop", "suspended", "to", "traverse", "type", "types", "user", "users", "with", "write"]), u = /[*+\-<>=&|~%^]/;
30
+ const g = {
31
+ name: "cypher",
32
+ startState: function() {
33
+ return {
34
+ tokenize: p,
35
+ context: null,
36
+ indent: 0,
37
+ col: 0
38
+ };
39
+ },
40
+ token: function(n, e) {
41
+ if (n.sol() && (e.context && e.context.align == null && (e.context.align = !1), e.indent = n.indentation()), n.eatSpace())
42
+ return null;
43
+ var t = e.tokenize(n, e);
44
+ if (t !== "comment" && e.context && e.context.align == null && e.context.type !== "pattern" && (e.context.align = !0), i === "(")
45
+ o(e, ")", n.column());
46
+ else if (i === "[")
47
+ o(e, "]", n.column());
48
+ else if (i === "{")
49
+ o(e, "}", n.column());
50
+ else if (/[\]\}\)]/.test(i)) {
51
+ for (; e.context && e.context.type === "pattern"; )
52
+ c(e);
53
+ e.context && i === e.context.type && c(e);
54
+ } else i === "." && e.context && e.context.type === "pattern" ? c(e) : /atom|string|variable/.test(t) && e.context && (/[\}\]]/.test(e.context.type) ? o(e, "pattern", n.column()) : e.context.type === "pattern" && !e.context.align && (e.context.align = !0, e.context.col = n.column()));
55
+ return t;
56
+ },
57
+ indent: function(n, e, t) {
58
+ var a = e && e.charAt(0), r = n.context;
59
+ if (/[\]\}]/.test(a))
60
+ for (; r && r.type === "pattern"; )
61
+ r = r.prev;
62
+ var s = r && a === r.type;
63
+ return r ? r.type === "keywords" ? null : r.align ? r.col + (s ? 0 : 1) : r.indent + (s ? 0 : t.unit) : 0;
64
+ }
65
+ };
66
+ export {
67
+ g as cypher
68
+ };
@@ -0,0 +1,127 @@
1
+ function c(e) {
2
+ for (var n = {}, t = e.split(" "), i = 0; i < t.length; ++i) n[t[i]] = !0;
3
+ return n;
4
+ }
5
+ var s = "body catch class do else enum for foreach foreach_reverse if in interface mixin out scope struct switch try union unittest version while with";
6
+ const l = {
7
+ keywords: c("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue debug default delegate delete deprecated export extern final finally function goto immutable import inout invariant is lazy macro module new nothrow override package pragma private protected public pure ref return shared short static super synchronized template this throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters " + s),
8
+ blockKeywords: c(s),
9
+ builtin: c("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte ucent uint ulong ushort wchar wstring void size_t sizediff_t"),
10
+ atoms: c("exit failure success true false null"),
11
+ hooks: {
12
+ "@": function(e, n) {
13
+ return e.eatWhile(/[\w\$_]/), "meta";
14
+ }
15
+ }
16
+ };
17
+ var w = l.statementIndentUnit, v = l.keywords, x = l.builtin, d = l.blockKeywords, g = l.atoms, p = l.hooks, _ = l.multiLineStrings, h = /[+\-*&%=<>!?|\/]/, o;
18
+ function m(e, n) {
19
+ var t = e.next();
20
+ if (p[t]) {
21
+ var i = p[t](e, n);
22
+ if (i !== !1) return i;
23
+ }
24
+ if (t == '"' || t == "'" || t == "`")
25
+ return n.tokenize = z(t), n.tokenize(e, n);
26
+ if (/[\[\]{}\(\),;\:\.]/.test(t))
27
+ return o = t, null;
28
+ if (/\d/.test(t))
29
+ return e.eatWhile(/[\w\.]/), "number";
30
+ if (t == "/") {
31
+ if (e.eat("+"))
32
+ return n.tokenize = k, k(e, n);
33
+ if (e.eat("*"))
34
+ return n.tokenize = y, y(e, n);
35
+ if (e.eat("/"))
36
+ return e.skipToEnd(), "comment";
37
+ }
38
+ if (h.test(t))
39
+ return e.eatWhile(h), "operator";
40
+ e.eatWhile(/[\w\$_\xa1-\uffff]/);
41
+ var r = e.current();
42
+ return v.propertyIsEnumerable(r) ? (d.propertyIsEnumerable(r) && (o = "newstatement"), "keyword") : x.propertyIsEnumerable(r) ? (d.propertyIsEnumerable(r) && (o = "newstatement"), "builtin") : g.propertyIsEnumerable(r) ? "atom" : "variable";
43
+ }
44
+ function z(e) {
45
+ return function(n, t) {
46
+ for (var i = !1, r, u = !1; (r = n.next()) != null; ) {
47
+ if (r == e && !i) {
48
+ u = !0;
49
+ break;
50
+ }
51
+ i = !i && r == "\\";
52
+ }
53
+ return (u || !(i || _)) && (t.tokenize = null), "string";
54
+ };
55
+ }
56
+ function y(e, n) {
57
+ for (var t = !1, i; i = e.next(); ) {
58
+ if (i == "/" && t) {
59
+ n.tokenize = null;
60
+ break;
61
+ }
62
+ t = i == "*";
63
+ }
64
+ return "comment";
65
+ }
66
+ function k(e, n) {
67
+ for (var t = !1, i; i = e.next(); ) {
68
+ if (i == "/" && t) {
69
+ n.tokenize = null;
70
+ break;
71
+ }
72
+ t = i == "+";
73
+ }
74
+ return "comment";
75
+ }
76
+ function b(e, n, t, i, r) {
77
+ this.indented = e, this.column = n, this.type = t, this.align = i, this.prev = r;
78
+ }
79
+ function f(e, n, t) {
80
+ var i = e.indented;
81
+ return e.context && e.context.type == "statement" && (i = e.context.indented), e.context = new b(i, n, t, null, e.context);
82
+ }
83
+ function a(e) {
84
+ var n = e.context.type;
85
+ return (n == ")" || n == "]" || n == "}") && (e.indented = e.context.indented), e.context = e.context.prev;
86
+ }
87
+ const E = {
88
+ name: "d",
89
+ startState: function(e) {
90
+ return {
91
+ tokenize: null,
92
+ context: new b(-e, 0, "top", !1),
93
+ indented: 0,
94
+ startOfLine: !0
95
+ };
96
+ },
97
+ token: function(e, n) {
98
+ var t = n.context;
99
+ if (e.sol() && (t.align == null && (t.align = !1), n.indented = e.indentation(), n.startOfLine = !0), e.eatSpace()) return null;
100
+ o = null;
101
+ var i = (n.tokenize || m)(e, n);
102
+ if (i == "comment" || i == "meta") return i;
103
+ if (t.align == null && (t.align = !0), (o == ";" || o == ":" || o == ",") && t.type == "statement") a(n);
104
+ else if (o == "{") f(n, e.column(), "}");
105
+ else if (o == "[") f(n, e.column(), "]");
106
+ else if (o == "(") f(n, e.column(), ")");
107
+ else if (o == "}") {
108
+ for (; t.type == "statement"; ) t = a(n);
109
+ for (t.type == "}" && (t = a(n)); t.type == "statement"; ) t = a(n);
110
+ } else o == t.type ? a(n) : ((t.type == "}" || t.type == "top") && o != ";" || t.type == "statement" && o == "newstatement") && f(n, e.column(), "statement");
111
+ return n.startOfLine = !1, i;
112
+ },
113
+ indent: function(e, n, t) {
114
+ if (e.tokenize != m && e.tokenize != null) return null;
115
+ var i = e.context, r = n && n.charAt(0);
116
+ i.type == "statement" && r == "}" && (i = i.prev);
117
+ var u = r == i.type;
118
+ return i.type == "statement" ? i.indented + (r == "{" ? 0 : w || t.unit) : i.align ? i.column + (u ? 0 : 1) : i.indented + (u ? 0 : t.unit);
119
+ },
120
+ languageData: {
121
+ indentOnInput: /^\s*[{}]$/,
122
+ commentTokens: { line: "//", block: { open: "/*", close: "*/" } }
123
+ }
124
+ };
125
+ export {
126
+ E as d
127
+ };
@@ -0,0 +1,18 @@
1
+ var o = {
2
+ "+": "inserted",
3
+ "-": "deleted",
4
+ "@": "meta"
5
+ };
6
+ const r = {
7
+ name: "diff",
8
+ token: function(n) {
9
+ var e = n.string.search(/[\t ]+?$/);
10
+ if (!n.sol() || e === 0)
11
+ return n.skipToEnd(), ("error " + (o[n.string.charAt(0)] || "")).replace(/ $/, "");
12
+ var i = o[n.peek()] || n.skipToEnd();
13
+ return e === -1 ? n.skipToEnd() : n.pos = e, i;
14
+ }
15
+ };
16
+ export {
17
+ r as diff
18
+ };
@@ -0,0 +1,194 @@
1
+ import { s as o } from "./simple-mode-mNVtnu0l.js";
2
+ var e = "from", s = new RegExp("^(\\s*)\\b(" + e + ")\\b", "i"), n = ["run", "cmd", "entrypoint", "shell"], l = new RegExp("^(\\s*)(" + n.join("|") + ")(\\s+\\[)", "i"), t = "expose", x = new RegExp("^(\\s*)(" + t + ")(\\s+)", "i"), g = [
3
+ "arg",
4
+ "from",
5
+ "maintainer",
6
+ "label",
7
+ "env",
8
+ "add",
9
+ "copy",
10
+ "volume",
11
+ "user",
12
+ "workdir",
13
+ "onbuild",
14
+ "stopsignal",
15
+ "healthcheck",
16
+ "shell"
17
+ ], u = [e, t].concat(n).concat(g), r = "(" + u.join("|") + ")", a = new RegExp("^(\\s*)" + r + "(\\s*)(#.*)?$", "i"), k = new RegExp("^(\\s*)" + r + "(\\s+)", "i");
18
+ const m = o({
19
+ start: [
20
+ // Block comment: This is a line starting with a comment
21
+ {
22
+ regex: /^\s*#.*$/,
23
+ sol: !0,
24
+ token: "comment"
25
+ },
26
+ {
27
+ regex: s,
28
+ token: [null, "keyword"],
29
+ sol: !0,
30
+ next: "from"
31
+ },
32
+ // Highlight an instruction without any arguments (for convenience)
33
+ {
34
+ regex: a,
35
+ token: [null, "keyword", null, "error"],
36
+ sol: !0
37
+ },
38
+ {
39
+ regex: l,
40
+ token: [null, "keyword", null],
41
+ sol: !0,
42
+ next: "array"
43
+ },
44
+ {
45
+ regex: x,
46
+ token: [null, "keyword", null],
47
+ sol: !0,
48
+ next: "expose"
49
+ },
50
+ // Highlight an instruction followed by arguments
51
+ {
52
+ regex: k,
53
+ token: [null, "keyword", null],
54
+ sol: !0,
55
+ next: "arguments"
56
+ },
57
+ {
58
+ regex: /./,
59
+ token: null
60
+ }
61
+ ],
62
+ from: [
63
+ {
64
+ regex: /\s*$/,
65
+ token: null,
66
+ next: "start"
67
+ },
68
+ {
69
+ // Line comment without instruction arguments is an error
70
+ regex: /(\s*)(#.*)$/,
71
+ token: [null, "error"],
72
+ next: "start"
73
+ },
74
+ {
75
+ regex: /(\s*\S+\s+)(as)/i,
76
+ token: [null, "keyword"],
77
+ next: "start"
78
+ },
79
+ // Fail safe return to start
80
+ {
81
+ token: null,
82
+ next: "start"
83
+ }
84
+ ],
85
+ single: [
86
+ {
87
+ regex: /(?:[^\\']|\\.)/,
88
+ token: "string"
89
+ },
90
+ {
91
+ regex: /'/,
92
+ token: "string",
93
+ pop: !0
94
+ }
95
+ ],
96
+ double: [
97
+ {
98
+ regex: /(?:[^\\"]|\\.)/,
99
+ token: "string"
100
+ },
101
+ {
102
+ regex: /"/,
103
+ token: "string",
104
+ pop: !0
105
+ }
106
+ ],
107
+ array: [
108
+ {
109
+ regex: /\]/,
110
+ token: null,
111
+ next: "start"
112
+ },
113
+ {
114
+ regex: /"(?:[^\\"]|\\.)*"?/,
115
+ token: "string"
116
+ }
117
+ ],
118
+ expose: [
119
+ {
120
+ regex: /\d+$/,
121
+ token: "number",
122
+ next: "start"
123
+ },
124
+ {
125
+ regex: /[^\d]+$/,
126
+ token: null,
127
+ next: "start"
128
+ },
129
+ {
130
+ regex: /\d+/,
131
+ token: "number"
132
+ },
133
+ {
134
+ regex: /[^\d]+/,
135
+ token: null
136
+ },
137
+ // Fail safe return to start
138
+ {
139
+ token: null,
140
+ next: "start"
141
+ }
142
+ ],
143
+ arguments: [
144
+ {
145
+ regex: /^\s*#.*$/,
146
+ sol: !0,
147
+ token: "comment"
148
+ },
149
+ {
150
+ regex: /"(?:[^\\"]|\\.)*"?$/,
151
+ token: "string",
152
+ next: "start"
153
+ },
154
+ {
155
+ regex: /"/,
156
+ token: "string",
157
+ push: "double"
158
+ },
159
+ {
160
+ regex: /'(?:[^\\']|\\.)*'?$/,
161
+ token: "string",
162
+ next: "start"
163
+ },
164
+ {
165
+ regex: /'/,
166
+ token: "string",
167
+ push: "single"
168
+ },
169
+ {
170
+ regex: /[^#"']+[\\`]$/,
171
+ token: null
172
+ },
173
+ {
174
+ regex: /[^#"']+$/,
175
+ token: null,
176
+ next: "start"
177
+ },
178
+ {
179
+ regex: /[^#"']+/,
180
+ token: null
181
+ },
182
+ // Fail safe return to start
183
+ {
184
+ token: null,
185
+ next: "start"
186
+ }
187
+ ],
188
+ languageData: {
189
+ commentTokens: { line: "#" }
190
+ }
191
+ });
192
+ export {
193
+ m as dockerFile
194
+ };
@@ -0,0 +1,84 @@
1
+ var u;
2
+ function r(e, n) {
3
+ return u = n, e;
4
+ }
5
+ function t(e, n) {
6
+ var l = e.next();
7
+ if (l == "<" && e.eat("!")) {
8
+ if (e.eatWhile(/[\-]/))
9
+ return n.tokenize = o, o(e, n);
10
+ if (e.eatWhile(/[\w]/)) return r("keyword", "doindent");
11
+ } else {
12
+ if (l == "<" && e.eat("?"))
13
+ return n.tokenize = a("meta", "?>"), r("meta", l);
14
+ if (l == "#" && e.eatWhile(/[\w]/)) return r("atom", "tag");
15
+ if (l == "|") return r("keyword", "separator");
16
+ if (l.match(/[\(\)\[\]\-\.,\+\?>]/)) return r(null, l);
17
+ if (l.match(/[\[\]]/)) return r("rule", l);
18
+ if (l == '"' || l == "'")
19
+ return n.tokenize = k(l), n.tokenize(e, n);
20
+ if (e.eatWhile(/[a-zA-Z\?\+\d]/)) {
21
+ var i = e.current();
22
+ return i.substr(i.length - 1, i.length).match(/\?|\+/) !== null && e.backUp(1), r("tag", "tag");
23
+ } else return l == "%" || l == "*" ? r("number", "number") : (e.eatWhile(/[\w\\\-_%.{,]/), r(null, null));
24
+ }
25
+ }
26
+ function o(e, n) {
27
+ for (var l = 0, i; (i = e.next()) != null; ) {
28
+ if (l >= 2 && i == ">") {
29
+ n.tokenize = t;
30
+ break;
31
+ }
32
+ l = i == "-" ? l + 1 : 0;
33
+ }
34
+ return r("comment", "comment");
35
+ }
36
+ function k(e) {
37
+ return function(n, l) {
38
+ for (var i = !1, c; (c = n.next()) != null; ) {
39
+ if (c == e && !i) {
40
+ l.tokenize = t;
41
+ break;
42
+ }
43
+ i = !i && c == "\\";
44
+ }
45
+ return r("string", "tag");
46
+ };
47
+ }
48
+ function a(e, n) {
49
+ return function(l, i) {
50
+ for (; !l.eol(); ) {
51
+ if (l.match(n)) {
52
+ i.tokenize = t;
53
+ break;
54
+ }
55
+ l.next();
56
+ }
57
+ return e;
58
+ };
59
+ }
60
+ const f = {
61
+ name: "dtd",
62
+ startState: function() {
63
+ return {
64
+ tokenize: t,
65
+ baseIndent: 0,
66
+ stack: []
67
+ };
68
+ },
69
+ token: function(e, n) {
70
+ if (e.eatSpace()) return null;
71
+ var l = n.tokenize(e, n), i = n.stack[n.stack.length - 1];
72
+ return e.current() == "[" || u === "doindent" || u == "[" ? n.stack.push("rule") : u === "endtag" ? n.stack[n.stack.length - 1] = "endtag" : e.current() == "]" || u == "]" || u == ">" && i == "rule" ? n.stack.pop() : u == "[" && n.stack.push("["), l;
73
+ },
74
+ indent: function(e, n, l) {
75
+ var i = e.stack.length;
76
+ return n.charAt(0) === "]" ? i-- : n.substr(n.length - 1, n.length) === ">" && (n.substr(0, 1) === "<" || u == "doindent" && n.length > 1 || (u == "doindent" ? i-- : u == ">" && n.length > 1 || u == "tag" && n !== ">" || (u == "tag" && e.stack[e.stack.length - 1] == "rule" ? i-- : u == "tag" ? i++ : n === ">" && e.stack[e.stack.length - 1] == "rule" && u === ">" ? i-- : n === ">" && e.stack[e.stack.length - 1] == "rule" || (n.substr(0, 1) !== "<" && n.substr(0, 1) === ">" ? i = i - 1 : n === ">" || (i = i - 1)))), (u == null || u == "]") && i--), e.baseIndent + i * l.unit;
77
+ },
78
+ languageData: {
79
+ indentOnInput: /^\s*[\]>]$/
80
+ }
81
+ };
82
+ export {
83
+ f as dtd
84
+ };