@vc-shell/framework 1.1.2 → 1.1.3
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/CHANGELOG.md +4 -0
- package/dist/apl-B2DGVGxc.js +76 -0
- package/dist/asciiarmor-2LVJmxlE.js +34 -0
- package/dist/asn1-jKiBa2Ya.js +95 -0
- package/dist/asterisk-DS281yxp.js +271 -0
- package/dist/brainfuck-C_p9pTT8.js +34 -0
- package/dist/clike-BUuHEmgZ.js +620 -0
- package/dist/clojure-CCKyeQKf.js +800 -0
- package/dist/cmake-CuaCgAKt.js +28 -0
- package/dist/cobol-BlTKFDRj.js +72 -0
- package/dist/coffeescript-BVCvwO8I.js +179 -0
- package/dist/commonlisp-D_kxz07b.js +75 -0
- package/dist/crystal-D309uH6_.js +217 -0
- package/dist/css-bIlmDBTK.js +1560 -0
- package/dist/cypher-BMq4Fwjl.js +68 -0
- package/dist/d-BZcgY6La.js +127 -0
- package/dist/diff-Cg9d_RX2.js +18 -0
- package/dist/{assets/dockerfile-D0MivFIF.js → dockerfile-DIy8NleC.js} +36 -41
- package/dist/dtd-CtLokQ-U.js +84 -0
- package/dist/dylan-QYeExnWK.js +234 -0
- package/dist/ebnf-DUPDuY4r.js +78 -0
- package/dist/ecl-CiXN-g_D.js +121 -0
- package/dist/eiffel-yQhjl4T1.js +110 -0
- package/dist/elm-CNT9vbN0.js +108 -0
- package/dist/erlang-CFOYdy9e.js +487 -0
- package/dist/factor-DDOC7X6P.js +65 -0
- package/dist/fcl-CPC2WYrI.js +103 -0
- package/dist/forth-BmxRyE9S.js +60 -0
- package/dist/fortran-9bvPyrOW.js +442 -0
- package/dist/framework.js +288 -29
- package/dist/gas-BdfkXJT_.js +183 -0
- package/dist/gherkin-CJuwpceU.js +34 -0
- package/dist/groovy-DZeT_VM-.js +146 -0
- package/dist/haskell-Bvt3Qq1t.js +375 -0
- package/dist/haxe-70NVW1pR.js +359 -0
- package/dist/http-D9LttvKF.js +44 -0
- package/dist/idl-B6TRFYjl.js +947 -0
- package/dist/{assets/index-C7zlEJy8.js → index-B83didIY.js} +229 -302
- package/dist/{assets/index-BT8o9-M5.js → index-BKR3ecN5.js} +267 -386
- package/dist/{assets/index-B1srGfDb.js → index-BN-_cebP.js} +119 -165
- package/dist/index-BUHouW8T.js +249 -0
- package/dist/index-BW3krAiY.js +341 -0
- package/dist/index-C6tcHNVl.js +75 -0
- package/dist/index-CGyGGihY.js +538 -0
- package/dist/{assets/index-DMTL7O1s.js → index-CnQ56kqq.js} +570 -586
- package/dist/index-Cv6c_1IG.js +71 -0
- package/dist/{assets/index-CeeaNa4F.js → index-CxMfHOup.js} +136 -167
- package/dist/index-DRL7VovM.js +308 -0
- package/dist/index-Dfcy8w9c.js +58 -0
- package/dist/{assets/index-CtmpJVwa.js → index-DyGIijU2.js} +270 -312
- package/dist/index-Ek7_XgGk.js +98 -0
- package/dist/{assets/index-Bv_z_qRq.js → index-TSGli7LX.js} +121 -124
- package/dist/index-UnPPbmRc.js +145659 -0
- package/dist/{assets/index-BKF-A58l.js → index-xFQltarK.js} +79 -92
- package/dist/index.css +9 -18
- package/dist/javascript-WMWNx-Vj.js +690 -0
- package/dist/jinja2-DnB6dQmV.js +154 -0
- package/dist/julia-DpvXAuO6.js +241 -0
- package/dist/livescript-CanGTf8u.js +272 -0
- package/dist/lua-XplVlWi_.js +217 -0
- package/dist/mathematica-jaRHnSxC.js +35 -0
- package/dist/mbox-BctzC1hL.js +76 -0
- package/dist/mirc-CFBPAOaF.js +72 -0
- package/dist/mllike-BSnXJBGA.js +272 -0
- package/dist/modelica-vUgVs--1.js +93 -0
- package/dist/mscgen-Cpl0NYLN.js +104 -0
- package/dist/mumps-CQoS1kWX.js +25 -0
- package/dist/nginx-zDPm3Z74.js +89 -0
- package/dist/nsis-fePjrhq7.js +62 -0
- package/dist/ntriples-CsNjv2QF.js +79 -0
- package/dist/octave-C8PmmSRH.js +143 -0
- package/dist/oz-Ce8aN8oE.js +151 -0
- package/dist/pascal-De0D6mP7.js +77 -0
- package/dist/perl-B4bSCe1C.js +915 -0
- package/dist/pig-D24Z8EXi.js +54 -0
- package/dist/powershell-DkYVfTzP.js +249 -0
- package/dist/properties-Dn9wna3M.js +26 -0
- package/dist/protobuf-BPIjwpzm.js +49 -0
- package/dist/pug-BqUR2bBq.js +248 -0
- package/dist/puppet-nyd4dhjf.js +45 -0
- package/dist/python-B5QdSKoL.js +313 -0
- package/dist/q-DXjKs-tC.js +83 -0
- package/dist/r-LKEuhEGI.js +104 -0
- package/dist/rpm-IznJm2Xc.js +57 -0
- package/dist/ruby-CcYfvIk6.js +228 -0
- package/dist/sas-7E8yHoCW.js +105 -0
- package/dist/scheme-DjibxsNh.js +124 -0
- package/dist/shell-C0C2sNA_.js +182 -0
- package/dist/sieve-Bwz7vjP5.js +72 -0
- package/dist/simple-mode-B0dvCdAA.js +89 -0
- package/dist/smalltalk-Bhddl2pB.js +48 -0
- package/dist/solr-BNlsLglM.js +41 -0
- package/dist/sparql-FarWu_Gb.js +197 -0
- package/dist/spreadsheet-C-cy4P5N.js +49 -0
- package/dist/sql-mMre1Bo3.js +282 -0
- package/dist/stex-92raWT1r.js +129 -0
- package/dist/stylus-CAdqWld3.js +250 -0
- package/dist/swift-DSxqR9R6.js +230 -0
- package/dist/tcl-xfoLljhY.js +81 -0
- package/dist/textile-D1AWE-pc.js +295 -0
- package/dist/tiddlywiki-5wqsXtSk.js +155 -0
- package/dist/tiki-__Kn3CeS.js +181 -0
- package/dist/toml-BHiuTcfn.js +49 -0
- package/dist/troff-D2UO-fKf.js +35 -0
- package/dist/ttcn-Bsa4sfRm.js +123 -0
- package/dist/ttcn-cfg-Bac_acMi.js +88 -0
- package/dist/turtle-xwJUxoPV.js +80 -0
- package/dist/vb-c2kQGd6-.js +74 -0
- package/dist/vbscript-Dz1TtKsy.js +324 -0
- package/dist/velocity-DJd0pTTC.js +96 -0
- package/dist/verilog-C4VGD9n1.js +263 -0
- package/dist/vhdl-T9HkrbI2.js +106 -0
- package/dist/webidl-CjfDENEo.js +155 -0
- package/dist/xquery-BUQdORAS.js +422 -0
- package/dist/yacas-C0absKBh.js +73 -0
- package/dist/z80-C8rPtw-0.js +61 -0
- package/package.json +4 -4
- package/dist/assets/apl-NdZ6-T1z.js +0 -142
- package/dist/assets/asciiarmor-CmJEbAuq.js +0 -56
- package/dist/assets/asn1-Ctc8K72v.js +0 -192
- package/dist/assets/asterisk-D6r__RMF.js +0 -187
- package/dist/assets/brainfuck-COwWCBpq.js +0 -70
- package/dist/assets/clike-C-PtfL50.js +0 -1019
- package/dist/assets/clojure-C2XPrGCa.js +0 -274
- package/dist/assets/cmake-BGrEgXCL.js +0 -81
- package/dist/assets/cobol-DShPmpZe.js +0 -234
- package/dist/assets/coffeescript-BG8vTfSz.js +0 -329
- package/dist/assets/commonlisp-8oE2EpEe.js +0 -108
- package/dist/assets/core-api-BMLS9FrT.js +0 -8288
- package/dist/assets/core-composables-DYxpIWyY.js +0 -1799
- package/dist/assets/core-constants-DiKDBbnD.js +0 -83
- package/dist/assets/core-directives-QhJx9kWh.js +0 -41
- package/dist/assets/core-interceptors-CSjUvxQ0.js +0 -78
- package/dist/assets/core-plugins-wv2bDZ0l.js +0 -4919
- package/dist/assets/core-services-CAfJRsjs.js +0 -4
- package/dist/assets/core-utilities-BTktq_a-.js +0 -33
- package/dist/assets/crystal--rIRMl16.js +0 -419
- package/dist/assets/css/core-directives-FL4vIIkN.css +0 -73
- package/dist/assets/css/fonts-M1mtyV8L.css +0 -305
- package/dist/assets/css/icons-css-DbCVsovz.css +0 -41
- package/dist/assets/css/shared-components-bnLHdCtf.css +0 -429
- package/dist/assets/css/shared-modules-CNOICmYQ.css +0 -45
- package/dist/assets/css/styles-C62nDZwV.css +0 -4096
- package/dist/assets/css/ui-app-Bh9hmlIB.css +0 -1287
- package/dist/assets/css/ui-content-B29jsmK7.css +0 -1187
- package/dist/assets/css/ui-controls-CRtfFczw.css +0 -387
- package/dist/assets/css/ui-data-CYLxfdUa.css +0 -1555
- package/dist/assets/css/ui-form-C3WrWfVl.css +0 -71
- package/dist/assets/css/ui-form-fields-DOtHhDeM.css +0 -1360
- package/dist/assets/css/ui-helpers-bOoNv5dS.css +0 -37
- package/dist/assets/css/ui-indicators-CybQnCoU.css +0 -628
- package/dist/assets/css/ui-layout-DyGKgizy.css +0 -251
- package/dist/assets/css/ui-media-TWYep8js.css +0 -298
- package/dist/assets/css/ui-media-advanced-BGxy3VSB.css +0 -183
- package/dist/assets/css/ui-navigation-DcPRn8SB.css +0 -1693
- package/dist/assets/css-C_ZeEwz2.js +0 -847
- package/dist/assets/cypher-Bayei42D.js +0 -122
- package/dist/assets/d-B0hhz6be.js +0 -205
- package/dist/assets/diff-DQutOIXs.js +0 -30
- package/dist/assets/dtd-C1CeYVnM.js +0 -121
- package/dist/assets/dylan-Dm9-uD-A.js +0 -337
- package/dist/assets/ebnf-jWG_1Yly.js +0 -151
- package/dist/assets/ecl-CgJPA6z9.js +0 -190
- package/dist/assets/eiffel-lj7uLahq.js +0 -146
- package/dist/assets/elm-Cz7o1ijk.js +0 -230
- package/dist/assets/erlang-CyL5QOyR.js +0 -581
- package/dist/assets/factor-BVWHwYpu.js +0 -65
- package/dist/assets/fcl-DiozYjc8.js +0 -154
- package/dist/assets/forth-B7vn5ze0.js +0 -164
- package/dist/assets/fortran-D2XNEnBT.js +0 -172
- package/dist/assets/gas-B_Tj57Ve.js +0 -343
- package/dist/assets/gherkin-CJ6Qk4EZ.js +0 -147
- package/dist/assets/groovy-ioGz2WSV.js +0 -228
- package/dist/assets/haskell-BHnm1B83.js +0 -239
- package/dist/assets/haxe-Bn6Yo6N3.js +0 -490
- package/dist/assets/http-BOd5SYCT.js +0 -89
- package/dist/assets/idl-FSFk8_xX.js +0 -274
- package/dist/assets/index--5fKpGeN.js +0 -792
- package/dist/assets/index-0lME64YH.js +0 -342
- package/dist/assets/index-B6Ip0FgO.js +0 -437
- package/dist/assets/index-BmV05E5M.js +0 -479
- package/dist/assets/index-C6MavZDA.js +0 -131
- package/dist/assets/index-CwKpgcYl.js +0 -85
- package/dist/assets/index-DRUmDL0J.js +0 -59
- package/dist/assets/index-DgFC-M9G.js +0 -96
- package/dist/assets/javascript-DGrAs70C.js +0 -922
- package/dist/assets/jinja2-D9k5QrXv.js +0 -171
- package/dist/assets/julia-DM42tOPB.js +0 -369
- package/dist/assets/livescript-Dci8HnOi.js +0 -259
- package/dist/assets/lua-CByQu4v6.js +0 -137
- package/dist/assets/lucide-icons-af0BY3bi.js +0 -34555
- package/dist/assets/mathematica-Dkv0uCYF.js +0 -153
- package/dist/assets/mbox-CYTvs5kC.js +0 -114
- package/dist/assets/mirc-DpgP3GCo.js +0 -176
- package/dist/assets/mllike-C6tNn2Yt.js +0 -343
- package/dist/assets/modelica-CR6hTSce.js +0 -192
- package/dist/assets/mscgen-D0GXtzMS.js +0 -149
- package/dist/assets/mumps-Bf1EyDa6.js +0 -129
- package/dist/assets/nginx-By9Phklj.js +0 -163
- package/dist/assets/nsis-B5ggMLQ9.js +0 -80
- package/dist/assets/ntriples-C7VJ7pnm.js +0 -141
- package/dist/assets/octave-6yR_ix15.js +0 -112
- package/dist/assets/oz-CEUnktiQ.js +0 -235
- package/dist/assets/pascal-Dksf1EyF.js +0 -124
- package/dist/assets/perl-B99DUQQt.js +0 -819
- package/dist/assets/pig-DFeDRta6.js +0 -149
- package/dist/assets/powershell-DhwsNWMx.js +0 -381
- package/dist/assets/properties-o21uErwC.js +0 -62
- package/dist/assets/protobuf-YxlANsmD.js +0 -54
- package/dist/assets/pug-bUgjeODZ.js +0 -504
- package/dist/assets/puppet-B8WICGYE.js +0 -205
- package/dist/assets/python-D3FFx1Id.js +0 -389
- package/dist/assets/q-D2Hjhl2C.js +0 -123
- package/dist/assets/r-D73k5lac.js +0 -174
- package/dist/assets/rpm-Duv_WH0z.js +0 -89
- package/dist/assets/ruby-DGCVqZDt.js +0 -287
- package/dist/assets/sas-XjPv1Vy5.js +0 -268
- package/dist/assets/scheme-DeaA28vt.js +0 -263
- package/dist/assets/shared-components-CfAt2hC6.js +0 -1501
- package/dist/assets/shared-composables-v9NkNuAe.js +0 -35
- package/dist/assets/shared-modules-CDP-H5ZB.js +0 -3588
- package/dist/assets/shared-pages-BGRRA5WB.js +0 -20
- package/dist/assets/shell-Bx6QZTgx.js +0 -145
- package/dist/assets/sieve-CWCD62sW.js +0 -178
- package/dist/assets/simple-mode-BAO9cD7H.js +0 -136
- package/dist/assets/smalltalk-DSQbF4MF.js +0 -153
- package/dist/assets/solr-v_XRf31C.js +0 -80
- package/dist/assets/sparql-BrfDqf0-.js +0 -170
- package/dist/assets/spreadsheet-Csn84Pef.js +0 -98
- package/dist/assets/sql-D4utlq1l.js +0 -480
- package/dist/assets/stex-DBkktma-.js +0 -246
- package/dist/assets/stylus-ByG-Fd6f.js +0 -750
- package/dist/assets/swift-CHbTprt3.js +0 -202
- package/dist/assets/tcl-BRlMUELr.js +0 -125
- package/dist/assets/textile-CqfTUjd4.js +0 -441
- package/dist/assets/tiddlywiki-BrsoM8KB.js +0 -278
- package/dist/assets/tiki-D-ivWPkc.js +0 -289
- package/dist/assets/toml-t_IhJu83.js +0 -75
- package/dist/assets/troff-DckGF2AE.js +0 -64
- package/dist/assets/ttcn-B8TAFbRR.js +0 -253
- package/dist/assets/ttcn-cfg-NHh25oCM.js +0 -197
- package/dist/assets/turtle-D9Js0BlL.js +0 -141
- package/dist/assets/ui-app-D31Pr1WY.js +0 -1993
- package/dist/assets/ui-content-B7SxH8y9.js +0 -52887
- package/dist/assets/ui-controls-nmDJYLmC.js +0 -348
- package/dist/assets/ui-data-Ci3b1ye0.js +0 -22901
- package/dist/assets/ui-form-Cs5ooOo7.js +0 -159
- package/dist/assets/ui-form-fields-DFQi31jT.js +0 -40575
- package/dist/assets/ui-helpers-CF-EUlOg.js +0 -1736
- package/dist/assets/ui-indicators-mIQeEqha.js +0 -199
- package/dist/assets/ui-layout-v2XBQky3.js +0 -320
- package/dist/assets/ui-media-WWYrwmZw.js +0 -1259
- package/dist/assets/ui-media-advanced-T8ibi153.js +0 -492
- package/dist/assets/ui-modals-BdZXzI85.js +0 -2
- package/dist/assets/ui-navigation-BtHa6ovW.js +0 -24269
- package/dist/assets/utils-DZK5fu48.js +0 -17216
- package/dist/assets/vb-CbIGLrpY.js +0 -249
- package/dist/assets/vbscript-8ANWle9n.js +0 -320
- package/dist/assets/velocity-D6hz3Hzw.js +0 -186
- package/dist/assets/verilog-DIV442at.js +0 -565
- package/dist/assets/vhdl-BlTiZo_v.js +0 -174
- package/dist/assets/vueuse-CTQm4Zh0.js +0 -9308
- package/dist/assets/webidl-Cp3tcqdk.js +0 -179
- package/dist/assets/xquery-Dd4TBzXv.js +0 -411
- package/dist/assets/yacas-DQ1WucF0.js +0 -182
- package/dist/assets/z80-P1j44jDI.js +0 -102
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
var wordRegexp = function(words) {
|
|
2
|
-
return new RegExp("^(?:" + words.join("|") + ")$", "i");
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
var tokenBase = function(stream/*, state*/) {
|
|
6
|
-
curPunc = null;
|
|
7
|
-
var ch = stream.next();
|
|
8
|
-
if (ch ==='"') {
|
|
9
|
-
stream.match(/^.*?"/);
|
|
10
|
-
return "string";
|
|
11
|
-
}
|
|
12
|
-
if (ch === "'") {
|
|
13
|
-
stream.match(/^.*?'/);
|
|
14
|
-
return "string";
|
|
15
|
-
}
|
|
16
|
-
if (/[{}\(\),\.;\[\]]/.test(ch)) {
|
|
17
|
-
curPunc = ch;
|
|
18
|
-
return "punctuation";
|
|
19
|
-
} else if (ch === "/" && stream.eat("/")) {
|
|
20
|
-
stream.skipToEnd();
|
|
21
|
-
return "comment";
|
|
22
|
-
} else if (operatorChars.test(ch)) {
|
|
23
|
-
stream.eatWhile(operatorChars);
|
|
24
|
-
return null;
|
|
25
|
-
} else {
|
|
26
|
-
stream.eatWhile(/[_\w\d]/);
|
|
27
|
-
if (stream.eat(":")) {
|
|
28
|
-
stream.eatWhile(/[\w\d_\-]/);
|
|
29
|
-
return "atom";
|
|
30
|
-
}
|
|
31
|
-
var word = stream.current();
|
|
32
|
-
if (funcs.test(word)) return "builtin";
|
|
33
|
-
if (preds.test(word)) return "def";
|
|
34
|
-
if (keywords.test(word) || systemKeywords.test(word)) return "keyword";
|
|
35
|
-
return "variable";
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var pushContext = function(state, type, col) {
|
|
39
|
-
return state.context = {
|
|
40
|
-
prev: state.context,
|
|
41
|
-
indent: state.indent,
|
|
42
|
-
col: col,
|
|
43
|
-
type: type
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
var popContext = function(state) {
|
|
47
|
-
state.indent = state.context.indent;
|
|
48
|
-
return state.context = state.context.prev;
|
|
49
|
-
};
|
|
50
|
-
var curPunc;
|
|
51
|
-
var funcs = wordRegexp(["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"]);
|
|
52
|
-
var preds = wordRegexp(["all", "and", "any", "contains", "exists", "has", "in", "none", "not", "or", "single", "xor"]);
|
|
53
|
-
var keywords = wordRegexp(["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"]);
|
|
54
|
-
var systemKeywords = wordRegexp(["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"]);
|
|
55
|
-
var operatorChars = /[*+\-<>=&|~%^]/;
|
|
56
|
-
|
|
57
|
-
const cypher = {
|
|
58
|
-
name: "cypher",
|
|
59
|
-
startState: function() {
|
|
60
|
-
return {
|
|
61
|
-
tokenize: tokenBase,
|
|
62
|
-
context: null,
|
|
63
|
-
indent: 0,
|
|
64
|
-
col: 0
|
|
65
|
-
};
|
|
66
|
-
},
|
|
67
|
-
token: function(stream, state) {
|
|
68
|
-
if (stream.sol()) {
|
|
69
|
-
if (state.context && (state.context.align == null)) {
|
|
70
|
-
state.context.align = false;
|
|
71
|
-
}
|
|
72
|
-
state.indent = stream.indentation();
|
|
73
|
-
}
|
|
74
|
-
if (stream.eatSpace()) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
var style = state.tokenize(stream, state);
|
|
78
|
-
if (style !== "comment" && state.context && (state.context.align == null) && state.context.type !== "pattern") {
|
|
79
|
-
state.context.align = true;
|
|
80
|
-
}
|
|
81
|
-
if (curPunc === "(") {
|
|
82
|
-
pushContext(state, ")", stream.column());
|
|
83
|
-
} else if (curPunc === "[") {
|
|
84
|
-
pushContext(state, "]", stream.column());
|
|
85
|
-
} else if (curPunc === "{") {
|
|
86
|
-
pushContext(state, "}", stream.column());
|
|
87
|
-
} else if (/[\]\}\)]/.test(curPunc)) {
|
|
88
|
-
while (state.context && state.context.type === "pattern") {
|
|
89
|
-
popContext(state);
|
|
90
|
-
}
|
|
91
|
-
if (state.context && curPunc === state.context.type) {
|
|
92
|
-
popContext(state);
|
|
93
|
-
}
|
|
94
|
-
} else if (curPunc === "." && state.context && state.context.type === "pattern") {
|
|
95
|
-
popContext(state);
|
|
96
|
-
} else if (/atom|string|variable/.test(style) && state.context) {
|
|
97
|
-
if (/[\}\]]/.test(state.context.type)) {
|
|
98
|
-
pushContext(state, "pattern", stream.column());
|
|
99
|
-
} else if (state.context.type === "pattern" && !state.context.align) {
|
|
100
|
-
state.context.align = true;
|
|
101
|
-
state.context.col = stream.column();
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return style;
|
|
105
|
-
},
|
|
106
|
-
indent: function(state, textAfter, cx) {
|
|
107
|
-
var firstChar = textAfter && textAfter.charAt(0);
|
|
108
|
-
var context = state.context;
|
|
109
|
-
if (/[\]\}]/.test(firstChar)) {
|
|
110
|
-
while (context && context.type === "pattern") {
|
|
111
|
-
context = context.prev;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
var closing = context && firstChar === context.type;
|
|
115
|
-
if (!context) return 0;
|
|
116
|
-
if (context.type === "keywords") return null
|
|
117
|
-
if (context.align) return context.col + (closing ? 0 : 1);
|
|
118
|
-
return context.indent + (closing ? 0 : cx.unit);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export { cypher };
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
function words(str) {
|
|
2
|
-
var obj = {}, words = str.split(" ");
|
|
3
|
-
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
|
4
|
-
return obj;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
var blockKeywordsStr = "body catch class do else enum for foreach foreach_reverse if in interface mixin " +
|
|
8
|
-
"out scope struct switch try union unittest version while with";
|
|
9
|
-
|
|
10
|
-
const parserConfig = {
|
|
11
|
-
keywords: words("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue " +
|
|
12
|
-
"debug default delegate delete deprecated export extern final finally function goto immutable " +
|
|
13
|
-
"import inout invariant is lazy macro module new nothrow override package pragma private " +
|
|
14
|
-
"protected public pure ref return shared short static super synchronized template this " +
|
|
15
|
-
"throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters " +
|
|
16
|
-
blockKeywordsStr),
|
|
17
|
-
blockKeywords: words(blockKeywordsStr),
|
|
18
|
-
builtin: words("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte " +
|
|
19
|
-
"ucent uint ulong ushort wchar wstring void size_t sizediff_t"),
|
|
20
|
-
atoms: words("exit failure success true false null"),
|
|
21
|
-
hooks: {
|
|
22
|
-
"@": function(stream, _state) {
|
|
23
|
-
stream.eatWhile(/[\w\$_]/);
|
|
24
|
-
return "meta";
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
var statementIndentUnit = parserConfig.statementIndentUnit,
|
|
30
|
-
keywords = parserConfig.keywords,
|
|
31
|
-
builtin = parserConfig.builtin,
|
|
32
|
-
blockKeywords = parserConfig.blockKeywords,
|
|
33
|
-
atoms = parserConfig.atoms,
|
|
34
|
-
hooks = parserConfig.hooks,
|
|
35
|
-
multiLineStrings = parserConfig.multiLineStrings;
|
|
36
|
-
var isOperatorChar = /[+\-*&%=<>!?|\/]/;
|
|
37
|
-
|
|
38
|
-
var curPunc;
|
|
39
|
-
|
|
40
|
-
function tokenBase(stream, state) {
|
|
41
|
-
var ch = stream.next();
|
|
42
|
-
if (hooks[ch]) {
|
|
43
|
-
var result = hooks[ch](stream, state);
|
|
44
|
-
if (result !== false) return result;
|
|
45
|
-
}
|
|
46
|
-
if (ch == '"' || ch == "'" || ch == "`") {
|
|
47
|
-
state.tokenize = tokenString(ch);
|
|
48
|
-
return state.tokenize(stream, state);
|
|
49
|
-
}
|
|
50
|
-
if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
|
|
51
|
-
curPunc = ch;
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
if (/\d/.test(ch)) {
|
|
55
|
-
stream.eatWhile(/[\w\.]/);
|
|
56
|
-
return "number";
|
|
57
|
-
}
|
|
58
|
-
if (ch == "/") {
|
|
59
|
-
if (stream.eat("+")) {
|
|
60
|
-
state.tokenize = tokenNestedComment;
|
|
61
|
-
return tokenNestedComment(stream, state);
|
|
62
|
-
}
|
|
63
|
-
if (stream.eat("*")) {
|
|
64
|
-
state.tokenize = tokenComment;
|
|
65
|
-
return tokenComment(stream, state);
|
|
66
|
-
}
|
|
67
|
-
if (stream.eat("/")) {
|
|
68
|
-
stream.skipToEnd();
|
|
69
|
-
return "comment";
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (isOperatorChar.test(ch)) {
|
|
73
|
-
stream.eatWhile(isOperatorChar);
|
|
74
|
-
return "operator";
|
|
75
|
-
}
|
|
76
|
-
stream.eatWhile(/[\w\$_\xa1-\uffff]/);
|
|
77
|
-
var cur = stream.current();
|
|
78
|
-
if (keywords.propertyIsEnumerable(cur)) {
|
|
79
|
-
if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
|
|
80
|
-
return "keyword";
|
|
81
|
-
}
|
|
82
|
-
if (builtin.propertyIsEnumerable(cur)) {
|
|
83
|
-
if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
|
|
84
|
-
return "builtin";
|
|
85
|
-
}
|
|
86
|
-
if (atoms.propertyIsEnumerable(cur)) return "atom";
|
|
87
|
-
return "variable";
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function tokenString(quote) {
|
|
91
|
-
return function(stream, state) {
|
|
92
|
-
var escaped = false, next, end = false;
|
|
93
|
-
while ((next = stream.next()) != null) {
|
|
94
|
-
if (next == quote && !escaped) {end = true; break;}
|
|
95
|
-
escaped = !escaped && next == "\\";
|
|
96
|
-
}
|
|
97
|
-
if (end || !(escaped || multiLineStrings))
|
|
98
|
-
state.tokenize = null;
|
|
99
|
-
return "string";
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function tokenComment(stream, state) {
|
|
104
|
-
var maybeEnd = false, ch;
|
|
105
|
-
while (ch = stream.next()) {
|
|
106
|
-
if (ch == "/" && maybeEnd) {
|
|
107
|
-
state.tokenize = null;
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
maybeEnd = (ch == "*");
|
|
111
|
-
}
|
|
112
|
-
return "comment";
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function tokenNestedComment(stream, state) {
|
|
116
|
-
var maybeEnd = false, ch;
|
|
117
|
-
while (ch = stream.next()) {
|
|
118
|
-
if (ch == "/" && maybeEnd) {
|
|
119
|
-
state.tokenize = null;
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
122
|
-
maybeEnd = (ch == "+");
|
|
123
|
-
}
|
|
124
|
-
return "comment";
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function Context(indented, column, type, align, prev) {
|
|
128
|
-
this.indented = indented;
|
|
129
|
-
this.column = column;
|
|
130
|
-
this.type = type;
|
|
131
|
-
this.align = align;
|
|
132
|
-
this.prev = prev;
|
|
133
|
-
}
|
|
134
|
-
function pushContext(state, col, type) {
|
|
135
|
-
var indent = state.indented;
|
|
136
|
-
if (state.context && state.context.type == "statement")
|
|
137
|
-
indent = state.context.indented;
|
|
138
|
-
return state.context = new Context(indent, col, type, null, state.context);
|
|
139
|
-
}
|
|
140
|
-
function popContext(state) {
|
|
141
|
-
var t = state.context.type;
|
|
142
|
-
if (t == ")" || t == "]" || t == "}")
|
|
143
|
-
state.indented = state.context.indented;
|
|
144
|
-
return state.context = state.context.prev;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Interface
|
|
148
|
-
|
|
149
|
-
const d = {
|
|
150
|
-
name: "d",
|
|
151
|
-
startState: function(indentUnit) {
|
|
152
|
-
return {
|
|
153
|
-
tokenize: null,
|
|
154
|
-
context: new Context(-indentUnit, 0, "top", false),
|
|
155
|
-
indented: 0,
|
|
156
|
-
startOfLine: true
|
|
157
|
-
};
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
token: function(stream, state) {
|
|
161
|
-
var ctx = state.context;
|
|
162
|
-
if (stream.sol()) {
|
|
163
|
-
if (ctx.align == null) ctx.align = false;
|
|
164
|
-
state.indented = stream.indentation();
|
|
165
|
-
state.startOfLine = true;
|
|
166
|
-
}
|
|
167
|
-
if (stream.eatSpace()) return null;
|
|
168
|
-
curPunc = null;
|
|
169
|
-
var style = (state.tokenize || tokenBase)(stream, state);
|
|
170
|
-
if (style == "comment" || style == "meta") return style;
|
|
171
|
-
if (ctx.align == null) ctx.align = true;
|
|
172
|
-
|
|
173
|
-
if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") popContext(state);
|
|
174
|
-
else if (curPunc == "{") pushContext(state, stream.column(), "}");
|
|
175
|
-
else if (curPunc == "[") pushContext(state, stream.column(), "]");
|
|
176
|
-
else if (curPunc == "(") pushContext(state, stream.column(), ")");
|
|
177
|
-
else if (curPunc == "}") {
|
|
178
|
-
while (ctx.type == "statement") ctx = popContext(state);
|
|
179
|
-
if (ctx.type == "}") ctx = popContext(state);
|
|
180
|
-
while (ctx.type == "statement") ctx = popContext(state);
|
|
181
|
-
}
|
|
182
|
-
else if (curPunc == ctx.type) popContext(state);
|
|
183
|
-
else if (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') || (ctx.type == "statement" && curPunc == "newstatement"))
|
|
184
|
-
pushContext(state, stream.column(), "statement");
|
|
185
|
-
state.startOfLine = false;
|
|
186
|
-
return style;
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
indent: function(state, textAfter, cx) {
|
|
190
|
-
if (state.tokenize != tokenBase && state.tokenize != null) return null;
|
|
191
|
-
var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
|
|
192
|
-
if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
|
|
193
|
-
var closing = firstChar == ctx.type;
|
|
194
|
-
if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit || cx.unit);
|
|
195
|
-
else if (ctx.align) return ctx.column + (closing ? 0 : 1);
|
|
196
|
-
else return ctx.indented + (closing ? 0 : cx.unit);
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
languageData: {
|
|
200
|
-
indentOnInput: /^\s*[{}]$/,
|
|
201
|
-
commentTokens: {line: "//", block: {open: "/*", close: "*/"}}
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
export { d };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
var TOKEN_NAMES = {
|
|
2
|
-
'+': 'inserted',
|
|
3
|
-
'-': 'deleted',
|
|
4
|
-
'@': 'meta'
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
const diff = {
|
|
8
|
-
name: "diff",
|
|
9
|
-
token: function(stream) {
|
|
10
|
-
var tw_pos = stream.string.search(/[\t ]+?$/);
|
|
11
|
-
|
|
12
|
-
if (!stream.sol() || tw_pos === 0) {
|
|
13
|
-
stream.skipToEnd();
|
|
14
|
-
return ("error " + (
|
|
15
|
-
TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, '');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd();
|
|
19
|
-
|
|
20
|
-
if (tw_pos === -1) {
|
|
21
|
-
stream.skipToEnd();
|
|
22
|
-
} else {
|
|
23
|
-
stream.pos = tw_pos;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return token_name;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export { diff };
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
var type;
|
|
2
|
-
function ret(style, tp) {type = tp; return style;}
|
|
3
|
-
|
|
4
|
-
function tokenBase(stream, state) {
|
|
5
|
-
var ch = stream.next();
|
|
6
|
-
|
|
7
|
-
if (ch == "<" && stream.eat("!") ) {
|
|
8
|
-
if (stream.eatWhile(/[\-]/)) {
|
|
9
|
-
state.tokenize = tokenSGMLComment;
|
|
10
|
-
return tokenSGMLComment(stream, state);
|
|
11
|
-
} else if (stream.eatWhile(/[\w]/)) return ret("keyword", "doindent");
|
|
12
|
-
} else if (ch == "<" && stream.eat("?")) { //xml declaration
|
|
13
|
-
state.tokenize = inBlock("meta", "?>");
|
|
14
|
-
return ret("meta", ch);
|
|
15
|
-
} else if (ch == "#" && stream.eatWhile(/[\w]/)) return ret("atom", "tag");
|
|
16
|
-
else if (ch == "|") return ret("keyword", "separator");
|
|
17
|
-
else if (ch.match(/[\(\)\[\]\-\.,\+\?>]/)) return ret(null, ch);//if(ch === ">") return ret(null, "endtag"); else
|
|
18
|
-
else if (ch.match(/[\[\]]/)) return ret("rule", ch);
|
|
19
|
-
else if (ch == "\"" || ch == "'") {
|
|
20
|
-
state.tokenize = tokenString(ch);
|
|
21
|
-
return state.tokenize(stream, state);
|
|
22
|
-
} else if (stream.eatWhile(/[a-zA-Z\?\+\d]/)) {
|
|
23
|
-
var sc = stream.current();
|
|
24
|
-
if( sc.substr(sc.length-1,sc.length).match(/\?|\+/) !== null )stream.backUp(1);
|
|
25
|
-
return ret("tag", "tag");
|
|
26
|
-
} else if (ch == "%" || ch == "*" ) return ret("number", "number");
|
|
27
|
-
else {
|
|
28
|
-
stream.eatWhile(/[\w\\\-_%.{,]/);
|
|
29
|
-
return ret(null, null);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function tokenSGMLComment(stream, state) {
|
|
34
|
-
var dashes = 0, ch;
|
|
35
|
-
while ((ch = stream.next()) != null) {
|
|
36
|
-
if (dashes >= 2 && ch == ">") {
|
|
37
|
-
state.tokenize = tokenBase;
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
dashes = (ch == "-") ? dashes + 1 : 0;
|
|
41
|
-
}
|
|
42
|
-
return ret("comment", "comment");
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function tokenString(quote) {
|
|
46
|
-
return function(stream, state) {
|
|
47
|
-
var escaped = false, ch;
|
|
48
|
-
while ((ch = stream.next()) != null) {
|
|
49
|
-
if (ch == quote && !escaped) {
|
|
50
|
-
state.tokenize = tokenBase;
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
escaped = !escaped && ch == "\\";
|
|
54
|
-
}
|
|
55
|
-
return ret("string", "tag");
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function inBlock(style, terminator) {
|
|
60
|
-
return function(stream, state) {
|
|
61
|
-
while (!stream.eol()) {
|
|
62
|
-
if (stream.match(terminator)) {
|
|
63
|
-
state.tokenize = tokenBase;
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
stream.next();
|
|
67
|
-
}
|
|
68
|
-
return style;
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const dtd = {
|
|
73
|
-
name: "dtd",
|
|
74
|
-
startState: function() {
|
|
75
|
-
return {tokenize: tokenBase,
|
|
76
|
-
baseIndent: 0,
|
|
77
|
-
stack: []};
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
token: function(stream, state) {
|
|
81
|
-
if (stream.eatSpace()) return null;
|
|
82
|
-
var style = state.tokenize(stream, state);
|
|
83
|
-
|
|
84
|
-
var context = state.stack[state.stack.length-1];
|
|
85
|
-
if (stream.current() == "[" || type === "doindent" || type == "[") state.stack.push("rule");
|
|
86
|
-
else if (type === "endtag") state.stack[state.stack.length-1] = "endtag";
|
|
87
|
-
else if (stream.current() == "]" || type == "]" || (type == ">" && context == "rule")) state.stack.pop();
|
|
88
|
-
else if (type == "[") state.stack.push("[");
|
|
89
|
-
return style;
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
indent: function(state, textAfter, cx) {
|
|
93
|
-
var n = state.stack.length;
|
|
94
|
-
|
|
95
|
-
if( textAfter.charAt(0) === ']' )n--;
|
|
96
|
-
else if(textAfter.substr(textAfter.length-1, textAfter.length) === ">"){
|
|
97
|
-
if(textAfter.substr(0,1) === "<") ;
|
|
98
|
-
else if( type == "doindent" && textAfter.length > 1 ) ;
|
|
99
|
-
else if( type == "doindent")n--;
|
|
100
|
-
else if( type == ">" && textAfter.length > 1) ;
|
|
101
|
-
else if( type == "tag" && textAfter !== ">") ;
|
|
102
|
-
else if( type == "tag" && state.stack[state.stack.length-1] == "rule")n--;
|
|
103
|
-
else if( type == "tag")n++;
|
|
104
|
-
else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule" && type === ">")n--;
|
|
105
|
-
else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule") ;
|
|
106
|
-
else if( textAfter.substr(0,1) !== "<" && textAfter.substr(0,1) === ">" )n=n-1;
|
|
107
|
-
else if( textAfter === ">") ;
|
|
108
|
-
else n=n-1;
|
|
109
|
-
//over rule them all
|
|
110
|
-
if(type == null || type == "]")n--;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return state.baseIndent + n * cx.unit;
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
languageData: {
|
|
117
|
-
indentOnInput: /^\s*[\]>]$/
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export { dtd };
|