@vc-shell/framework 1.1.2 → 1.1.4

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 (271) hide show
  1. package/CHANGELOG.md +18 -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-BKF-A58l.js → index-BBYKbiRX.js} +79 -92
  39. package/dist/index-BDm0tcWn.js +145680 -0
  40. package/dist/{assets/index-CeeaNa4F.js → index-BDqUaIyQ.js} +136 -167
  41. package/dist/index-BdflTsg6.js +308 -0
  42. package/dist/{assets/index-CtmpJVwa.js → index-BpBTtmQ6.js} +270 -312
  43. package/dist/index-Br0y2YMn.js +58 -0
  44. package/dist/index-CIcET-ZI.js +71 -0
  45. package/dist/index-CYAMpxnu.js +341 -0
  46. package/dist/index-Cf2H7YZ1.js +98 -0
  47. package/dist/{assets/index-Bv_z_qRq.js → index-Ck055pN8.js} +121 -124
  48. package/dist/index-D-fPN3yf.js +75 -0
  49. package/dist/{assets/index-BT8o9-M5.js → index-DJOis7Nc.js} +267 -386
  50. package/dist/index-DKtQMsy4.js +538 -0
  51. package/dist/{assets/index-DMTL7O1s.js → index-DWTsz5bC.js} +570 -586
  52. package/dist/{assets/index-C7zlEJy8.js → index-DuY7BIGm.js} +229 -302
  53. package/dist/{assets/index-B1srGfDb.js → index-o6aSdNED.js} +119 -165
  54. package/dist/index-wfv8ehcx.js +249 -0
  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/tsconfig.tsbuildinfo +1 -1
  106. package/dist/ttcn-Bsa4sfRm.js +123 -0
  107. package/dist/ttcn-cfg-Bac_acMi.js +88 -0
  108. package/dist/turtle-xwJUxoPV.js +80 -0
  109. package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
  110. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts.map +1 -1
  111. package/dist/vb-c2kQGd6-.js +74 -0
  112. package/dist/vbscript-Dz1TtKsy.js +324 -0
  113. package/dist/velocity-DJd0pTTC.js +96 -0
  114. package/dist/verilog-C4VGD9n1.js +263 -0
  115. package/dist/vhdl-T9HkrbI2.js +106 -0
  116. package/dist/webidl-CjfDENEo.js +155 -0
  117. package/dist/xquery-BUQdORAS.js +422 -0
  118. package/dist/yacas-C0absKBh.js +73 -0
  119. package/dist/z80-C8rPtw-0.js +61 -0
  120. package/package.json +4 -4
  121. package/ui/components/atoms/vc-widget/vc-widget.vue +2 -0
  122. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +65 -32
  123. package/dist/assets/apl-NdZ6-T1z.js +0 -142
  124. package/dist/assets/asciiarmor-CmJEbAuq.js +0 -56
  125. package/dist/assets/asn1-Ctc8K72v.js +0 -192
  126. package/dist/assets/asterisk-D6r__RMF.js +0 -187
  127. package/dist/assets/brainfuck-COwWCBpq.js +0 -70
  128. package/dist/assets/clike-C-PtfL50.js +0 -1019
  129. package/dist/assets/clojure-C2XPrGCa.js +0 -274
  130. package/dist/assets/cmake-BGrEgXCL.js +0 -81
  131. package/dist/assets/cobol-DShPmpZe.js +0 -234
  132. package/dist/assets/coffeescript-BG8vTfSz.js +0 -329
  133. package/dist/assets/commonlisp-8oE2EpEe.js +0 -108
  134. package/dist/assets/core-api-BMLS9FrT.js +0 -8288
  135. package/dist/assets/core-composables-DYxpIWyY.js +0 -1799
  136. package/dist/assets/core-constants-DiKDBbnD.js +0 -83
  137. package/dist/assets/core-directives-QhJx9kWh.js +0 -41
  138. package/dist/assets/core-interceptors-CSjUvxQ0.js +0 -78
  139. package/dist/assets/core-plugins-wv2bDZ0l.js +0 -4919
  140. package/dist/assets/core-services-CAfJRsjs.js +0 -4
  141. package/dist/assets/core-utilities-BTktq_a-.js +0 -33
  142. package/dist/assets/crystal--rIRMl16.js +0 -419
  143. package/dist/assets/css/core-directives-FL4vIIkN.css +0 -73
  144. package/dist/assets/css/fonts-M1mtyV8L.css +0 -305
  145. package/dist/assets/css/icons-css-DbCVsovz.css +0 -41
  146. package/dist/assets/css/shared-components-bnLHdCtf.css +0 -429
  147. package/dist/assets/css/shared-modules-CNOICmYQ.css +0 -45
  148. package/dist/assets/css/styles-C62nDZwV.css +0 -4096
  149. package/dist/assets/css/ui-app-Bh9hmlIB.css +0 -1287
  150. package/dist/assets/css/ui-content-B29jsmK7.css +0 -1187
  151. package/dist/assets/css/ui-controls-CRtfFczw.css +0 -387
  152. package/dist/assets/css/ui-data-CYLxfdUa.css +0 -1555
  153. package/dist/assets/css/ui-form-C3WrWfVl.css +0 -71
  154. package/dist/assets/css/ui-form-fields-DOtHhDeM.css +0 -1360
  155. package/dist/assets/css/ui-helpers-bOoNv5dS.css +0 -37
  156. package/dist/assets/css/ui-indicators-CybQnCoU.css +0 -628
  157. package/dist/assets/css/ui-layout-DyGKgizy.css +0 -251
  158. package/dist/assets/css/ui-media-TWYep8js.css +0 -298
  159. package/dist/assets/css/ui-media-advanced-BGxy3VSB.css +0 -183
  160. package/dist/assets/css/ui-navigation-DcPRn8SB.css +0 -1693
  161. package/dist/assets/css-C_ZeEwz2.js +0 -847
  162. package/dist/assets/cypher-Bayei42D.js +0 -122
  163. package/dist/assets/d-B0hhz6be.js +0 -205
  164. package/dist/assets/diff-DQutOIXs.js +0 -30
  165. package/dist/assets/dtd-C1CeYVnM.js +0 -121
  166. package/dist/assets/dylan-Dm9-uD-A.js +0 -337
  167. package/dist/assets/ebnf-jWG_1Yly.js +0 -151
  168. package/dist/assets/ecl-CgJPA6z9.js +0 -190
  169. package/dist/assets/eiffel-lj7uLahq.js +0 -146
  170. package/dist/assets/elm-Cz7o1ijk.js +0 -230
  171. package/dist/assets/erlang-CyL5QOyR.js +0 -581
  172. package/dist/assets/factor-BVWHwYpu.js +0 -65
  173. package/dist/assets/fcl-DiozYjc8.js +0 -154
  174. package/dist/assets/forth-B7vn5ze0.js +0 -164
  175. package/dist/assets/fortran-D2XNEnBT.js +0 -172
  176. package/dist/assets/gas-B_Tj57Ve.js +0 -343
  177. package/dist/assets/gherkin-CJ6Qk4EZ.js +0 -147
  178. package/dist/assets/groovy-ioGz2WSV.js +0 -228
  179. package/dist/assets/haskell-BHnm1B83.js +0 -239
  180. package/dist/assets/haxe-Bn6Yo6N3.js +0 -490
  181. package/dist/assets/http-BOd5SYCT.js +0 -89
  182. package/dist/assets/idl-FSFk8_xX.js +0 -274
  183. package/dist/assets/index--5fKpGeN.js +0 -792
  184. package/dist/assets/index-0lME64YH.js +0 -342
  185. package/dist/assets/index-B6Ip0FgO.js +0 -437
  186. package/dist/assets/index-BmV05E5M.js +0 -479
  187. package/dist/assets/index-C6MavZDA.js +0 -131
  188. package/dist/assets/index-CwKpgcYl.js +0 -85
  189. package/dist/assets/index-DRUmDL0J.js +0 -59
  190. package/dist/assets/index-DgFC-M9G.js +0 -96
  191. package/dist/assets/javascript-DGrAs70C.js +0 -922
  192. package/dist/assets/jinja2-D9k5QrXv.js +0 -171
  193. package/dist/assets/julia-DM42tOPB.js +0 -369
  194. package/dist/assets/livescript-Dci8HnOi.js +0 -259
  195. package/dist/assets/lua-CByQu4v6.js +0 -137
  196. package/dist/assets/lucide-icons-af0BY3bi.js +0 -34555
  197. package/dist/assets/mathematica-Dkv0uCYF.js +0 -153
  198. package/dist/assets/mbox-CYTvs5kC.js +0 -114
  199. package/dist/assets/mirc-DpgP3GCo.js +0 -176
  200. package/dist/assets/mllike-C6tNn2Yt.js +0 -343
  201. package/dist/assets/modelica-CR6hTSce.js +0 -192
  202. package/dist/assets/mscgen-D0GXtzMS.js +0 -149
  203. package/dist/assets/mumps-Bf1EyDa6.js +0 -129
  204. package/dist/assets/nginx-By9Phklj.js +0 -163
  205. package/dist/assets/nsis-B5ggMLQ9.js +0 -80
  206. package/dist/assets/ntriples-C7VJ7pnm.js +0 -141
  207. package/dist/assets/octave-6yR_ix15.js +0 -112
  208. package/dist/assets/oz-CEUnktiQ.js +0 -235
  209. package/dist/assets/pascal-Dksf1EyF.js +0 -124
  210. package/dist/assets/perl-B99DUQQt.js +0 -819
  211. package/dist/assets/pig-DFeDRta6.js +0 -149
  212. package/dist/assets/powershell-DhwsNWMx.js +0 -381
  213. package/dist/assets/properties-o21uErwC.js +0 -62
  214. package/dist/assets/protobuf-YxlANsmD.js +0 -54
  215. package/dist/assets/pug-bUgjeODZ.js +0 -504
  216. package/dist/assets/puppet-B8WICGYE.js +0 -205
  217. package/dist/assets/python-D3FFx1Id.js +0 -389
  218. package/dist/assets/q-D2Hjhl2C.js +0 -123
  219. package/dist/assets/r-D73k5lac.js +0 -174
  220. package/dist/assets/rpm-Duv_WH0z.js +0 -89
  221. package/dist/assets/ruby-DGCVqZDt.js +0 -287
  222. package/dist/assets/sas-XjPv1Vy5.js +0 -268
  223. package/dist/assets/scheme-DeaA28vt.js +0 -263
  224. package/dist/assets/shared-components-CfAt2hC6.js +0 -1501
  225. package/dist/assets/shared-composables-v9NkNuAe.js +0 -35
  226. package/dist/assets/shared-modules-CDP-H5ZB.js +0 -3588
  227. package/dist/assets/shared-pages-BGRRA5WB.js +0 -20
  228. package/dist/assets/shell-Bx6QZTgx.js +0 -145
  229. package/dist/assets/sieve-CWCD62sW.js +0 -178
  230. package/dist/assets/simple-mode-BAO9cD7H.js +0 -136
  231. package/dist/assets/smalltalk-DSQbF4MF.js +0 -153
  232. package/dist/assets/solr-v_XRf31C.js +0 -80
  233. package/dist/assets/sparql-BrfDqf0-.js +0 -170
  234. package/dist/assets/spreadsheet-Csn84Pef.js +0 -98
  235. package/dist/assets/sql-D4utlq1l.js +0 -480
  236. package/dist/assets/stex-DBkktma-.js +0 -246
  237. package/dist/assets/stylus-ByG-Fd6f.js +0 -750
  238. package/dist/assets/swift-CHbTprt3.js +0 -202
  239. package/dist/assets/tcl-BRlMUELr.js +0 -125
  240. package/dist/assets/textile-CqfTUjd4.js +0 -441
  241. package/dist/assets/tiddlywiki-BrsoM8KB.js +0 -278
  242. package/dist/assets/tiki-D-ivWPkc.js +0 -289
  243. package/dist/assets/toml-t_IhJu83.js +0 -75
  244. package/dist/assets/troff-DckGF2AE.js +0 -64
  245. package/dist/assets/ttcn-B8TAFbRR.js +0 -253
  246. package/dist/assets/ttcn-cfg-NHh25oCM.js +0 -197
  247. package/dist/assets/turtle-D9Js0BlL.js +0 -141
  248. package/dist/assets/ui-app-D31Pr1WY.js +0 -1993
  249. package/dist/assets/ui-content-B7SxH8y9.js +0 -52887
  250. package/dist/assets/ui-controls-nmDJYLmC.js +0 -348
  251. package/dist/assets/ui-data-Ci3b1ye0.js +0 -22901
  252. package/dist/assets/ui-form-Cs5ooOo7.js +0 -159
  253. package/dist/assets/ui-form-fields-DFQi31jT.js +0 -40575
  254. package/dist/assets/ui-helpers-CF-EUlOg.js +0 -1736
  255. package/dist/assets/ui-indicators-mIQeEqha.js +0 -199
  256. package/dist/assets/ui-layout-v2XBQky3.js +0 -320
  257. package/dist/assets/ui-media-WWYrwmZw.js +0 -1259
  258. package/dist/assets/ui-media-advanced-T8ibi153.js +0 -492
  259. package/dist/assets/ui-modals-BdZXzI85.js +0 -2
  260. package/dist/assets/ui-navigation-BtHa6ovW.js +0 -24269
  261. package/dist/assets/utils-DZK5fu48.js +0 -17216
  262. package/dist/assets/vb-CbIGLrpY.js +0 -249
  263. package/dist/assets/vbscript-8ANWle9n.js +0 -320
  264. package/dist/assets/velocity-D6hz3Hzw.js +0 -186
  265. package/dist/assets/verilog-DIV442at.js +0 -565
  266. package/dist/assets/vhdl-BlTiZo_v.js +0 -174
  267. package/dist/assets/vueuse-CTQm4Zh0.js +0 -9308
  268. package/dist/assets/webidl-Cp3tcqdk.js +0 -179
  269. package/dist/assets/xquery-Dd4TBzXv.js +0 -411
  270. package/dist/assets/yacas-DQ1WucF0.js +0 -182
  271. package/dist/assets/z80-P1j44jDI.js +0 -102
@@ -1,490 +0,0 @@
1
- // Tokenizer
2
-
3
- function kw(type) {return {type: type, style: "keyword"};}
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, "while": A, "else": B, "do": B, "try": B,
9
- "return": C, "break": C, "continue": C, "new": C, "throw": C,
10
- "var": kw("var"), "inline":attribute, "static": attribute, "using":kw("import"),
11
- "public": attribute, "private": attribute, "cast": kw("cast"), "import": kw("import"), "macro": kw("macro"),
12
- "function": kw("function"), "catch": kw("catch"), "untyped": kw("untyped"), "callback": kw("cb"),
13
- "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
14
- "in": operator, "never": kw("property_access"), "trace":kw("trace"),
15
- "class": type, "abstract":type, "enum":type, "interface":type, "typedef":type, "extends":type, "implements":type, "dynamic":type,
16
- "true": atom, "false": atom, "null": atom
17
- };
18
-
19
- var isOperatorChar = /[+\-*&%=<>!?|]/;
20
-
21
- function chain(stream, state, f) {
22
- state.tokenize = f;
23
- return f(stream, state);
24
- }
25
-
26
- function toUnescaped(stream, end) {
27
- var escaped = false, next;
28
- while ((next = stream.next()) != null) {
29
- if (next == end && !escaped)
30
- return true;
31
- escaped = !escaped && next == "\\";
32
- }
33
- }
34
-
35
- // Used as scratch variables to communicate multiple values without
36
- // consing up tons of objects.
37
- var type, content;
38
- function ret(tp, style, cont) {
39
- type = tp; content = cont;
40
- return style;
41
- }
42
-
43
- function haxeTokenBase(stream, state) {
44
- var ch = stream.next();
45
- if (ch == '"' || ch == "'") {
46
- return chain(stream, state, haxeTokenString(ch));
47
- } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
48
- return ret(ch);
49
- } else if (ch == "0" && stream.eat(/x/i)) {
50
- stream.eatWhile(/[\da-f]/i);
51
- return ret("number", "number");
52
- } else if (/\d/.test(ch) || ch == "-" && stream.eat(/\d/)) {
53
- stream.match(/^\d*(?:\.\d*(?!\.))?(?:[eE][+\-]?\d+)?/);
54
- return ret("number", "number");
55
- } else if (state.reAllowed && (ch == "~" && stream.eat(/\//))) {
56
- toUnescaped(stream, "/");
57
- stream.eatWhile(/[gimsu]/);
58
- return ret("regexp", "string.special");
59
- } else if (ch == "/") {
60
- if (stream.eat("*")) {
61
- return chain(stream, state, haxeTokenComment);
62
- } else if (stream.eat("/")) {
63
- stream.skipToEnd();
64
- return ret("comment", "comment");
65
- } else {
66
- stream.eatWhile(isOperatorChar);
67
- return ret("operator", null, stream.current());
68
- }
69
- } else if (ch == "#") {
70
- stream.skipToEnd();
71
- return ret("conditional", "meta");
72
- } else if (ch == "@") {
73
- stream.eat(/:/);
74
- stream.eatWhile(/[\w_]/);
75
- return ret ("metadata", "meta");
76
- } else if (isOperatorChar.test(ch)) {
77
- stream.eatWhile(isOperatorChar);
78
- return ret("operator", null, stream.current());
79
- } else {
80
- var word;
81
- if(/[A-Z]/.test(ch)) {
82
- stream.eatWhile(/[\w_<>]/);
83
- word = stream.current();
84
- return ret("type", "type", word);
85
- } else {
86
- stream.eatWhile(/[\w_]/);
87
- var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
88
- return (known && state.kwAllowed) ? ret(known.type, known.style, word) :
89
- ret("variable", "variable", word);
90
- }
91
- }
92
- }
93
-
94
- function haxeTokenString(quote) {
95
- return function(stream, state) {
96
- if (toUnescaped(stream, quote))
97
- state.tokenize = haxeTokenBase;
98
- return ret("string", "string");
99
- };
100
- }
101
-
102
- function haxeTokenComment(stream, state) {
103
- var maybeEnd = false, ch;
104
- while (ch = stream.next()) {
105
- if (ch == "/" && maybeEnd) {
106
- state.tokenize = haxeTokenBase;
107
- break;
108
- }
109
- maybeEnd = (ch == "*");
110
- }
111
- return ret("comment", "comment");
112
- }
113
-
114
- // Parser
115
-
116
- var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true};
117
-
118
- function HaxeLexical(indented, column, type, align, prev, info) {
119
- this.indented = indented;
120
- this.column = column;
121
- this.type = type;
122
- this.prev = prev;
123
- this.info = info;
124
- if (align != null) this.align = align;
125
- }
126
-
127
- function inScope(state, varname) {
128
- for (var v = state.localVars; v; v = v.next)
129
- if (v.name == varname) return true;
130
- }
131
-
132
- function parseHaxe(state, style, type, content, stream) {
133
- var cc = state.cc;
134
- // Communicate our context to the combinators.
135
- // (Less wasteful than consing up a hundred closures on every call.)
136
- cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;
137
-
138
- if (!state.lexical.hasOwnProperty("align"))
139
- state.lexical.align = true;
140
-
141
- while(true) {
142
- var combinator = cc.length ? cc.pop() : statement;
143
- if (combinator(type, content)) {
144
- while(cc.length && cc[cc.length - 1].lex)
145
- cc.pop()();
146
- if (cx.marked) return cx.marked;
147
- if (type == "variable" && inScope(state, content)) return "variableName.local";
148
- if (type == "variable" && imported(state, content)) return "variableName.special";
149
- return style;
150
- }
151
- }
152
- }
153
-
154
- function imported(state, typename) {
155
- if (/[a-z]/.test(typename.charAt(0)))
156
- return false;
157
- var len = state.importedtypes.length;
158
- for (var i = 0; i<len; i++)
159
- if(state.importedtypes[i]==typename) return true;
160
- }
161
-
162
- function registerimport(importname) {
163
- var state = cx.state;
164
- for (var t = state.importedtypes; t; t = t.next)
165
- if(t.name == importname) return;
166
- state.importedtypes = { name: importname, next: state.importedtypes };
167
- }
168
- // Combinator utils
169
-
170
- var cx = {state: null, marked: null, cc: null};
171
- function pass() {
172
- for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
173
- }
174
- function cont() {
175
- pass.apply(null, arguments);
176
- return true;
177
- }
178
- function inList(name, list) {
179
- for (var v = list; v; v = v.next)
180
- if (v.name == name) return true;
181
- return false;
182
- }
183
- function register(varname) {
184
- var state = cx.state;
185
- if (state.context) {
186
- cx.marked = "def";
187
- if (inList(varname, state.localVars)) return;
188
- state.localVars = {name: varname, next: state.localVars};
189
- } else if (state.globalVars) {
190
- if (inList(varname, state.globalVars)) return;
191
- state.globalVars = {name: varname, next: state.globalVars};
192
- }
193
- }
194
-
195
- // Combinators
196
-
197
- var defaultVars = {name: "this", next: null};
198
- function pushcontext() {
199
- if (!cx.state.context) cx.state.localVars = defaultVars;
200
- cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
201
- }
202
- function popcontext() {
203
- cx.state.localVars = cx.state.context.vars;
204
- cx.state.context = cx.state.context.prev;
205
- }
206
- popcontext.lex = true;
207
- function pushlex(type, info) {
208
- var result = function() {
209
- var state = cx.state;
210
- state.lexical = new HaxeLexical(state.indented, cx.stream.column(), type, null, state.lexical, info);
211
- };
212
- result.lex = true;
213
- return result;
214
- }
215
- function poplex() {
216
- var state = cx.state;
217
- if (state.lexical.prev) {
218
- if (state.lexical.type == ")")
219
- state.indented = state.lexical.indented;
220
- state.lexical = state.lexical.prev;
221
- }
222
- }
223
- poplex.lex = true;
224
-
225
- function expect(wanted) {
226
- function f(type) {
227
- if (type == wanted) return cont();
228
- else if (wanted == ";") return pass();
229
- else return cont(f);
230
- }
231
- return f;
232
- }
233
-
234
- function statement(type) {
235
- if (type == "@") return cont(metadef);
236
- if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex);
237
- if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
238
- if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
239
- if (type == "{") return cont(pushlex("}"), pushcontext, block, poplex, popcontext);
240
- if (type == ";") return cont();
241
- if (type == "attribute") return cont(maybeattribute);
242
- if (type == "function") return cont(functiondef);
243
- if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"),
244
- poplex, statement, poplex);
245
- if (type == "variable") return cont(pushlex("stat"), maybelabel);
246
- if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
247
- block, poplex, poplex);
248
- if (type == "case") return cont(expression, expect(":"));
249
- if (type == "default") return cont(expect(":"));
250
- if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
251
- statement, poplex, popcontext);
252
- if (type == "import") return cont(importdef, expect(";"));
253
- if (type == "typedef") return cont(typedef);
254
- return pass(pushlex("stat"), expression, expect(";"), poplex);
255
- }
256
- function expression(type) {
257
- if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator);
258
- if (type == "type" ) return cont(maybeoperator);
259
- if (type == "function") return cont(functiondef);
260
- if (type == "keyword c") return cont(maybeexpression);
261
- if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeoperator);
262
- if (type == "operator") return cont(expression);
263
- if (type == "[") return cont(pushlex("]"), commasep(maybeexpression, "]"), poplex, maybeoperator);
264
- if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator);
265
- return cont();
266
- }
267
- function maybeexpression(type) {
268
- if (type.match(/[;\}\)\],]/)) return pass();
269
- return pass(expression);
270
- }
271
-
272
- function maybeoperator(type, value) {
273
- if (type == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator);
274
- if (type == "operator" || type == ":") return cont(expression);
275
- if (type == ";") return;
276
- if (type == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator);
277
- if (type == ".") return cont(property, maybeoperator);
278
- if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator);
279
- }
280
-
281
- function maybeattribute(type) {
282
- if (type == "attribute") return cont(maybeattribute);
283
- if (type == "function") return cont(functiondef);
284
- if (type == "var") return cont(vardef1);
285
- }
286
-
287
- function metadef(type) {
288
- if(type == ":") return cont(metadef);
289
- if(type == "variable") return cont(metadef);
290
- if(type == "(") return cont(pushlex(")"), commasep(metaargs, ")"), poplex, statement);
291
- }
292
- function metaargs(type) {
293
- if(type == "variable") return cont();
294
- }
295
-
296
- function importdef (type, value) {
297
- if(type == "variable" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); }
298
- else if(type == "variable" || type == "property" || type == "." || value == "*") return cont(importdef);
299
- }
300
-
301
- function typedef (type, value)
302
- {
303
- if(type == "variable" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); }
304
- else if (type == "type" && /[A-Z]/.test(value.charAt(0))) { return cont(); }
305
- }
306
-
307
- function maybelabel(type) {
308
- if (type == ":") return cont(poplex, statement);
309
- return pass(maybeoperator, expect(";"), poplex);
310
- }
311
- function property(type) {
312
- if (type == "variable") {cx.marked = "property"; return cont();}
313
- }
314
- function objprop(type) {
315
- if (type == "variable") cx.marked = "property";
316
- if (atomicTypes.hasOwnProperty(type)) return cont(expect(":"), expression);
317
- }
318
- function commasep(what, end) {
319
- function proceed(type) {
320
- if (type == ",") return cont(what, proceed);
321
- if (type == end) return cont();
322
- return cont(expect(end));
323
- }
324
- return function(type) {
325
- if (type == end) return cont();
326
- else return pass(what, proceed);
327
- };
328
- }
329
- function block(type) {
330
- if (type == "}") return cont();
331
- return pass(statement, block);
332
- }
333
- function vardef1(type, value) {
334
- if (type == "variable"){register(value); return cont(typeuse, vardef2);}
335
- return cont();
336
- }
337
- function vardef2(type, value) {
338
- if (value == "=") return cont(expression, vardef2);
339
- if (type == ",") return cont(vardef1);
340
- }
341
- function forspec1(type, value) {
342
- if (type == "variable") {
343
- register(value);
344
- return cont(forin, expression)
345
- } else {
346
- return pass()
347
- }
348
- }
349
- function forin(_type, value) {
350
- if (value == "in") return cont();
351
- }
352
- function functiondef(type, value) {
353
- //function names starting with upper-case letters are recognised as types, so cludging them together here.
354
- if (type == "variable" || type == "type") {register(value); return cont(functiondef);}
355
- if (value == "new") return cont(functiondef);
356
- if (type == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, typeuse, statement, popcontext);
357
- }
358
- function typeuse(type) {
359
- if(type == ":") return cont(typestring);
360
- }
361
- function typestring(type) {
362
- if(type == "type") return cont();
363
- if(type == "variable") return cont();
364
- if(type == "{") return cont(pushlex("}"), commasep(typeprop, "}"), poplex);
365
- }
366
- function typeprop(type) {
367
- if(type == "variable") return cont(typeuse);
368
- }
369
- function funarg(type, value) {
370
- if (type == "variable") {register(value); return cont(typeuse);}
371
- }
372
-
373
- // Interface
374
- const haxe = {
375
- name: "haxe",
376
- startState: function(indentUnit) {
377
- var defaulttypes = ["Int", "Float", "String", "Void", "Std", "Bool", "Dynamic", "Array"];
378
- var state = {
379
- tokenize: haxeTokenBase,
380
- reAllowed: true,
381
- kwAllowed: true,
382
- cc: [],
383
- lexical: new HaxeLexical(-indentUnit, 0, "block", false),
384
- importedtypes: defaulttypes,
385
- context: null,
386
- indented: 0
387
- };
388
- return state;
389
- },
390
-
391
- token: function(stream, state) {
392
- if (stream.sol()) {
393
- if (!state.lexical.hasOwnProperty("align"))
394
- state.lexical.align = false;
395
- state.indented = stream.indentation();
396
- }
397
- if (stream.eatSpace()) return null;
398
- var style = state.tokenize(stream, state);
399
- if (type == "comment") return style;
400
- state.reAllowed = !!(type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/));
401
- state.kwAllowed = type != '.';
402
- return parseHaxe(state, style, type, content, stream);
403
- },
404
-
405
- indent: function(state, textAfter, cx) {
406
- if (state.tokenize != haxeTokenBase) return 0;
407
- var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
408
- if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
409
- var type = lexical.type, closing = firstChar == type;
410
- if (type == "vardef") return lexical.indented + 4;
411
- else if (type == "form" && firstChar == "{") return lexical.indented;
412
- else if (type == "stat" || type == "form") return lexical.indented + cx.unit;
413
- else if (lexical.info == "switch" && !closing)
414
- return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? cx.unit : 2 * cx.unit);
415
- else if (lexical.align) return lexical.column + (closing ? 0 : 1);
416
- else return lexical.indented + (closing ? 0 : cx.unit);
417
- },
418
-
419
- languageData: {
420
- indentOnInput: /^\s*[{}]$/,
421
- commentTokens: {line: "//", block: {open: "/*", close: "*/"}}
422
- }
423
- };
424
-
425
- const hxml = {
426
- name: "hxml",
427
- startState: function () {
428
- return {
429
- define: false,
430
- inString: false
431
- };
432
- },
433
- token: function (stream, state) {
434
- var ch = stream.peek();
435
- var sol = stream.sol();
436
-
437
- ///* comments */
438
- if (ch == "#") {
439
- stream.skipToEnd();
440
- return "comment";
441
- }
442
- if (sol && ch == "-") {
443
- var style = "variable-2";
444
-
445
- stream.eat(/-/);
446
-
447
- if (stream.peek() == "-") {
448
- stream.eat(/-/);
449
- style = "keyword a";
450
- }
451
-
452
- if (stream.peek() == "D") {
453
- stream.eat(/[D]/);
454
- style = "keyword c";
455
- state.define = true;
456
- }
457
-
458
- stream.eatWhile(/[A-Z]/i);
459
- return style;
460
- }
461
-
462
- var ch = stream.peek();
463
-
464
- if (state.inString == false && ch == "'") {
465
- state.inString = true;
466
- stream.next();
467
- }
468
-
469
- if (state.inString == true) {
470
- if (stream.skipTo("'")) ; else {
471
- stream.skipToEnd();
472
- }
473
-
474
- if (stream.peek() == "'") {
475
- stream.next();
476
- state.inString = false;
477
- }
478
-
479
- return "string";
480
- }
481
-
482
- stream.next();
483
- return null;
484
- },
485
- languageData: {
486
- commentTokens: {line: "#"}
487
- }
488
- };
489
-
490
- export { haxe, hxml };
@@ -1,89 +0,0 @@
1
- function failFirstLine(stream, state) {
2
- stream.skipToEnd();
3
- state.cur = header;
4
- return "error";
5
- }
6
-
7
- function start(stream, state) {
8
- if (stream.match(/^HTTP\/\d\.\d/)) {
9
- state.cur = responseStatusCode;
10
- return "keyword";
11
- } else if (stream.match(/^[A-Z]+/) && /[ \t]/.test(stream.peek())) {
12
- state.cur = requestPath;
13
- return "keyword";
14
- } else {
15
- return failFirstLine(stream, state);
16
- }
17
- }
18
-
19
- function responseStatusCode(stream, state) {
20
- var code = stream.match(/^\d+/);
21
- if (!code) return failFirstLine(stream, state);
22
-
23
- state.cur = responseStatusText;
24
- var status = Number(code[0]);
25
- if (status >= 100 && status < 400) {
26
- return "atom";
27
- } else {
28
- return "error";
29
- }
30
- }
31
-
32
- function responseStatusText(stream, state) {
33
- stream.skipToEnd();
34
- state.cur = header;
35
- return null;
36
- }
37
-
38
- function requestPath(stream, state) {
39
- stream.eatWhile(/\S/);
40
- state.cur = requestProtocol;
41
- return "string.special";
42
- }
43
-
44
- function requestProtocol(stream, state) {
45
- if (stream.match(/^HTTP\/\d\.\d$/)) {
46
- state.cur = header;
47
- return "keyword";
48
- } else {
49
- return failFirstLine(stream, state);
50
- }
51
- }
52
-
53
- function header(stream) {
54
- if (stream.sol() && !stream.eat(/[ \t]/)) {
55
- if (stream.match(/^.*?:/)) {
56
- return "atom";
57
- } else {
58
- stream.skipToEnd();
59
- return "error";
60
- }
61
- } else {
62
- stream.skipToEnd();
63
- return "string";
64
- }
65
- }
66
-
67
- function body(stream) {
68
- stream.skipToEnd();
69
- return null;
70
- }
71
-
72
- const http = {
73
- name: "http",
74
- token: function(stream, state) {
75
- var cur = state.cur;
76
- if (cur != header && cur != body && stream.eatSpace()) return null;
77
- return cur(stream, state);
78
- },
79
-
80
- blankLine: function(state) {
81
- state.cur = body;
82
- },
83
-
84
- startState: function() {
85
- return {cur: start};
86
- }
87
- };
88
-
89
- export { http };