@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.
Files changed (266) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/apl-B2DGVGxc.js +76 -0
  3. package/dist/asciiarmor-2LVJmxlE.js +34 -0
  4. package/dist/asn1-jKiBa2Ya.js +95 -0
  5. package/dist/asterisk-DS281yxp.js +271 -0
  6. package/dist/brainfuck-C_p9pTT8.js +34 -0
  7. package/dist/clike-BUuHEmgZ.js +620 -0
  8. package/dist/clojure-CCKyeQKf.js +800 -0
  9. package/dist/cmake-CuaCgAKt.js +28 -0
  10. package/dist/cobol-BlTKFDRj.js +72 -0
  11. package/dist/coffeescript-BVCvwO8I.js +179 -0
  12. package/dist/commonlisp-D_kxz07b.js +75 -0
  13. package/dist/crystal-D309uH6_.js +217 -0
  14. package/dist/css-bIlmDBTK.js +1560 -0
  15. package/dist/cypher-BMq4Fwjl.js +68 -0
  16. package/dist/d-BZcgY6La.js +127 -0
  17. package/dist/diff-Cg9d_RX2.js +18 -0
  18. package/dist/{assets/dockerfile-D0MivFIF.js → dockerfile-DIy8NleC.js} +36 -41
  19. package/dist/dtd-CtLokQ-U.js +84 -0
  20. package/dist/dylan-QYeExnWK.js +234 -0
  21. package/dist/ebnf-DUPDuY4r.js +78 -0
  22. package/dist/ecl-CiXN-g_D.js +121 -0
  23. package/dist/eiffel-yQhjl4T1.js +110 -0
  24. package/dist/elm-CNT9vbN0.js +108 -0
  25. package/dist/erlang-CFOYdy9e.js +487 -0
  26. package/dist/factor-DDOC7X6P.js +65 -0
  27. package/dist/fcl-CPC2WYrI.js +103 -0
  28. package/dist/forth-BmxRyE9S.js +60 -0
  29. package/dist/fortran-9bvPyrOW.js +442 -0
  30. package/dist/framework.js +288 -29
  31. package/dist/gas-BdfkXJT_.js +183 -0
  32. package/dist/gherkin-CJuwpceU.js +34 -0
  33. package/dist/groovy-DZeT_VM-.js +146 -0
  34. package/dist/haskell-Bvt3Qq1t.js +375 -0
  35. package/dist/haxe-70NVW1pR.js +359 -0
  36. package/dist/http-D9LttvKF.js +44 -0
  37. package/dist/idl-B6TRFYjl.js +947 -0
  38. package/dist/{assets/index-C7zlEJy8.js → index-B83didIY.js} +229 -302
  39. package/dist/{assets/index-BT8o9-M5.js → index-BKR3ecN5.js} +267 -386
  40. package/dist/{assets/index-B1srGfDb.js → index-BN-_cebP.js} +119 -165
  41. package/dist/index-BUHouW8T.js +249 -0
  42. package/dist/index-BW3krAiY.js +341 -0
  43. package/dist/index-C6tcHNVl.js +75 -0
  44. package/dist/index-CGyGGihY.js +538 -0
  45. package/dist/{assets/index-DMTL7O1s.js → index-CnQ56kqq.js} +570 -586
  46. package/dist/index-Cv6c_1IG.js +71 -0
  47. package/dist/{assets/index-CeeaNa4F.js → index-CxMfHOup.js} +136 -167
  48. package/dist/index-DRL7VovM.js +308 -0
  49. package/dist/index-Dfcy8w9c.js +58 -0
  50. package/dist/{assets/index-CtmpJVwa.js → index-DyGIijU2.js} +270 -312
  51. package/dist/index-Ek7_XgGk.js +98 -0
  52. package/dist/{assets/index-Bv_z_qRq.js → index-TSGli7LX.js} +121 -124
  53. package/dist/index-UnPPbmRc.js +145659 -0
  54. package/dist/{assets/index-BKF-A58l.js → index-xFQltarK.js} +79 -92
  55. package/dist/index.css +9 -18
  56. package/dist/javascript-WMWNx-Vj.js +690 -0
  57. package/dist/jinja2-DnB6dQmV.js +154 -0
  58. package/dist/julia-DpvXAuO6.js +241 -0
  59. package/dist/livescript-CanGTf8u.js +272 -0
  60. package/dist/lua-XplVlWi_.js +217 -0
  61. package/dist/mathematica-jaRHnSxC.js +35 -0
  62. package/dist/mbox-BctzC1hL.js +76 -0
  63. package/dist/mirc-CFBPAOaF.js +72 -0
  64. package/dist/mllike-BSnXJBGA.js +272 -0
  65. package/dist/modelica-vUgVs--1.js +93 -0
  66. package/dist/mscgen-Cpl0NYLN.js +104 -0
  67. package/dist/mumps-CQoS1kWX.js +25 -0
  68. package/dist/nginx-zDPm3Z74.js +89 -0
  69. package/dist/nsis-fePjrhq7.js +62 -0
  70. package/dist/ntriples-CsNjv2QF.js +79 -0
  71. package/dist/octave-C8PmmSRH.js +143 -0
  72. package/dist/oz-Ce8aN8oE.js +151 -0
  73. package/dist/pascal-De0D6mP7.js +77 -0
  74. package/dist/perl-B4bSCe1C.js +915 -0
  75. package/dist/pig-D24Z8EXi.js +54 -0
  76. package/dist/powershell-DkYVfTzP.js +249 -0
  77. package/dist/properties-Dn9wna3M.js +26 -0
  78. package/dist/protobuf-BPIjwpzm.js +49 -0
  79. package/dist/pug-BqUR2bBq.js +248 -0
  80. package/dist/puppet-nyd4dhjf.js +45 -0
  81. package/dist/python-B5QdSKoL.js +313 -0
  82. package/dist/q-DXjKs-tC.js +83 -0
  83. package/dist/r-LKEuhEGI.js +104 -0
  84. package/dist/rpm-IznJm2Xc.js +57 -0
  85. package/dist/ruby-CcYfvIk6.js +228 -0
  86. package/dist/sas-7E8yHoCW.js +105 -0
  87. package/dist/scheme-DjibxsNh.js +124 -0
  88. package/dist/shell-C0C2sNA_.js +182 -0
  89. package/dist/sieve-Bwz7vjP5.js +72 -0
  90. package/dist/simple-mode-B0dvCdAA.js +89 -0
  91. package/dist/smalltalk-Bhddl2pB.js +48 -0
  92. package/dist/solr-BNlsLglM.js +41 -0
  93. package/dist/sparql-FarWu_Gb.js +197 -0
  94. package/dist/spreadsheet-C-cy4P5N.js +49 -0
  95. package/dist/sql-mMre1Bo3.js +282 -0
  96. package/dist/stex-92raWT1r.js +129 -0
  97. package/dist/stylus-CAdqWld3.js +250 -0
  98. package/dist/swift-DSxqR9R6.js +230 -0
  99. package/dist/tcl-xfoLljhY.js +81 -0
  100. package/dist/textile-D1AWE-pc.js +295 -0
  101. package/dist/tiddlywiki-5wqsXtSk.js +155 -0
  102. package/dist/tiki-__Kn3CeS.js +181 -0
  103. package/dist/toml-BHiuTcfn.js +49 -0
  104. package/dist/troff-D2UO-fKf.js +35 -0
  105. package/dist/ttcn-Bsa4sfRm.js +123 -0
  106. package/dist/ttcn-cfg-Bac_acMi.js +88 -0
  107. package/dist/turtle-xwJUxoPV.js +80 -0
  108. package/dist/vb-c2kQGd6-.js +74 -0
  109. package/dist/vbscript-Dz1TtKsy.js +324 -0
  110. package/dist/velocity-DJd0pTTC.js +96 -0
  111. package/dist/verilog-C4VGD9n1.js +263 -0
  112. package/dist/vhdl-T9HkrbI2.js +106 -0
  113. package/dist/webidl-CjfDENEo.js +155 -0
  114. package/dist/xquery-BUQdORAS.js +422 -0
  115. package/dist/yacas-C0absKBh.js +73 -0
  116. package/dist/z80-C8rPtw-0.js +61 -0
  117. package/package.json +4 -4
  118. package/dist/assets/apl-NdZ6-T1z.js +0 -142
  119. package/dist/assets/asciiarmor-CmJEbAuq.js +0 -56
  120. package/dist/assets/asn1-Ctc8K72v.js +0 -192
  121. package/dist/assets/asterisk-D6r__RMF.js +0 -187
  122. package/dist/assets/brainfuck-COwWCBpq.js +0 -70
  123. package/dist/assets/clike-C-PtfL50.js +0 -1019
  124. package/dist/assets/clojure-C2XPrGCa.js +0 -274
  125. package/dist/assets/cmake-BGrEgXCL.js +0 -81
  126. package/dist/assets/cobol-DShPmpZe.js +0 -234
  127. package/dist/assets/coffeescript-BG8vTfSz.js +0 -329
  128. package/dist/assets/commonlisp-8oE2EpEe.js +0 -108
  129. package/dist/assets/core-api-BMLS9FrT.js +0 -8288
  130. package/dist/assets/core-composables-DYxpIWyY.js +0 -1799
  131. package/dist/assets/core-constants-DiKDBbnD.js +0 -83
  132. package/dist/assets/core-directives-QhJx9kWh.js +0 -41
  133. package/dist/assets/core-interceptors-CSjUvxQ0.js +0 -78
  134. package/dist/assets/core-plugins-wv2bDZ0l.js +0 -4919
  135. package/dist/assets/core-services-CAfJRsjs.js +0 -4
  136. package/dist/assets/core-utilities-BTktq_a-.js +0 -33
  137. package/dist/assets/crystal--rIRMl16.js +0 -419
  138. package/dist/assets/css/core-directives-FL4vIIkN.css +0 -73
  139. package/dist/assets/css/fonts-M1mtyV8L.css +0 -305
  140. package/dist/assets/css/icons-css-DbCVsovz.css +0 -41
  141. package/dist/assets/css/shared-components-bnLHdCtf.css +0 -429
  142. package/dist/assets/css/shared-modules-CNOICmYQ.css +0 -45
  143. package/dist/assets/css/styles-C62nDZwV.css +0 -4096
  144. package/dist/assets/css/ui-app-Bh9hmlIB.css +0 -1287
  145. package/dist/assets/css/ui-content-B29jsmK7.css +0 -1187
  146. package/dist/assets/css/ui-controls-CRtfFczw.css +0 -387
  147. package/dist/assets/css/ui-data-CYLxfdUa.css +0 -1555
  148. package/dist/assets/css/ui-form-C3WrWfVl.css +0 -71
  149. package/dist/assets/css/ui-form-fields-DOtHhDeM.css +0 -1360
  150. package/dist/assets/css/ui-helpers-bOoNv5dS.css +0 -37
  151. package/dist/assets/css/ui-indicators-CybQnCoU.css +0 -628
  152. package/dist/assets/css/ui-layout-DyGKgizy.css +0 -251
  153. package/dist/assets/css/ui-media-TWYep8js.css +0 -298
  154. package/dist/assets/css/ui-media-advanced-BGxy3VSB.css +0 -183
  155. package/dist/assets/css/ui-navigation-DcPRn8SB.css +0 -1693
  156. package/dist/assets/css-C_ZeEwz2.js +0 -847
  157. package/dist/assets/cypher-Bayei42D.js +0 -122
  158. package/dist/assets/d-B0hhz6be.js +0 -205
  159. package/dist/assets/diff-DQutOIXs.js +0 -30
  160. package/dist/assets/dtd-C1CeYVnM.js +0 -121
  161. package/dist/assets/dylan-Dm9-uD-A.js +0 -337
  162. package/dist/assets/ebnf-jWG_1Yly.js +0 -151
  163. package/dist/assets/ecl-CgJPA6z9.js +0 -190
  164. package/dist/assets/eiffel-lj7uLahq.js +0 -146
  165. package/dist/assets/elm-Cz7o1ijk.js +0 -230
  166. package/dist/assets/erlang-CyL5QOyR.js +0 -581
  167. package/dist/assets/factor-BVWHwYpu.js +0 -65
  168. package/dist/assets/fcl-DiozYjc8.js +0 -154
  169. package/dist/assets/forth-B7vn5ze0.js +0 -164
  170. package/dist/assets/fortran-D2XNEnBT.js +0 -172
  171. package/dist/assets/gas-B_Tj57Ve.js +0 -343
  172. package/dist/assets/gherkin-CJ6Qk4EZ.js +0 -147
  173. package/dist/assets/groovy-ioGz2WSV.js +0 -228
  174. package/dist/assets/haskell-BHnm1B83.js +0 -239
  175. package/dist/assets/haxe-Bn6Yo6N3.js +0 -490
  176. package/dist/assets/http-BOd5SYCT.js +0 -89
  177. package/dist/assets/idl-FSFk8_xX.js +0 -274
  178. package/dist/assets/index--5fKpGeN.js +0 -792
  179. package/dist/assets/index-0lME64YH.js +0 -342
  180. package/dist/assets/index-B6Ip0FgO.js +0 -437
  181. package/dist/assets/index-BmV05E5M.js +0 -479
  182. package/dist/assets/index-C6MavZDA.js +0 -131
  183. package/dist/assets/index-CwKpgcYl.js +0 -85
  184. package/dist/assets/index-DRUmDL0J.js +0 -59
  185. package/dist/assets/index-DgFC-M9G.js +0 -96
  186. package/dist/assets/javascript-DGrAs70C.js +0 -922
  187. package/dist/assets/jinja2-D9k5QrXv.js +0 -171
  188. package/dist/assets/julia-DM42tOPB.js +0 -369
  189. package/dist/assets/livescript-Dci8HnOi.js +0 -259
  190. package/dist/assets/lua-CByQu4v6.js +0 -137
  191. package/dist/assets/lucide-icons-af0BY3bi.js +0 -34555
  192. package/dist/assets/mathematica-Dkv0uCYF.js +0 -153
  193. package/dist/assets/mbox-CYTvs5kC.js +0 -114
  194. package/dist/assets/mirc-DpgP3GCo.js +0 -176
  195. package/dist/assets/mllike-C6tNn2Yt.js +0 -343
  196. package/dist/assets/modelica-CR6hTSce.js +0 -192
  197. package/dist/assets/mscgen-D0GXtzMS.js +0 -149
  198. package/dist/assets/mumps-Bf1EyDa6.js +0 -129
  199. package/dist/assets/nginx-By9Phklj.js +0 -163
  200. package/dist/assets/nsis-B5ggMLQ9.js +0 -80
  201. package/dist/assets/ntriples-C7VJ7pnm.js +0 -141
  202. package/dist/assets/octave-6yR_ix15.js +0 -112
  203. package/dist/assets/oz-CEUnktiQ.js +0 -235
  204. package/dist/assets/pascal-Dksf1EyF.js +0 -124
  205. package/dist/assets/perl-B99DUQQt.js +0 -819
  206. package/dist/assets/pig-DFeDRta6.js +0 -149
  207. package/dist/assets/powershell-DhwsNWMx.js +0 -381
  208. package/dist/assets/properties-o21uErwC.js +0 -62
  209. package/dist/assets/protobuf-YxlANsmD.js +0 -54
  210. package/dist/assets/pug-bUgjeODZ.js +0 -504
  211. package/dist/assets/puppet-B8WICGYE.js +0 -205
  212. package/dist/assets/python-D3FFx1Id.js +0 -389
  213. package/dist/assets/q-D2Hjhl2C.js +0 -123
  214. package/dist/assets/r-D73k5lac.js +0 -174
  215. package/dist/assets/rpm-Duv_WH0z.js +0 -89
  216. package/dist/assets/ruby-DGCVqZDt.js +0 -287
  217. package/dist/assets/sas-XjPv1Vy5.js +0 -268
  218. package/dist/assets/scheme-DeaA28vt.js +0 -263
  219. package/dist/assets/shared-components-CfAt2hC6.js +0 -1501
  220. package/dist/assets/shared-composables-v9NkNuAe.js +0 -35
  221. package/dist/assets/shared-modules-CDP-H5ZB.js +0 -3588
  222. package/dist/assets/shared-pages-BGRRA5WB.js +0 -20
  223. package/dist/assets/shell-Bx6QZTgx.js +0 -145
  224. package/dist/assets/sieve-CWCD62sW.js +0 -178
  225. package/dist/assets/simple-mode-BAO9cD7H.js +0 -136
  226. package/dist/assets/smalltalk-DSQbF4MF.js +0 -153
  227. package/dist/assets/solr-v_XRf31C.js +0 -80
  228. package/dist/assets/sparql-BrfDqf0-.js +0 -170
  229. package/dist/assets/spreadsheet-Csn84Pef.js +0 -98
  230. package/dist/assets/sql-D4utlq1l.js +0 -480
  231. package/dist/assets/stex-DBkktma-.js +0 -246
  232. package/dist/assets/stylus-ByG-Fd6f.js +0 -750
  233. package/dist/assets/swift-CHbTprt3.js +0 -202
  234. package/dist/assets/tcl-BRlMUELr.js +0 -125
  235. package/dist/assets/textile-CqfTUjd4.js +0 -441
  236. package/dist/assets/tiddlywiki-BrsoM8KB.js +0 -278
  237. package/dist/assets/tiki-D-ivWPkc.js +0 -289
  238. package/dist/assets/toml-t_IhJu83.js +0 -75
  239. package/dist/assets/troff-DckGF2AE.js +0 -64
  240. package/dist/assets/ttcn-B8TAFbRR.js +0 -253
  241. package/dist/assets/ttcn-cfg-NHh25oCM.js +0 -197
  242. package/dist/assets/turtle-D9Js0BlL.js +0 -141
  243. package/dist/assets/ui-app-D31Pr1WY.js +0 -1993
  244. package/dist/assets/ui-content-B7SxH8y9.js +0 -52887
  245. package/dist/assets/ui-controls-nmDJYLmC.js +0 -348
  246. package/dist/assets/ui-data-Ci3b1ye0.js +0 -22901
  247. package/dist/assets/ui-form-Cs5ooOo7.js +0 -159
  248. package/dist/assets/ui-form-fields-DFQi31jT.js +0 -40575
  249. package/dist/assets/ui-helpers-CF-EUlOg.js +0 -1736
  250. package/dist/assets/ui-indicators-mIQeEqha.js +0 -199
  251. package/dist/assets/ui-layout-v2XBQky3.js +0 -320
  252. package/dist/assets/ui-media-WWYrwmZw.js +0 -1259
  253. package/dist/assets/ui-media-advanced-T8ibi153.js +0 -492
  254. package/dist/assets/ui-modals-BdZXzI85.js +0 -2
  255. package/dist/assets/ui-navigation-BtHa6ovW.js +0 -24269
  256. package/dist/assets/utils-DZK5fu48.js +0 -17216
  257. package/dist/assets/vb-CbIGLrpY.js +0 -249
  258. package/dist/assets/vbscript-8ANWle9n.js +0 -320
  259. package/dist/assets/velocity-D6hz3Hzw.js +0 -186
  260. package/dist/assets/verilog-DIV442at.js +0 -565
  261. package/dist/assets/vhdl-BlTiZo_v.js +0 -174
  262. package/dist/assets/vueuse-CTQm4Zh0.js +0 -9308
  263. package/dist/assets/webidl-Cp3tcqdk.js +0 -179
  264. package/dist/assets/xquery-Dd4TBzXv.js +0 -411
  265. package/dist/assets/yacas-DQ1WucF0.js +0 -182
  266. package/dist/assets/z80-P1j44jDI.js +0 -102
@@ -1,289 +0,0 @@
1
- function inBlock(style, terminator, returnTokenizer) {
2
- return function(stream, state) {
3
- while (!stream.eol()) {
4
- if (stream.match(terminator)) {
5
- state.tokenize = inText;
6
- break;
7
- }
8
- stream.next();
9
- }
10
-
11
- if (returnTokenizer) state.tokenize = returnTokenizer;
12
-
13
- return style;
14
- };
15
- }
16
-
17
- function inLine(style) {
18
- return function(stream, state) {
19
- while(!stream.eol()) {
20
- stream.next();
21
- }
22
- state.tokenize = inText;
23
- return style;
24
- };
25
- }
26
-
27
- function inText(stream, state) {
28
- function chain(parser) {
29
- state.tokenize = parser;
30
- return parser(stream, state);
31
- }
32
-
33
- var sol = stream.sol();
34
- var ch = stream.next();
35
-
36
- //non start of line
37
- switch (ch) { //switch is generally much faster than if, so it is used here
38
- case "{": //plugin
39
- stream.eat("/");
40
- stream.eatSpace();
41
- stream.eatWhile(/[^\s\u00a0=\"\'\/?(}]/);
42
- state.tokenize = inPlugin;
43
- return "tag";
44
- case "_": //bold
45
- if (stream.eat("_"))
46
- return chain(inBlock("strong", "__", inText));
47
- break;
48
- case "'": //italics
49
- if (stream.eat("'"))
50
- return chain(inBlock("em", "''", inText));
51
- break;
52
- case "(":// Wiki Link
53
- if (stream.eat("("))
54
- return chain(inBlock("link", "))", inText));
55
- break;
56
- case "[":// Weblink
57
- return chain(inBlock("url", "]", inText));
58
- case "|": //table
59
- if (stream.eat("|"))
60
- return chain(inBlock("comment", "||"));
61
- break;
62
- case "-":
63
- if (stream.eat("=")) {//titleBar
64
- return chain(inBlock("header string", "=-", inText));
65
- } else if (stream.eat("-")) {//deleted
66
- return chain(inBlock("error tw-deleted", "--", inText));
67
- }
68
- break;
69
- case "=": //underline
70
- if (stream.match("=="))
71
- return chain(inBlock("tw-underline", "===", inText));
72
- break;
73
- case ":":
74
- if (stream.eat(":"))
75
- return chain(inBlock("comment", "::"));
76
- break;
77
- case "^": //box
78
- return chain(inBlock("tw-box", "^"));
79
- case "~": //np
80
- if (stream.match("np~"))
81
- return chain(inBlock("meta", "~/np~"));
82
- break;
83
- }
84
-
85
- //start of line types
86
- if (sol) {
87
- switch (ch) {
88
- case "!": //header at start of line
89
- if (stream.match('!!!!!')) {
90
- return chain(inLine("header string"));
91
- } else if (stream.match('!!!!')) {
92
- return chain(inLine("header string"));
93
- } else if (stream.match('!!!')) {
94
- return chain(inLine("header string"));
95
- } else if (stream.match('!!')) {
96
- return chain(inLine("header string"));
97
- } else {
98
- return chain(inLine("header string"));
99
- }
100
- case "*": //unordered list line item, or <li /> at start of line
101
- case "#": //ordered list line item, or <li /> at start of line
102
- case "+": //ordered list line item, or <li /> at start of line
103
- return chain(inLine("tw-listitem bracket"));
104
- }
105
- }
106
-
107
- //stream.eatWhile(/[&{]/); was eating up plugins, turned off to act less like html and more like tiki
108
- return null;
109
- }
110
-
111
- // Return variables for tokenizers
112
- var pluginName, type;
113
- function inPlugin(stream, state) {
114
- var ch = stream.next();
115
- var peek = stream.peek();
116
-
117
- if (ch == "}") {
118
- state.tokenize = inText;
119
- //type = ch == ")" ? "endPlugin" : "selfclosePlugin"; inPlugin
120
- return "tag";
121
- } else if (ch == "(" || ch == ")") {
122
- return "bracket";
123
- } else if (ch == "=") {
124
- type = "equals";
125
-
126
- if (peek == ">") {
127
- stream.next();
128
- peek = stream.peek();
129
- }
130
-
131
- //here we detect values directly after equal character with no quotes
132
- if (!/[\'\"]/.test(peek)) {
133
- state.tokenize = inAttributeNoQuote();
134
- }
135
- //end detect values
136
-
137
- return "operator";
138
- } else if (/[\'\"]/.test(ch)) {
139
- state.tokenize = inAttribute(ch);
140
- return state.tokenize(stream, state);
141
- } else {
142
- stream.eatWhile(/[^\s\u00a0=\"\'\/?]/);
143
- return "keyword";
144
- }
145
- }
146
-
147
- function inAttribute(quote) {
148
- return function(stream, state) {
149
- while (!stream.eol()) {
150
- if (stream.next() == quote) {
151
- state.tokenize = inPlugin;
152
- break;
153
- }
154
- }
155
- return "string";
156
- };
157
- }
158
-
159
- function inAttributeNoQuote() {
160
- return function(stream, state) {
161
- while (!stream.eol()) {
162
- var ch = stream.next();
163
- var peek = stream.peek();
164
- if (ch == " " || ch == "," || /[ )}]/.test(peek)) {
165
- state.tokenize = inPlugin;
166
- break;
167
- }
168
- }
169
- return "string";
170
- };
171
- }
172
-
173
- var curState, setStyle;
174
- function pass() {
175
- for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]);
176
- }
177
-
178
- function cont() {
179
- pass.apply(null, arguments);
180
- return true;
181
- }
182
-
183
- function pushContext(pluginName, startOfLine) {
184
- var noIndent = curState.context && curState.context.noIndent;
185
- curState.context = {
186
- prev: curState.context,
187
- pluginName: pluginName,
188
- indent: curState.indented,
189
- startOfLine: startOfLine,
190
- noIndent: noIndent
191
- };
192
- }
193
-
194
- function popContext() {
195
- if (curState.context) curState.context = curState.context.prev;
196
- }
197
-
198
- function element(type) {
199
- if (type == "openPlugin") {curState.pluginName = pluginName; return cont(attributes, endplugin(curState.startOfLine));}
200
- else if (type == "closePlugin") {
201
- var err = false;
202
- if (curState.context) {
203
- err = curState.context.pluginName != pluginName;
204
- popContext();
205
- } else {
206
- err = true;
207
- }
208
- if (err) setStyle = "error";
209
- return cont(endcloseplugin(err));
210
- }
211
- else if (type == "string") {
212
- if (!curState.context || curState.context.name != "!cdata") pushContext("!cdata");
213
- if (curState.tokenize == inText) popContext();
214
- return cont();
215
- }
216
- else return cont();
217
- }
218
-
219
- function endplugin(startOfLine) {
220
- return function(type) {
221
- if (
222
- type == "selfclosePlugin" ||
223
- type == "endPlugin"
224
- )
225
- return cont();
226
- if (type == "endPlugin") {pushContext(curState.pluginName, startOfLine); return cont();}
227
- return cont();
228
- };
229
- }
230
-
231
- function endcloseplugin(err) {
232
- return function(type) {
233
- if (err) setStyle = "error";
234
- if (type == "endPlugin") return cont();
235
- return pass();
236
- };
237
- }
238
-
239
- function attributes(type) {
240
- if (type == "keyword") {setStyle = "attribute"; return cont(attributes);}
241
- if (type == "equals") return cont(attvalue, attributes);
242
- return pass();
243
- }
244
- function attvalue(type) {
245
- if (type == "keyword") {setStyle = "string"; return cont();}
246
- if (type == "string") return cont(attvaluemaybe);
247
- return pass();
248
- }
249
- function attvaluemaybe(type) {
250
- if (type == "string") return cont(attvaluemaybe);
251
- else return pass();
252
- }
253
- const tiki = {
254
- name: "tiki",
255
- startState: function() {
256
- return {tokenize: inText, cc: [], indented: 0, startOfLine: true, pluginName: null, context: null};
257
- },
258
- token: function(stream, state) {
259
- if (stream.sol()) {
260
- state.startOfLine = true;
261
- state.indented = stream.indentation();
262
- }
263
- if (stream.eatSpace()) return null;
264
-
265
- setStyle = type = pluginName = null;
266
- var style = state.tokenize(stream, state);
267
- if ((style || type) && style != "comment") {
268
- curState = state;
269
- while (true) {
270
- var comb = state.cc.pop() || element;
271
- if (comb(type || style)) break;
272
- }
273
- }
274
- state.startOfLine = false;
275
- return setStyle || style;
276
- },
277
- indent: function(state, textAfter, cx) {
278
- var context = state.context;
279
- if (context && context.noIndent) return 0;
280
- if (context && /^{\//.test(textAfter))
281
- context = context.prev;
282
- while (context && !context.startOfLine)
283
- context = context.prev;
284
- if (context) return context.indent + cx.unit;
285
- else return 0;
286
- }
287
- };
288
-
289
- export { tiki };
@@ -1,75 +0,0 @@
1
- const toml = {
2
- name: "toml",
3
- startState: function () {
4
- return {
5
- inString: false,
6
- stringType: "",
7
- lhs: true,
8
- inArray: 0
9
- };
10
- },
11
- token: function (stream, state) {
12
- //check for state changes
13
- if (!state.inString && ((stream.peek() == '"') || (stream.peek() == "'"))) {
14
- state.stringType = stream.peek();
15
- stream.next(); // Skip quote
16
- state.inString = true; // Update state
17
- }
18
- if (stream.sol() && state.inArray === 0) {
19
- state.lhs = true;
20
- }
21
- //return state
22
- if (state.inString) {
23
- while (state.inString && !stream.eol()) {
24
- if (stream.peek() === state.stringType) {
25
- stream.next(); // Skip quote
26
- state.inString = false; // Clear flag
27
- } else if (stream.peek() === '\\') {
28
- stream.next();
29
- stream.next();
30
- } else {
31
- stream.match(/^.[^\\\"\']*/);
32
- }
33
- }
34
- return state.lhs ? "property" : "string"; // Token style
35
- } else if (state.inArray && stream.peek() === ']') {
36
- stream.next();
37
- state.inArray--;
38
- return 'bracket';
39
- } else if (state.lhs && stream.peek() === '[' && stream.skipTo(']')) {
40
- stream.next();//skip closing ]
41
- // array of objects has an extra open & close []
42
- if (stream.peek() === ']') stream.next();
43
- return "atom";
44
- } else if (stream.peek() === "#") {
45
- stream.skipToEnd();
46
- return "comment";
47
- } else if (stream.eatSpace()) {
48
- return null;
49
- } else if (state.lhs && stream.eatWhile(function (c) { return c != '=' && c != ' '; })) {
50
- return "property";
51
- } else if (state.lhs && stream.peek() === "=") {
52
- stream.next();
53
- state.lhs = false;
54
- return null;
55
- } else if (!state.lhs && stream.match(/^\d\d\d\d[\d\-\:\.T]*Z/)) {
56
- return 'atom'; //date
57
- } else if (!state.lhs && (stream.match('true') || stream.match('false'))) {
58
- return 'atom';
59
- } else if (!state.lhs && stream.peek() === '[') {
60
- state.inArray++;
61
- stream.next();
62
- return 'bracket';
63
- } else if (!state.lhs && stream.match(/^\-?\d+(?:\.\d+)?/)) {
64
- return 'number';
65
- } else if (!stream.eatSpace()) {
66
- stream.next();
67
- }
68
- return null;
69
- },
70
- languageData: {
71
- commentTokens: { line: '#' },
72
- },
73
- };
74
-
75
- export { toml };
@@ -1,64 +0,0 @@
1
- var words = {};
2
-
3
- function tokenBase(stream) {
4
- if (stream.eatSpace()) return null;
5
-
6
- var sol = stream.sol();
7
- var ch = stream.next();
8
-
9
- if (ch === '\\') {
10
- if (stream.match('fB') || stream.match('fR') || stream.match('fI') ||
11
- stream.match('u') || stream.match('d') ||
12
- stream.match('%') || stream.match('&')) {
13
- return 'string';
14
- }
15
- if (stream.match('m[')) {
16
- stream.skipTo(']');
17
- stream.next();
18
- return 'string';
19
- }
20
- if (stream.match('s+') || stream.match('s-')) {
21
- stream.eatWhile(/[\d-]/);
22
- return 'string';
23
- }
24
- if (stream.match('\(') || stream.match('*\(')) {
25
- stream.eatWhile(/[\w-]/);
26
- return 'string';
27
- }
28
- return 'string';
29
- }
30
- if (sol && (ch === '.' || ch === '\'')) {
31
- if (stream.eat('\\') && stream.eat('\"')) {
32
- stream.skipToEnd();
33
- return 'comment';
34
- }
35
- }
36
- if (sol && ch === '.') {
37
- if (stream.match('B ') || stream.match('I ') || stream.match('R ')) {
38
- return 'attribute';
39
- }
40
- if (stream.match('TH ') || stream.match('SH ') || stream.match('SS ') || stream.match('HP ')) {
41
- stream.skipToEnd();
42
- return 'quote';
43
- }
44
- if ((stream.match(/[A-Z]/) && stream.match(/[A-Z]/)) || (stream.match(/[a-z]/) && stream.match(/[a-z]/))) {
45
- return 'attribute';
46
- }
47
- }
48
- stream.eatWhile(/[\w-]/);
49
- var cur = stream.current();
50
- return words.hasOwnProperty(cur) ? words[cur] : null;
51
- }
52
-
53
- function tokenize(stream, state) {
54
- return (state.tokens[0] || tokenBase) (stream, state);
55
- }
56
- const troff = {
57
- name: "troff",
58
- startState: function() {return {tokens:[]};},
59
- token: function(stream, state) {
60
- return tokenize(stream, state);
61
- }
62
- };
63
-
64
- export { troff };
@@ -1,253 +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
- const parserConfig = {
8
- keywords: words("activate address alive all alt altstep and and4b any" +
9
- " break case component const continue control deactivate" +
10
- " display do else encode enumerated except exception" +
11
- " execute extends extension external for from function" +
12
- " goto group if import in infinity inout interleave" +
13
- " label language length log match message mixed mod" +
14
- " modifies module modulepar mtc noblock not not4b nowait" +
15
- " of on optional or or4b out override param pattern port" +
16
- " procedure record recursive rem repeat return runs select" +
17
- " self sender set signature system template testcase to" +
18
- " type union value valueof var variant while with xor xor4b"),
19
- builtin: words("bit2hex bit2int bit2oct bit2str char2int char2oct encvalue" +
20
- " decomp decvalue float2int float2str hex2bit hex2int" +
21
- " hex2oct hex2str int2bit int2char int2float int2hex" +
22
- " int2oct int2str int2unichar isbound ischosen ispresent" +
23
- " isvalue lengthof log2str oct2bit oct2char oct2hex oct2int" +
24
- " oct2str regexp replace rnd sizeof str2bit str2float" +
25
- " str2hex str2int str2oct substr unichar2int unichar2char" +
26
- " enum2int"),
27
- types: words("anytype bitstring boolean char charstring default float" +
28
- " hexstring integer objid octetstring universal verdicttype timer"),
29
- timerOps: words("read running start stop timeout"),
30
- portOps: words("call catch check clear getcall getreply halt raise receive" +
31
- " reply send trigger"),
32
- configOps: words("create connect disconnect done kill killed map unmap"),
33
- verdictOps: words("getverdict setverdict"),
34
- sutOps: words("action"),
35
- functionOps: words("apply derefers refers"),
36
-
37
- verdictConsts: words("error fail inconc none pass"),
38
- booleanConsts: words("true false"),
39
- otherConsts: words("null NULL omit"),
40
-
41
- visibilityModifiers: words("private public friend"),
42
- templateMatch: words("complement ifpresent subset superset permutation")};
43
-
44
- var wordList = [];
45
- function add(obj) {
46
- if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop))
47
- wordList.push(prop);
48
- }
49
- add(parserConfig.keywords);
50
- add(parserConfig.builtin);
51
- add(parserConfig.timerOps);
52
- add(parserConfig.portOps);
53
-
54
- var keywords = parserConfig.keywords || {},
55
- builtin = parserConfig.builtin || {},
56
- timerOps = parserConfig.timerOps || {},
57
- portOps = parserConfig.portOps || {},
58
- configOps = parserConfig.configOps || {},
59
- verdictOps = parserConfig.verdictOps || {},
60
- sutOps = parserConfig.sutOps || {},
61
- functionOps = parserConfig.functionOps || {},
62
-
63
- verdictConsts = parserConfig.verdictConsts || {},
64
- booleanConsts = parserConfig.booleanConsts || {},
65
- otherConsts = parserConfig.otherConsts || {},
66
-
67
- types = parserConfig.types || {},
68
- visibilityModifiers = parserConfig.visibilityModifiers || {},
69
- templateMatch = parserConfig.templateMatch || {},
70
- indentStatements = parserConfig.indentStatements !== false;
71
- var isOperatorChar = /[+\-*&@=<>!\/]/;
72
- var curPunc;
73
-
74
- function tokenBase(stream, state) {
75
- var ch = stream.next();
76
-
77
- if (ch == '"' || ch == "'") {
78
- state.tokenize = tokenString(ch);
79
- return state.tokenize(stream, state);
80
- }
81
- if (/[\[\]{}\(\),;\\:\?\.]/.test(ch)) {
82
- curPunc = ch;
83
- return "punctuation";
84
- }
85
- if (ch == "#"){
86
- stream.skipToEnd();
87
- return "atom";
88
- }
89
- if (ch == "%"){
90
- stream.eatWhile(/\b/);
91
- return "atom";
92
- }
93
- if (/\d/.test(ch)) {
94
- stream.eatWhile(/[\w\.]/);
95
- return "number";
96
- }
97
- if (ch == "/") {
98
- if (stream.eat("*")) {
99
- state.tokenize = tokenComment;
100
- return tokenComment(stream, state);
101
- }
102
- if (stream.eat("/")) {
103
- stream.skipToEnd();
104
- return "comment";
105
- }
106
- }
107
- if (isOperatorChar.test(ch)) {
108
- if(ch == "@"){
109
- if(stream.match("try") || stream.match("catch")
110
- || stream.match("lazy")){
111
- return "keyword";
112
- }
113
- }
114
- stream.eatWhile(isOperatorChar);
115
- return "operator";
116
- }
117
- stream.eatWhile(/[\w\$_\xa1-\uffff]/);
118
- var cur = stream.current();
119
-
120
- if (keywords.propertyIsEnumerable(cur)) return "keyword";
121
- if (builtin.propertyIsEnumerable(cur)) return "builtin";
122
-
123
- if (timerOps.propertyIsEnumerable(cur)) return "def";
124
- if (configOps.propertyIsEnumerable(cur)) return "def";
125
- if (verdictOps.propertyIsEnumerable(cur)) return "def";
126
- if (portOps.propertyIsEnumerable(cur)) return "def";
127
- if (sutOps.propertyIsEnumerable(cur)) return "def";
128
- if (functionOps.propertyIsEnumerable(cur)) return "def";
129
-
130
- if (verdictConsts.propertyIsEnumerable(cur)) return "string";
131
- if (booleanConsts.propertyIsEnumerable(cur)) return "string";
132
- if (otherConsts.propertyIsEnumerable(cur)) return "string";
133
-
134
- if (types.propertyIsEnumerable(cur)) return "typeName.standard";
135
- if (visibilityModifiers.propertyIsEnumerable(cur))
136
- return "modifier";
137
- if (templateMatch.propertyIsEnumerable(cur)) return "atom";
138
-
139
- return "variable";
140
- }
141
-
142
- function tokenString(quote) {
143
- return function(stream, state) {
144
- var escaped = false, next, end = false;
145
- while ((next = stream.next()) != null) {
146
- if (next == quote && !escaped){
147
- var afterQuote = stream.peek();
148
- //look if the character after the quote is like the B in '10100010'B
149
- if (afterQuote){
150
- afterQuote = afterQuote.toLowerCase();
151
- if(afterQuote == "b" || afterQuote == "h" || afterQuote == "o")
152
- stream.next();
153
- }
154
- end = true; break;
155
- }
156
- escaped = !escaped && next == "\\";
157
- }
158
- if (end || false)
159
- state.tokenize = null;
160
- return "string";
161
- };
162
- }
163
-
164
- function tokenComment(stream, state) {
165
- var maybeEnd = false, ch;
166
- while (ch = stream.next()) {
167
- if (ch == "/" && maybeEnd) {
168
- state.tokenize = null;
169
- break;
170
- }
171
- maybeEnd = (ch == "*");
172
- }
173
- return "comment";
174
- }
175
-
176
- function Context(indented, column, type, align, prev) {
177
- this.indented = indented;
178
- this.column = column;
179
- this.type = type;
180
- this.align = align;
181
- this.prev = prev;
182
- }
183
-
184
- function pushContext(state, col, type) {
185
- var indent = state.indented;
186
- if (state.context && state.context.type == "statement")
187
- indent = state.context.indented;
188
- return state.context = new Context(indent, col, type, null, state.context);
189
- }
190
-
191
- function popContext(state) {
192
- var t = state.context.type;
193
- if (t == ")" || t == "]" || t == "}")
194
- state.indented = state.context.indented;
195
- return state.context = state.context.prev;
196
- }
197
-
198
- //Interface
199
- const ttcn = {
200
- name: "ttcn",
201
- startState: function() {
202
- return {
203
- tokenize: null,
204
- context: new Context(0, 0, "top", false),
205
- indented: 0,
206
- startOfLine: true
207
- };
208
- },
209
-
210
- token: function(stream, state) {
211
- var ctx = state.context;
212
- if (stream.sol()) {
213
- if (ctx.align == null) ctx.align = false;
214
- state.indented = stream.indentation();
215
- state.startOfLine = true;
216
- }
217
- if (stream.eatSpace()) return null;
218
- curPunc = null;
219
- var style = (state.tokenize || tokenBase)(stream, state);
220
- if (style == "comment") return style;
221
- if (ctx.align == null) ctx.align = true;
222
-
223
- if ((curPunc == ";" || curPunc == ":" || curPunc == ",")
224
- && ctx.type == "statement"){
225
- popContext(state);
226
- }
227
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
228
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
229
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
230
- else if (curPunc == "}") {
231
- while (ctx.type == "statement") ctx = popContext(state);
232
- if (ctx.type == "}") ctx = popContext(state);
233
- while (ctx.type == "statement") ctx = popContext(state);
234
- }
235
- else if (curPunc == ctx.type) popContext(state);
236
- else if (indentStatements &&
237
- (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') ||
238
- (ctx.type == "statement" && curPunc == "newstatement")))
239
- pushContext(state, stream.column(), "statement");
240
-
241
- state.startOfLine = false;
242
-
243
- return style;
244
- },
245
-
246
- languageData: {
247
- indentOnInput: /^\s*[{}]$/,
248
- commentTokens: {line: "//", block: {open: "/*", close: "*/"}},
249
- autocomplete: wordList
250
- }
251
- };
252
-
253
- export { ttcn };