@aiderdesk/aiderdesk 0.61.0-dev → 0.61.0
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.
- package/out/renderer/assets/__vite-browser-external-2447137e-DYxpcVy9.js +4 -0
- package/out/renderer/assets/{_baseUniq-Z8t1Ab1g.js → _baseUniq-BPF2Herp.js} +21 -197
- package/out/renderer/assets/{arc-CwESpVYE.js → arc-DfPLteHF.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-2XIMDMQ5-C490EQr5.js → architectureDiagram-Q4EWVU46-Bw0u-sSH.js} +34 -20
- package/out/renderer/assets/{blockDiagram-WCTKOSBZ-DbHssxrQ.js → blockDiagram-DXYQGD6D-CkfB9if8.js} +21 -8
- package/out/renderer/assets/{c4Diagram-IC4MRINW-BxE3GUKu.js → c4Diagram-AHTNJAMY-DweK9Liz.js} +31 -35
- package/out/renderer/assets/{channel-C9hJq_Xr.js → channel-C5wwrRof.js} +1 -1
- package/out/renderer/assets/{chunk-4BX2VUAB-ChcKNpL6.js → chunk-4BX2VUAB-0KM14cFd.js} +1 -1
- package/out/renderer/assets/{chunk-WL4C6EOR-vhby2fZi.js → chunk-4TB4RGXK-CmVtCVL4.js} +121 -82
- package/out/renderer/assets/{chunk-55IACEB6-oLT9lXTt.js → chunk-55IACEB6-BzVYZvBM.js} +1 -1
- package/out/renderer/assets/{chunk-KX2RTZJC-D32tV7H-.js → chunk-EDXVE4YY-BryQl5Kv.js} +1 -1
- package/out/renderer/assets/{chunk-FMBD7UC4-B5k8rETe.js → chunk-FMBD7UC4-CRiLea_e.js} +1 -1
- package/out/renderer/assets/{chunk-NQ4KR5QH-Bmqo2FpL.js → chunk-OYMX7WX6-Cpi4N3NO.js} +32 -15
- package/out/renderer/assets/{chunk-QZHKN3VN-8BpGifjS.js → chunk-QZHKN3VN-BT8kABWC.js} +1 -1
- package/out/renderer/assets/{chunk-JSJVCQXG-DtjSx6Cj.js → chunk-YZCP3GAM-OLZV_Sef.js} +1 -1
- package/out/renderer/assets/{classDiagram-VBA2DB6C-BxRSSb9e.js → classDiagram-6PBFFD2Q-VdE6G90i.js} +6 -6
- package/out/renderer/assets/{classDiagram-v2-RAHNMMFH-BxRSSb9e.js → classDiagram-v2-HSJHXN6E-VdE6G90i.js} +6 -6
- package/out/renderer/assets/{clone-D9a-uIZa.js → clone-DwQZ86nS.js} +1 -1
- package/out/renderer/assets/{cose-bilkent-S5V4N54A-CUqqQ-6R.js → cose-bilkent-S5V4N54A-BEcAKM9H.js} +1 -1
- package/out/renderer/assets/{dagre-KLK3FWXG-ORIwMMhq.js → dagre-KV5264BT-BcFQYL1M.js} +6 -6
- package/out/renderer/assets/diagram-5BDNPKRD-GrUNdC1u.js +171 -0
- package/out/renderer/assets/{diagram-E7M64L7V-bS9HcoDQ.js → diagram-G4DWMVQ6-CG4S-ov5.js} +15 -13
- package/out/renderer/assets/{diagram-IFDJBPK2-BRlTIR0J.js → diagram-MMDJMWI5-9ogY3MRC.js} +5 -6
- package/out/renderer/assets/{diagram-P4PSJMXO-jsjGwH-p.js → diagram-TYMM5635-Ck7mI1bS.js} +5 -6
- package/out/renderer/assets/{erDiagram-INFDFZHY-DGlgjHOQ.js → erDiagram-SMLLAGMA-Dvf_c-7M.js} +81 -35
- package/out/renderer/assets/{flowDiagram-PKNHOUZH-CzLC87bM.js → flowDiagram-DWJPFMVM-CPDjOXYp.js} +27 -45
- package/out/renderer/assets/{ganttDiagram-A5KZAMGK-BbDv36wT.js → ganttDiagram-T4ZO3ILL-B4dJrK-3.js} +17 -8
- package/out/renderer/assets/{gitGraphDiagram-K3NZZRJ6-CBQnBjEi.js → gitGraphDiagram-UUTBAWPF-De2eCfMN.js} +244 -67
- package/out/renderer/assets/{graph-Dl5N6maZ.js → graph-BFn23kR_.js} +175 -3
- package/out/renderer/assets/{index-MDHavDF9.js → index-BL-57WPa.js} +15877 -20787
- package/out/renderer/assets/{index-CDCy_DhA.css → index-BkntVzTm.css} +114 -301
- package/out/renderer/assets/{infoDiagram-LFFYTUFH-GtEDBEmz.js → infoDiagram-42DDH7IO-BIt9B6mQ.js} +5 -6
- package/out/renderer/assets/{ishikawaDiagram-PHBUUO56-Uj90gr3I.js → ishikawaDiagram-UXIWVN3A-CXZs0KGV.js} +3 -3
- package/out/renderer/assets/{journeyDiagram-4ABVD52K-DekFuOwS.js → journeyDiagram-VCZTEJTY-B-EXuj5b.js} +14 -13
- package/out/renderer/assets/{kanban-definition-K7BYSVSG-Hfz2L6NS.js → kanban-definition-6JOO6SKY-ByvN0qaD.js} +5 -2
- package/out/renderer/assets/{layout-B9K2VT39.js → layout-BpybWUv6.js} +117 -4
- package/out/renderer/assets/min-DB8ixvoT.js +41 -0
- package/out/renderer/assets/{mindmap-definition-YRQLILUH-DDcS7_GH.js → mindmap-definition-QFDTVHPH-Do-I-At8.js} +69 -13
- package/out/renderer/assets/{pieDiagram-SKSYHLDU-DwjEcJ0Q.js → pieDiagram-DEJITSTG-Cnpf6Gt6.js} +20 -13
- package/out/renderer/assets/{quadrantDiagram-337W2JSQ-CpGqN7vo.js → quadrantDiagram-34T5L4WZ-VcOb1qLd.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-Z7DCOOCP-qDRUf1ip.js → requirementDiagram-MS252O5E-VJs9Hpaw.js} +42 -11
- package/out/renderer/assets/{sankeyDiagram-WA2Y5GQK-DRKS8C1H.js → sankeyDiagram-XADWPNL6-BoXxgLvi.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-2WXFIKYE-DhVN2ug2.js → sequenceDiagram-FGHM5R23-b69hQjSp.js} +446 -220
- package/out/renderer/assets/{stateDiagram-RAJIS63D-BpP4eSqu.js → stateDiagram-FHFEXIEX-BK7E-REm.js} +10 -9
- package/out/renderer/assets/{stateDiagram-v2-FVOUBMTO-B_qQJqra.js → stateDiagram-v2-QKLJ7IA2-Cd2wfCQu.js} +4 -4
- package/out/renderer/assets/{timeline-definition-YZTLITO2-UoWXE_76.js → timeline-definition-GMOUNBTQ-Bl-MTfK5.js} +445 -71
- package/out/renderer/assets/{vennDiagram-LZ73GAT5-Dp1FZ609.js → vennDiagram-DHZGUBPP-DNmr1k2L.js} +1 -1
- package/out/renderer/assets/{treemap-KZPCXAKY-W2a2L6ff.js → wardley-RL74JXVD-DTbxPMj9.js} +1474 -977
- package/out/renderer/assets/wardleyDiagram-NUSXRM2D-BWw08wtD.js +901 -0
- package/out/renderer/assets/{xychartDiagram-JWTSCODW-CTzYHTbD.js → xychartDiagram-5P7HB3ND-EEYPnLDT.js} +20 -4
- package/out/renderer/index.html +3 -3
- package/out/renderer/progress.html +212 -62
- package/out/resources/mcp-server/aider-desk-mcp-server.js +642 -402
- package/out/runner.js +976 -386
- package/package.json +2 -3
- package/out/renderer/assets/_basePickBy-BWoXHZ8Z.js +0 -161
- package/out/renderer/assets/apl-fqmucPXA.js +0 -140
- package/out/renderer/assets/asciiarmor-DucZyvP0.js +0 -56
- package/out/renderer/assets/asn1-BnOEsgAm.js +0 -144
- package/out/renderer/assets/asterisk-QAlztEwS.js +0 -345
- package/out/renderer/assets/brainfuck-DZVCuF_t.js +0 -53
- package/out/renderer/assets/clike-xqXYL6ge.js +0 -805
- package/out/renderer/assets/clojure-BhXMqnxz.js +0 -849
- package/out/renderer/assets/cmake-BGaNd9E7.js +0 -71
- package/out/renderer/assets/cobol-4yqQntpt.js +0 -120
- package/out/renderer/assets/coffeescript-D2dXvhEc.js +0 -308
- package/out/renderer/assets/commonlisp-CF_VNHQR.js +0 -130
- package/out/renderer/assets/crystal-DyuLTqLs.js +0 -398
- package/out/renderer/assets/css-c-jst79C.js +0 -1783
- package/out/renderer/assets/cypher-Dlu_3r4V.js +0 -121
- package/out/renderer/assets/d-UURgV0Ux.js +0 -179
- package/out/renderer/assets/diff-B_Bi2Crb.js +0 -25
- package/out/renderer/assets/dockerfile-Bvk733Ga.js +0 -201
- package/out/renderer/assets/dtd-Dy74G54E.js +0 -114
- package/out/renderer/assets/dylan-TSb-Nfix.js +0 -314
- package/out/renderer/assets/ebnf-4fKAGW3a.js +0 -140
- package/out/renderer/assets/ecl-B59qGGVg.js +0 -178
- package/out/renderer/assets/eiffel-Dze7nlu3.js +0 -134
- package/out/renderer/assets/elm-DG7jkhNZ.js +0 -176
- package/out/renderer/assets/erlang-BO6gOnGA.js +0 -674
- package/out/renderer/assets/factor-CMxFHDqz.js +0 -65
- package/out/renderer/assets/fcl-CDDUNjTj.js +0 -141
- package/out/renderer/assets/forth-B9D2JCeE.js +0 -116
- package/out/renderer/assets/fortran-CAG2BFbe.js +0 -467
- package/out/renderer/assets/gas-d3KEcW3x.js +0 -294
- package/out/renderer/assets/gherkin-DhZlEZiy.js +0 -115
- package/out/renderer/assets/groovy-CpwJiBl7.js +0 -223
- package/out/renderer/assets/haskell-ySd-OUo8.js +0 -459
- package/out/renderer/assets/haxe-7MlzfeYV.js +0 -514
- package/out/renderer/assets/http-BqypyemW.js +0 -79
- package/out/renderer/assets/idl-4HIGJlDI.js +0 -985
- package/out/renderer/assets/index-6qedlt0q.js +0 -689
- package/out/renderer/assets/index-86jDpUJn.js +0 -385
- package/out/renderer/assets/index-BRjO8ber.js +0 -332
- package/out/renderer/assets/index-BVgw7j0d.js +0 -312
- package/out/renderer/assets/index-BhkyI1q3.js +0 -642
- package/out/renderer/assets/index-BqrmLPkg.js +0 -82
- package/out/renderer/assets/index-BuPbw4xM.js +0 -178
- package/out/renderer/assets/index-CTO-LPBg.js +0 -311
- package/out/renderer/assets/index-CTO4SzlI.js +0 -97
- package/out/renderer/assets/index-CZ9IQK_0.js +0 -2488
- package/out/renderer/assets/index-CZxsVxBZ.js +0 -1765
- package/out/renderer/assets/index-DIXV-3Xn.js +0 -406
- package/out/renderer/assets/index-DNzOtZX5.js +0 -61
- package/out/renderer/assets/index-DZtJe7oC.js +0 -1019
- package/out/renderer/assets/index-DaWjZz_g.js +0 -291
- package/out/renderer/assets/index-De056HHR.js +0 -151
- package/out/renderer/assets/index-Dk3wSDSN.js +0 -117
- package/out/renderer/assets/index-Dy4VRsnA.js +0 -1041
- package/out/renderer/assets/index-FnnayPBc.js +0 -82
- package/out/renderer/assets/index-MZb_zy6R.js +0 -704
- package/out/renderer/assets/index-chzQl8rJ.js +0 -157
- package/out/renderer/assets/index-s-Owx3Pm.js +0 -327
- package/out/renderer/assets/javascript-C_OHM9hj.js +0 -994
- package/out/renderer/assets/julia-Bs6JJhYG.js +0 -407
- package/out/renderer/assets/livescript-DmzgM3Yt.js +0 -296
- package/out/renderer/assets/lua-8cJgIlqe.js +0 -256
- package/out/renderer/assets/mathematica-DNLOL9PQ.js +0 -110
- package/out/renderer/assets/mbox-Ga7d4MMN.js +0 -117
- package/out/renderer/assets/mirc-Dma3B8rS.js +0 -107
- package/out/renderer/assets/mllike-DHn7xckP.js +0 -334
- package/out/renderer/assets/modelica-0d55jYY0.js +0 -147
- package/out/renderer/assets/mscgen-DdqZYINH.js +0 -135
- package/out/renderer/assets/mumps-Btr8VblO.js +0 -93
- package/out/renderer/assets/nginx-DTDtBDVN.js +0 -141
- package/out/renderer/assets/nsis-3zG7tgur.js +0 -62
- package/out/renderer/assets/ntriples-CvgOYMpL.js +0 -153
- package/out/renderer/assets/octave-DYBj3-tl.js +0 -200
- package/out/renderer/assets/oz-R_e8WMIi.js +0 -231
- package/out/renderer/assets/pascal-GD8iposT.js +0 -105
- package/out/renderer/assets/perl-DL9mHpoi.js +0 -1105
- package/out/renderer/assets/pig-C_4T4YIV.js +0 -101
- package/out/renderer/assets/powershell-B0suO7Vd.js +0 -328
- package/out/renderer/assets/properties-BR-vP1aU.js +0 -58
- package/out/renderer/assets/protobuf-BxgpyhoW.js +0 -77
- package/out/renderer/assets/pug-CTXt1f8z.js +0 -405
- package/out/renderer/assets/puppet-Bdao66PW.js +0 -137
- package/out/renderer/assets/python-CvWbmiX4.js +0 -427
- package/out/renderer/assets/q-CrbCVq4a.js +0 -131
- package/out/renderer/assets/r-V7nswm59.js +0 -170
- package/out/renderer/assets/rpm-C-DLY-If.js +0 -109
- package/out/renderer/assets/ruby-JDKLJNK0.js +0 -330
- package/out/renderer/assets/sas-D2UG-yhZ.js +0 -207
- package/out/renderer/assets/scheme-BKzrkGJD.js +0 -222
- package/out/renderer/assets/shell-BlsXDxCn.js +0 -222
- package/out/renderer/assets/sieve-CjwBwOY5.js +0 -135
- package/out/renderer/assets/simple-mode-DMneyfDu.js +0 -130
- package/out/renderer/assets/smalltalk-BOIGQuhN.js +0 -121
- package/out/renderer/assets/solr-CwD7U71z.js +0 -69
- package/out/renderer/assets/sparql-DYskk2vE.js +0 -249
- package/out/renderer/assets/spreadsheet-Bgtt3oLP.js +0 -87
- package/out/renderer/assets/sql-BSrOzCRI.js +0 -354
- package/out/renderer/assets/stex-B6LNC55o.js +0 -231
- package/out/renderer/assets/stylus-BkS-boTH.js +0 -565
- package/out/renderer/assets/swift-FRZi1uvB.js +0 -291
- package/out/renderer/assets/tcl-CUcaCdmq.js +0 -114
- package/out/renderer/assets/textile-BnFpjsrl.js +0 -414
- package/out/renderer/assets/tiddlywiki-CjprD-Qp.js +0 -218
- package/out/renderer/assets/tiki-DK9DOeWn.js +0 -268
- package/out/renderer/assets/toml-BOuWGMcf.js +0 -76
- package/out/renderer/assets/troff-E1bJ0PPL.js +0 -61
- package/out/renderer/assets/ttcn-cfg-Dc39-fIP.js +0 -133
- package/out/renderer/assets/ttcn-tKd4HLu4.js +0 -192
- package/out/renderer/assets/turtle-Dq7-1WAf.js +0 -124
- package/out/renderer/assets/vb-Dp90gtsv.js +0 -196
- package/out/renderer/assets/vbscript-CI6_mxxU.js +0 -479
- package/out/renderer/assets/velocity-BwIZK1TH.js +0 -149
- package/out/renderer/assets/verilog-DDCYnHN8.js +0 -430
- package/out/renderer/assets/vhdl-DCkMIyT9.js +0 -158
- package/out/renderer/assets/webidl-BTLTThCm.js +0 -204
- package/out/renderer/assets/xquery-BrBUuxMR.js +0 -525
- package/out/renderer/assets/yacas-b5lAVEIl.js +0 -130
- package/out/renderer/assets/z80-BZV19vqv.js +0 -93
- package/scripts/download-uv.mjs +0 -147
- /package/patches/{ai+5.0.161.patch → ai+5.0.167.patch} +0 -0
|
@@ -1,514 +0,0 @@
|
|
|
1
|
-
function kw(type2) {
|
|
2
|
-
return { type: type2, style: "keyword" };
|
|
3
|
-
}
|
|
4
|
-
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
|
|
5
|
-
var operator = kw("operator"), atom = { type: "atom", style: "atom" }, attribute = { type: "attribute", style: "attribute" };
|
|
6
|
-
var type = kw("typedef");
|
|
7
|
-
var keywords = {
|
|
8
|
-
"if": A,
|
|
9
|
-
"while": A,
|
|
10
|
-
"else": B,
|
|
11
|
-
"do": B,
|
|
12
|
-
"try": B,
|
|
13
|
-
"return": C,
|
|
14
|
-
"break": C,
|
|
15
|
-
"continue": C,
|
|
16
|
-
"new": C,
|
|
17
|
-
"throw": C,
|
|
18
|
-
"var": kw("var"),
|
|
19
|
-
"inline": attribute,
|
|
20
|
-
"static": attribute,
|
|
21
|
-
"using": kw("import"),
|
|
22
|
-
"public": attribute,
|
|
23
|
-
"private": attribute,
|
|
24
|
-
"cast": kw("cast"),
|
|
25
|
-
"import": kw("import"),
|
|
26
|
-
"macro": kw("macro"),
|
|
27
|
-
"function": kw("function"),
|
|
28
|
-
"catch": kw("catch"),
|
|
29
|
-
"untyped": kw("untyped"),
|
|
30
|
-
"callback": kw("cb"),
|
|
31
|
-
"for": kw("for"),
|
|
32
|
-
"switch": kw("switch"),
|
|
33
|
-
"case": kw("case"),
|
|
34
|
-
"default": kw("default"),
|
|
35
|
-
"in": operator,
|
|
36
|
-
"never": kw("property_access"),
|
|
37
|
-
"trace": kw("trace"),
|
|
38
|
-
"class": type,
|
|
39
|
-
"abstract": type,
|
|
40
|
-
"enum": type,
|
|
41
|
-
"interface": type,
|
|
42
|
-
"typedef": type,
|
|
43
|
-
"extends": type,
|
|
44
|
-
"implements": type,
|
|
45
|
-
"dynamic": type,
|
|
46
|
-
"true": atom,
|
|
47
|
-
"false": atom,
|
|
48
|
-
"null": atom
|
|
49
|
-
};
|
|
50
|
-
var isOperatorChar = /[+\-*&%=<>!?|]/;
|
|
51
|
-
function chain(stream, state, f) {
|
|
52
|
-
state.tokenize = f;
|
|
53
|
-
return f(stream, state);
|
|
54
|
-
}
|
|
55
|
-
function toUnescaped(stream, end) {
|
|
56
|
-
var escaped = false, next;
|
|
57
|
-
while ((next = stream.next()) != null) {
|
|
58
|
-
if (next == end && !escaped)
|
|
59
|
-
return true;
|
|
60
|
-
escaped = !escaped && next == "\\";
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
var type, content;
|
|
64
|
-
function ret(tp, style, cont2) {
|
|
65
|
-
type = tp;
|
|
66
|
-
content = cont2;
|
|
67
|
-
return style;
|
|
68
|
-
}
|
|
69
|
-
function haxeTokenBase(stream, state) {
|
|
70
|
-
var ch = stream.next();
|
|
71
|
-
if (ch == '"' || ch == "'") {
|
|
72
|
-
return chain(stream, state, haxeTokenString(ch));
|
|
73
|
-
} else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
|
|
74
|
-
return ret(ch);
|
|
75
|
-
} else if (ch == "0" && stream.eat(/x/i)) {
|
|
76
|
-
stream.eatWhile(/[\da-f]/i);
|
|
77
|
-
return ret("number", "number");
|
|
78
|
-
} else if (/\d/.test(ch) || ch == "-" && stream.eat(/\d/)) {
|
|
79
|
-
stream.match(/^\d*(?:\.\d*(?!\.))?(?:[eE][+\-]?\d+)?/);
|
|
80
|
-
return ret("number", "number");
|
|
81
|
-
} else if (state.reAllowed && (ch == "~" && stream.eat(/\//))) {
|
|
82
|
-
toUnescaped(stream, "/");
|
|
83
|
-
stream.eatWhile(/[gimsu]/);
|
|
84
|
-
return ret("regexp", "string.special");
|
|
85
|
-
} else if (ch == "/") {
|
|
86
|
-
if (stream.eat("*")) {
|
|
87
|
-
return chain(stream, state, haxeTokenComment);
|
|
88
|
-
} else if (stream.eat("/")) {
|
|
89
|
-
stream.skipToEnd();
|
|
90
|
-
return ret("comment", "comment");
|
|
91
|
-
} else {
|
|
92
|
-
stream.eatWhile(isOperatorChar);
|
|
93
|
-
return ret("operator", null, stream.current());
|
|
94
|
-
}
|
|
95
|
-
} else if (ch == "#") {
|
|
96
|
-
stream.skipToEnd();
|
|
97
|
-
return ret("conditional", "meta");
|
|
98
|
-
} else if (ch == "@") {
|
|
99
|
-
stream.eat(/:/);
|
|
100
|
-
stream.eatWhile(/[\w_]/);
|
|
101
|
-
return ret("metadata", "meta");
|
|
102
|
-
} else if (isOperatorChar.test(ch)) {
|
|
103
|
-
stream.eatWhile(isOperatorChar);
|
|
104
|
-
return ret("operator", null, stream.current());
|
|
105
|
-
} else {
|
|
106
|
-
var word;
|
|
107
|
-
if (/[A-Z]/.test(ch)) {
|
|
108
|
-
stream.eatWhile(/[\w_<>]/);
|
|
109
|
-
word = stream.current();
|
|
110
|
-
return ret("type", "type", word);
|
|
111
|
-
} else {
|
|
112
|
-
stream.eatWhile(/[\w_]/);
|
|
113
|
-
var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
|
|
114
|
-
return known && state.kwAllowed ? ret(known.type, known.style, word) : ret("variable", "variable", word);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
function haxeTokenString(quote) {
|
|
119
|
-
return function(stream, state) {
|
|
120
|
-
if (toUnescaped(stream, quote))
|
|
121
|
-
state.tokenize = haxeTokenBase;
|
|
122
|
-
return ret("string", "string");
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
function haxeTokenComment(stream, state) {
|
|
126
|
-
var maybeEnd = false, ch;
|
|
127
|
-
while (ch = stream.next()) {
|
|
128
|
-
if (ch == "/" && maybeEnd) {
|
|
129
|
-
state.tokenize = haxeTokenBase;
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
maybeEnd = ch == "*";
|
|
133
|
-
}
|
|
134
|
-
return ret("comment", "comment");
|
|
135
|
-
}
|
|
136
|
-
var atomicTypes = { "atom": true, "number": true, "variable": true, "string": true, "regexp": true };
|
|
137
|
-
function HaxeLexical(indented, column, type2, align, prev, info) {
|
|
138
|
-
this.indented = indented;
|
|
139
|
-
this.column = column;
|
|
140
|
-
this.type = type2;
|
|
141
|
-
this.prev = prev;
|
|
142
|
-
this.info = info;
|
|
143
|
-
if (align != null) this.align = align;
|
|
144
|
-
}
|
|
145
|
-
function inScope(state, varname) {
|
|
146
|
-
for (var v = state.localVars; v; v = v.next)
|
|
147
|
-
if (v.name == varname) return true;
|
|
148
|
-
}
|
|
149
|
-
function parseHaxe(state, style, type2, content2, stream) {
|
|
150
|
-
var cc = state.cc;
|
|
151
|
-
cx.state = state;
|
|
152
|
-
cx.stream = stream;
|
|
153
|
-
cx.marked = null, cx.cc = cc;
|
|
154
|
-
if (!state.lexical.hasOwnProperty("align"))
|
|
155
|
-
state.lexical.align = true;
|
|
156
|
-
while (true) {
|
|
157
|
-
var combinator = cc.length ? cc.pop() : statement;
|
|
158
|
-
if (combinator(type2, content2)) {
|
|
159
|
-
while (cc.length && cc[cc.length - 1].lex)
|
|
160
|
-
cc.pop()();
|
|
161
|
-
if (cx.marked) return cx.marked;
|
|
162
|
-
if (type2 == "variable" && inScope(state, content2)) return "variableName.local";
|
|
163
|
-
if (type2 == "variable" && imported(state, content2)) return "variableName.special";
|
|
164
|
-
return style;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
function imported(state, typename) {
|
|
169
|
-
if (/[a-z]/.test(typename.charAt(0)))
|
|
170
|
-
return false;
|
|
171
|
-
var len = state.importedtypes.length;
|
|
172
|
-
for (var i = 0; i < len; i++)
|
|
173
|
-
if (state.importedtypes[i] == typename) return true;
|
|
174
|
-
}
|
|
175
|
-
function registerimport(importname) {
|
|
176
|
-
var state = cx.state;
|
|
177
|
-
for (var t = state.importedtypes; t; t = t.next)
|
|
178
|
-
if (t.name == importname) return;
|
|
179
|
-
state.importedtypes = { name: importname, next: state.importedtypes };
|
|
180
|
-
}
|
|
181
|
-
var cx = { state: null, marked: null, cc: null };
|
|
182
|
-
function pass() {
|
|
183
|
-
for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
|
|
184
|
-
}
|
|
185
|
-
function cont() {
|
|
186
|
-
pass.apply(null, arguments);
|
|
187
|
-
return true;
|
|
188
|
-
}
|
|
189
|
-
function inList(name, list) {
|
|
190
|
-
for (var v = list; v; v = v.next)
|
|
191
|
-
if (v.name == name) return true;
|
|
192
|
-
return false;
|
|
193
|
-
}
|
|
194
|
-
function register(varname) {
|
|
195
|
-
var state = cx.state;
|
|
196
|
-
if (state.context) {
|
|
197
|
-
cx.marked = "def";
|
|
198
|
-
if (inList(varname, state.localVars)) return;
|
|
199
|
-
state.localVars = { name: varname, next: state.localVars };
|
|
200
|
-
} else if (state.globalVars) {
|
|
201
|
-
if (inList(varname, state.globalVars)) return;
|
|
202
|
-
state.globalVars = { name: varname, next: state.globalVars };
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
var defaultVars = { name: "this", next: null };
|
|
206
|
-
function pushcontext() {
|
|
207
|
-
if (!cx.state.context) cx.state.localVars = defaultVars;
|
|
208
|
-
cx.state.context = { prev: cx.state.context, vars: cx.state.localVars };
|
|
209
|
-
}
|
|
210
|
-
function popcontext() {
|
|
211
|
-
cx.state.localVars = cx.state.context.vars;
|
|
212
|
-
cx.state.context = cx.state.context.prev;
|
|
213
|
-
}
|
|
214
|
-
popcontext.lex = true;
|
|
215
|
-
function pushlex(type2, info) {
|
|
216
|
-
var result = function() {
|
|
217
|
-
var state = cx.state;
|
|
218
|
-
state.lexical = new HaxeLexical(state.indented, cx.stream.column(), type2, null, state.lexical, info);
|
|
219
|
-
};
|
|
220
|
-
result.lex = true;
|
|
221
|
-
return result;
|
|
222
|
-
}
|
|
223
|
-
function poplex() {
|
|
224
|
-
var state = cx.state;
|
|
225
|
-
if (state.lexical.prev) {
|
|
226
|
-
if (state.lexical.type == ")")
|
|
227
|
-
state.indented = state.lexical.indented;
|
|
228
|
-
state.lexical = state.lexical.prev;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
poplex.lex = true;
|
|
232
|
-
function expect(wanted) {
|
|
233
|
-
function f(type2) {
|
|
234
|
-
if (type2 == wanted) return cont();
|
|
235
|
-
else if (wanted == ";") return pass();
|
|
236
|
-
else return cont(f);
|
|
237
|
-
}
|
|
238
|
-
return f;
|
|
239
|
-
}
|
|
240
|
-
function statement(type2) {
|
|
241
|
-
if (type2 == "@") return cont(metadef);
|
|
242
|
-
if (type2 == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex);
|
|
243
|
-
if (type2 == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
|
|
244
|
-
if (type2 == "keyword b") return cont(pushlex("form"), statement, poplex);
|
|
245
|
-
if (type2 == "{") return cont(pushlex("}"), pushcontext, block, poplex, popcontext);
|
|
246
|
-
if (type2 == ";") return cont();
|
|
247
|
-
if (type2 == "attribute") return cont(maybeattribute);
|
|
248
|
-
if (type2 == "function") return cont(functiondef);
|
|
249
|
-
if (type2 == "for") return cont(
|
|
250
|
-
pushlex("form"),
|
|
251
|
-
expect("("),
|
|
252
|
-
pushlex(")"),
|
|
253
|
-
forspec1,
|
|
254
|
-
expect(")"),
|
|
255
|
-
poplex,
|
|
256
|
-
statement,
|
|
257
|
-
poplex
|
|
258
|
-
);
|
|
259
|
-
if (type2 == "variable") return cont(pushlex("stat"), maybelabel);
|
|
260
|
-
if (type2 == "switch") return cont(
|
|
261
|
-
pushlex("form"),
|
|
262
|
-
expression,
|
|
263
|
-
pushlex("}", "switch"),
|
|
264
|
-
expect("{"),
|
|
265
|
-
block,
|
|
266
|
-
poplex,
|
|
267
|
-
poplex
|
|
268
|
-
);
|
|
269
|
-
if (type2 == "case") return cont(expression, expect(":"));
|
|
270
|
-
if (type2 == "default") return cont(expect(":"));
|
|
271
|
-
if (type2 == "catch") return cont(
|
|
272
|
-
pushlex("form"),
|
|
273
|
-
pushcontext,
|
|
274
|
-
expect("("),
|
|
275
|
-
funarg,
|
|
276
|
-
expect(")"),
|
|
277
|
-
statement,
|
|
278
|
-
poplex,
|
|
279
|
-
popcontext
|
|
280
|
-
);
|
|
281
|
-
if (type2 == "import") return cont(importdef, expect(";"));
|
|
282
|
-
if (type2 == "typedef") return cont(typedef);
|
|
283
|
-
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
|
284
|
-
}
|
|
285
|
-
function expression(type2) {
|
|
286
|
-
if (atomicTypes.hasOwnProperty(type2)) return cont(maybeoperator);
|
|
287
|
-
if (type2 == "type") return cont(maybeoperator);
|
|
288
|
-
if (type2 == "function") return cont(functiondef);
|
|
289
|
-
if (type2 == "keyword c") return cont(maybeexpression);
|
|
290
|
-
if (type2 == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeoperator);
|
|
291
|
-
if (type2 == "operator") return cont(expression);
|
|
292
|
-
if (type2 == "[") return cont(pushlex("]"), commasep(maybeexpression, "]"), poplex, maybeoperator);
|
|
293
|
-
if (type2 == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator);
|
|
294
|
-
return cont();
|
|
295
|
-
}
|
|
296
|
-
function maybeexpression(type2) {
|
|
297
|
-
if (type2.match(/[;\}\)\],]/)) return pass();
|
|
298
|
-
return pass(expression);
|
|
299
|
-
}
|
|
300
|
-
function maybeoperator(type2, value) {
|
|
301
|
-
if (type2 == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator);
|
|
302
|
-
if (type2 == "operator" || type2 == ":") return cont(expression);
|
|
303
|
-
if (type2 == ";") return;
|
|
304
|
-
if (type2 == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator);
|
|
305
|
-
if (type2 == ".") return cont(property, maybeoperator);
|
|
306
|
-
if (type2 == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator);
|
|
307
|
-
}
|
|
308
|
-
function maybeattribute(type2) {
|
|
309
|
-
if (type2 == "attribute") return cont(maybeattribute);
|
|
310
|
-
if (type2 == "function") return cont(functiondef);
|
|
311
|
-
if (type2 == "var") return cont(vardef1);
|
|
312
|
-
}
|
|
313
|
-
function metadef(type2) {
|
|
314
|
-
if (type2 == ":") return cont(metadef);
|
|
315
|
-
if (type2 == "variable") return cont(metadef);
|
|
316
|
-
if (type2 == "(") return cont(pushlex(")"), commasep(metaargs, ")"), poplex, statement);
|
|
317
|
-
}
|
|
318
|
-
function metaargs(type2) {
|
|
319
|
-
if (type2 == "variable") return cont();
|
|
320
|
-
}
|
|
321
|
-
function importdef(type2, value) {
|
|
322
|
-
if (type2 == "variable" && /[A-Z]/.test(value.charAt(0))) {
|
|
323
|
-
registerimport(value);
|
|
324
|
-
return cont();
|
|
325
|
-
} else if (type2 == "variable" || type2 == "property" || type2 == "." || value == "*") return cont(importdef);
|
|
326
|
-
}
|
|
327
|
-
function typedef(type2, value) {
|
|
328
|
-
if (type2 == "variable" && /[A-Z]/.test(value.charAt(0))) {
|
|
329
|
-
registerimport(value);
|
|
330
|
-
return cont();
|
|
331
|
-
} else if (type2 == "type" && /[A-Z]/.test(value.charAt(0))) {
|
|
332
|
-
return cont();
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
function maybelabel(type2) {
|
|
336
|
-
if (type2 == ":") return cont(poplex, statement);
|
|
337
|
-
return pass(maybeoperator, expect(";"), poplex);
|
|
338
|
-
}
|
|
339
|
-
function property(type2) {
|
|
340
|
-
if (type2 == "variable") {
|
|
341
|
-
cx.marked = "property";
|
|
342
|
-
return cont();
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
function objprop(type2) {
|
|
346
|
-
if (type2 == "variable") cx.marked = "property";
|
|
347
|
-
if (atomicTypes.hasOwnProperty(type2)) return cont(expect(":"), expression);
|
|
348
|
-
}
|
|
349
|
-
function commasep(what, end) {
|
|
350
|
-
function proceed(type2) {
|
|
351
|
-
if (type2 == ",") return cont(what, proceed);
|
|
352
|
-
if (type2 == end) return cont();
|
|
353
|
-
return cont(expect(end));
|
|
354
|
-
}
|
|
355
|
-
return function(type2) {
|
|
356
|
-
if (type2 == end) return cont();
|
|
357
|
-
else return pass(what, proceed);
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
function block(type2) {
|
|
361
|
-
if (type2 == "}") return cont();
|
|
362
|
-
return pass(statement, block);
|
|
363
|
-
}
|
|
364
|
-
function vardef1(type2, value) {
|
|
365
|
-
if (type2 == "variable") {
|
|
366
|
-
register(value);
|
|
367
|
-
return cont(typeuse, vardef2);
|
|
368
|
-
}
|
|
369
|
-
return cont();
|
|
370
|
-
}
|
|
371
|
-
function vardef2(type2, value) {
|
|
372
|
-
if (value == "=") return cont(expression, vardef2);
|
|
373
|
-
if (type2 == ",") return cont(vardef1);
|
|
374
|
-
}
|
|
375
|
-
function forspec1(type2, value) {
|
|
376
|
-
if (type2 == "variable") {
|
|
377
|
-
register(value);
|
|
378
|
-
return cont(forin, expression);
|
|
379
|
-
} else {
|
|
380
|
-
return pass();
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
function forin(_type, value) {
|
|
384
|
-
if (value == "in") return cont();
|
|
385
|
-
}
|
|
386
|
-
function functiondef(type2, value) {
|
|
387
|
-
if (type2 == "variable" || type2 == "type") {
|
|
388
|
-
register(value);
|
|
389
|
-
return cont(functiondef);
|
|
390
|
-
}
|
|
391
|
-
if (value == "new") return cont(functiondef);
|
|
392
|
-
if (type2 == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, typeuse, statement, popcontext);
|
|
393
|
-
}
|
|
394
|
-
function typeuse(type2) {
|
|
395
|
-
if (type2 == ":") return cont(typestring);
|
|
396
|
-
}
|
|
397
|
-
function typestring(type2) {
|
|
398
|
-
if (type2 == "type") return cont();
|
|
399
|
-
if (type2 == "variable") return cont();
|
|
400
|
-
if (type2 == "{") return cont(pushlex("}"), commasep(typeprop, "}"), poplex);
|
|
401
|
-
}
|
|
402
|
-
function typeprop(type2) {
|
|
403
|
-
if (type2 == "variable") return cont(typeuse);
|
|
404
|
-
}
|
|
405
|
-
function funarg(type2, value) {
|
|
406
|
-
if (type2 == "variable") {
|
|
407
|
-
register(value);
|
|
408
|
-
return cont(typeuse);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
const haxe = {
|
|
412
|
-
name: "haxe",
|
|
413
|
-
startState: function(indentUnit) {
|
|
414
|
-
var defaulttypes = ["Int", "Float", "String", "Void", "Std", "Bool", "Dynamic", "Array"];
|
|
415
|
-
var state = {
|
|
416
|
-
tokenize: haxeTokenBase,
|
|
417
|
-
reAllowed: true,
|
|
418
|
-
kwAllowed: true,
|
|
419
|
-
cc: [],
|
|
420
|
-
lexical: new HaxeLexical(-indentUnit, 0, "block", false),
|
|
421
|
-
importedtypes: defaulttypes,
|
|
422
|
-
context: null,
|
|
423
|
-
indented: 0
|
|
424
|
-
};
|
|
425
|
-
return state;
|
|
426
|
-
},
|
|
427
|
-
token: function(stream, state) {
|
|
428
|
-
if (stream.sol()) {
|
|
429
|
-
if (!state.lexical.hasOwnProperty("align"))
|
|
430
|
-
state.lexical.align = false;
|
|
431
|
-
state.indented = stream.indentation();
|
|
432
|
-
}
|
|
433
|
-
if (stream.eatSpace()) return null;
|
|
434
|
-
var style = state.tokenize(stream, state);
|
|
435
|
-
if (type == "comment") return style;
|
|
436
|
-
state.reAllowed = !!(type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/));
|
|
437
|
-
state.kwAllowed = type != ".";
|
|
438
|
-
return parseHaxe(state, style, type, content, stream);
|
|
439
|
-
},
|
|
440
|
-
indent: function(state, textAfter, cx2) {
|
|
441
|
-
if (state.tokenize != haxeTokenBase) return 0;
|
|
442
|
-
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
|
|
443
|
-
if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
|
|
444
|
-
var type2 = lexical.type, closing = firstChar == type2;
|
|
445
|
-
if (type2 == "vardef") return lexical.indented + 4;
|
|
446
|
-
else if (type2 == "form" && firstChar == "{") return lexical.indented;
|
|
447
|
-
else if (type2 == "stat" || type2 == "form") return lexical.indented + cx2.unit;
|
|
448
|
-
else if (lexical.info == "switch" && !closing)
|
|
449
|
-
return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? cx2.unit : 2 * cx2.unit);
|
|
450
|
-
else if (lexical.align) return lexical.column + (closing ? 0 : 1);
|
|
451
|
-
else return lexical.indented + (closing ? 0 : cx2.unit);
|
|
452
|
-
},
|
|
453
|
-
languageData: {
|
|
454
|
-
indentOnInput: /^\s*[{}]$/,
|
|
455
|
-
commentTokens: { line: "//", block: { open: "/*", close: "*/" } }
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
const hxml = {
|
|
459
|
-
name: "hxml",
|
|
460
|
-
startState: function() {
|
|
461
|
-
return {
|
|
462
|
-
define: false,
|
|
463
|
-
inString: false
|
|
464
|
-
};
|
|
465
|
-
},
|
|
466
|
-
token: function(stream, state) {
|
|
467
|
-
var ch = stream.peek();
|
|
468
|
-
var sol = stream.sol();
|
|
469
|
-
if (ch == "#") {
|
|
470
|
-
stream.skipToEnd();
|
|
471
|
-
return "comment";
|
|
472
|
-
}
|
|
473
|
-
if (sol && ch == "-") {
|
|
474
|
-
var style = "variable-2";
|
|
475
|
-
stream.eat(/-/);
|
|
476
|
-
if (stream.peek() == "-") {
|
|
477
|
-
stream.eat(/-/);
|
|
478
|
-
style = "keyword a";
|
|
479
|
-
}
|
|
480
|
-
if (stream.peek() == "D") {
|
|
481
|
-
stream.eat(/[D]/);
|
|
482
|
-
style = "keyword c";
|
|
483
|
-
state.define = true;
|
|
484
|
-
}
|
|
485
|
-
stream.eatWhile(/[A-Z]/i);
|
|
486
|
-
return style;
|
|
487
|
-
}
|
|
488
|
-
var ch = stream.peek();
|
|
489
|
-
if (state.inString == false && ch == "'") {
|
|
490
|
-
state.inString = true;
|
|
491
|
-
stream.next();
|
|
492
|
-
}
|
|
493
|
-
if (state.inString == true) {
|
|
494
|
-
if (stream.skipTo("'")) ;
|
|
495
|
-
else {
|
|
496
|
-
stream.skipToEnd();
|
|
497
|
-
}
|
|
498
|
-
if (stream.peek() == "'") {
|
|
499
|
-
stream.next();
|
|
500
|
-
state.inString = false;
|
|
501
|
-
}
|
|
502
|
-
return "string";
|
|
503
|
-
}
|
|
504
|
-
stream.next();
|
|
505
|
-
return null;
|
|
506
|
-
},
|
|
507
|
-
languageData: {
|
|
508
|
-
commentTokens: { line: "#" }
|
|
509
|
-
}
|
|
510
|
-
};
|
|
511
|
-
export {
|
|
512
|
-
haxe,
|
|
513
|
-
hxml
|
|
514
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
function failFirstLine(stream, state) {
|
|
2
|
-
stream.skipToEnd();
|
|
3
|
-
state.cur = header;
|
|
4
|
-
return "error";
|
|
5
|
-
}
|
|
6
|
-
function start(stream, state) {
|
|
7
|
-
if (stream.match(/^HTTP\/\d\.\d/)) {
|
|
8
|
-
state.cur = responseStatusCode;
|
|
9
|
-
return "keyword";
|
|
10
|
-
} else if (stream.match(/^[A-Z]+/) && /[ \t]/.test(stream.peek())) {
|
|
11
|
-
state.cur = requestPath;
|
|
12
|
-
return "keyword";
|
|
13
|
-
} else {
|
|
14
|
-
return failFirstLine(stream, state);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function responseStatusCode(stream, state) {
|
|
18
|
-
var code = stream.match(/^\d+/);
|
|
19
|
-
if (!code) return failFirstLine(stream, state);
|
|
20
|
-
state.cur = responseStatusText;
|
|
21
|
-
var status = Number(code[0]);
|
|
22
|
-
if (status >= 100 && status < 400) {
|
|
23
|
-
return "atom";
|
|
24
|
-
} else {
|
|
25
|
-
return "error";
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function responseStatusText(stream, state) {
|
|
29
|
-
stream.skipToEnd();
|
|
30
|
-
state.cur = header;
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
function requestPath(stream, state) {
|
|
34
|
-
stream.eatWhile(/\S/);
|
|
35
|
-
state.cur = requestProtocol;
|
|
36
|
-
return "string.special";
|
|
37
|
-
}
|
|
38
|
-
function requestProtocol(stream, state) {
|
|
39
|
-
if (stream.match(/^HTTP\/\d\.\d$/)) {
|
|
40
|
-
state.cur = header;
|
|
41
|
-
return "keyword";
|
|
42
|
-
} else {
|
|
43
|
-
return failFirstLine(stream, state);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function header(stream) {
|
|
47
|
-
if (stream.sol() && !stream.eat(/[ \t]/)) {
|
|
48
|
-
if (stream.match(/^.*?:/)) {
|
|
49
|
-
return "atom";
|
|
50
|
-
} else {
|
|
51
|
-
stream.skipToEnd();
|
|
52
|
-
return "error";
|
|
53
|
-
}
|
|
54
|
-
} else {
|
|
55
|
-
stream.skipToEnd();
|
|
56
|
-
return "string";
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function body(stream) {
|
|
60
|
-
stream.skipToEnd();
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
const http = {
|
|
64
|
-
name: "http",
|
|
65
|
-
token: function(stream, state) {
|
|
66
|
-
var cur = state.cur;
|
|
67
|
-
if (cur != header && cur != body && stream.eatSpace()) return null;
|
|
68
|
-
return cur(stream, state);
|
|
69
|
-
},
|
|
70
|
-
blankLine: function(state) {
|
|
71
|
-
state.cur = body;
|
|
72
|
-
},
|
|
73
|
-
startState: function() {
|
|
74
|
-
return { cur: start };
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
export {
|
|
78
|
-
http
|
|
79
|
-
};
|