@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,179 +0,0 @@
1
- function wordRegexp(words) {
2
- return new RegExp("^((" + words.join(")|(") + "))\\b");
3
- }
4
- var builtinArray = [
5
- "Clamp",
6
- "Constructor",
7
- "EnforceRange",
8
- "Exposed",
9
- "ImplicitThis",
10
- "Global", "PrimaryGlobal",
11
- "LegacyArrayClass",
12
- "LegacyUnenumerableNamedProperties",
13
- "LenientThis",
14
- "NamedConstructor",
15
- "NewObject",
16
- "NoInterfaceObject",
17
- "OverrideBuiltins",
18
- "PutForwards",
19
- "Replaceable",
20
- "SameObject",
21
- "TreatNonObjectAsNull",
22
- "TreatNullAs",
23
- "EmptyString",
24
- "Unforgeable",
25
- "Unscopeable"
26
- ];
27
- var builtins = wordRegexp(builtinArray);
28
-
29
- var typeArray = [
30
- "unsigned", "short", "long", // UnsignedIntegerType
31
- "unrestricted", "float", "double", // UnrestrictedFloatType
32
- "boolean", "byte", "octet", // Rest of PrimitiveType
33
- "Promise", // PromiseType
34
- "ArrayBuffer", "DataView", "Int8Array", "Int16Array", "Int32Array",
35
- "Uint8Array", "Uint16Array", "Uint32Array", "Uint8ClampedArray",
36
- "Float32Array", "Float64Array", // BufferRelatedType
37
- "ByteString", "DOMString", "USVString", "sequence", "object", "RegExp",
38
- "Error", "DOMException", "FrozenArray", // Rest of NonAnyType
39
- "any", // Rest of SingleType
40
- "void" // Rest of ReturnType
41
- ];
42
- var types = wordRegexp(typeArray);
43
-
44
- var keywordArray = [
45
- "attribute", "callback", "const", "deleter", "dictionary", "enum", "getter",
46
- "implements", "inherit", "interface", "iterable", "legacycaller", "maplike",
47
- "partial", "required", "serializer", "setlike", "setter", "static",
48
- "stringifier", "typedef", // ArgumentNameKeyword except
49
- // "unrestricted"
50
- "optional", "readonly", "or"
51
- ];
52
- var keywords = wordRegexp(keywordArray);
53
-
54
- var atomArray = [
55
- "true", "false", // BooleanLiteral
56
- "Infinity", "NaN", // FloatLiteral
57
- "null" // Rest of ConstValue
58
- ];
59
- var atoms = wordRegexp(atomArray);
60
-
61
- var startDefArray = ["callback", "dictionary", "enum", "interface"];
62
- var startDefs = wordRegexp(startDefArray);
63
-
64
- var endDefArray = ["typedef"];
65
- var endDefs = wordRegexp(endDefArray);
66
-
67
- var singleOperators = /^[:<=>?]/;
68
- var integers = /^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/;
69
- var floats = /^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/;
70
- var identifiers = /^_?[A-Za-z][0-9A-Z_a-z-]*/;
71
- var identifiersEnd = /^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/;
72
- var strings = /^"[^"]*"/;
73
- var multilineComments = /^\/\*.*?\*\//;
74
- var multilineCommentsStart = /^\/\*.*/;
75
- var multilineCommentsEnd = /^.*?\*\//;
76
-
77
- function readToken(stream, state) {
78
- // whitespace
79
- if (stream.eatSpace()) return null;
80
-
81
- // comment
82
- if (state.inComment) {
83
- if (stream.match(multilineCommentsEnd)) {
84
- state.inComment = false;
85
- return "comment";
86
- }
87
- stream.skipToEnd();
88
- return "comment";
89
- }
90
- if (stream.match("//")) {
91
- stream.skipToEnd();
92
- return "comment";
93
- }
94
- if (stream.match(multilineComments)) return "comment";
95
- if (stream.match(multilineCommentsStart)) {
96
- state.inComment = true;
97
- return "comment";
98
- }
99
-
100
- // integer and float
101
- if (stream.match(/^-?[0-9\.]/, false)) {
102
- if (stream.match(integers) || stream.match(floats)) return "number";
103
- }
104
-
105
- // string
106
- if (stream.match(strings)) return "string";
107
-
108
- // identifier
109
- if (state.startDef && stream.match(identifiers)) return "def";
110
-
111
- if (state.endDef && stream.match(identifiersEnd)) {
112
- state.endDef = false;
113
- return "def";
114
- }
115
-
116
- if (stream.match(keywords)) return "keyword";
117
-
118
- if (stream.match(types)) {
119
- var lastToken = state.lastToken;
120
- var nextToken = (stream.match(/^\s*(.+?)\b/, false) || [])[1];
121
-
122
- if (lastToken === ":" || lastToken === "implements" ||
123
- nextToken === "implements" || nextToken === "=") {
124
- // Used as identifier
125
- return "builtin";
126
- } else {
127
- // Used as type
128
- return "type";
129
- }
130
- }
131
-
132
- if (stream.match(builtins)) return "builtin";
133
- if (stream.match(atoms)) return "atom";
134
- if (stream.match(identifiers)) return "variable";
135
-
136
- // other
137
- if (stream.match(singleOperators)) return "operator";
138
-
139
- // unrecognized
140
- stream.next();
141
- return null;
142
- }
143
- const webIDL = {
144
- name: "webidl",
145
- startState: function() {
146
- return {
147
- // Is in multiline comment
148
- inComment: false,
149
- // Last non-whitespace, matched token
150
- lastToken: "",
151
- // Next token is a definition
152
- startDef: false,
153
- // Last token of the statement is a definition
154
- endDef: false
155
- };
156
- },
157
- token: function(stream, state) {
158
- var style = readToken(stream, state);
159
-
160
- if (style) {
161
- var cur = stream.current();
162
- state.lastToken = cur;
163
- if (style === "keyword") {
164
- state.startDef = startDefs.test(cur);
165
- state.endDef = state.endDef || endDefs.test(cur);
166
- } else {
167
- state.startDef = false;
168
- }
169
- }
170
-
171
- return style;
172
- },
173
-
174
- languageData: {
175
- autocomplete: builtinArray.concat(typeArray).concat(keywordArray).concat(atomArray)
176
- }
177
- };
178
-
179
- export { webIDL };
@@ -1,411 +0,0 @@
1
- // The keywords object is set to the result of this self executing
2
- // function. Each keyword is a property of the keywords object whose
3
- // value is {type: atype, style: astyle}
4
- var keywords = function(){
5
- // convenience functions used to build keywords object
6
- function kw(type) {return {type: type, style: "keyword"};}
7
- var operator = kw("operator")
8
- , atom = {type: "atom", style: "atom"}
9
- , punctuation = {type: "punctuation", style: null}
10
- , qualifier = {type: "axis_specifier", style: "qualifier"};
11
-
12
- // kwObj is what is return from this function at the end
13
- var kwObj = {
14
- ',': punctuation
15
- };
16
-
17
- // a list of 'basic' keywords. For each add a property to kwObj with the value of
18
- // {type: basic[i], style: "keyword"} e.g. 'after' --> {type: "after", style: "keyword"}
19
- var basic = ['after', 'all', 'allowing', 'ancestor', 'ancestor-or-self', 'any', 'array', 'as',
20
- 'ascending', 'at', 'attribute', 'base-uri', 'before', 'boundary-space', 'by', 'case', 'cast',
21
- 'castable', 'catch', 'child', 'collation', 'comment', 'construction', 'contains', 'content',
22
- 'context', 'copy', 'copy-namespaces', 'count', 'decimal-format', 'declare', 'default', 'delete',
23
- 'descendant', 'descendant-or-self', 'descending', 'diacritics', 'different', 'distance',
24
- 'document', 'document-node', 'element', 'else', 'empty', 'empty-sequence', 'encoding', 'end',
25
- 'entire', 'every', 'exactly', 'except', 'external', 'first', 'following', 'following-sibling',
26
- 'for', 'from', 'ftand', 'ftnot', 'ft-option', 'ftor', 'function', 'fuzzy', 'greatest', 'group',
27
- 'if', 'import', 'in', 'inherit', 'insensitive', 'insert', 'instance', 'intersect', 'into',
28
- 'invoke', 'is', 'item', 'language', 'last', 'lax', 'least', 'let', 'levels', 'lowercase', 'map',
29
- 'modify', 'module', 'most', 'namespace', 'next', 'no', 'node', 'nodes', 'no-inherit',
30
- 'no-preserve', 'not', 'occurs', 'of', 'only', 'option', 'order', 'ordered', 'ordering',
31
- 'paragraph', 'paragraphs', 'parent', 'phrase', 'preceding', 'preceding-sibling', 'preserve',
32
- 'previous', 'processing-instruction', 'relationship', 'rename', 'replace', 'return',
33
- 'revalidation', 'same', 'satisfies', 'schema', 'schema-attribute', 'schema-element', 'score',
34
- 'self', 'sensitive', 'sentence', 'sentences', 'sequence', 'skip', 'sliding', 'some', 'stable',
35
- 'start', 'stemming', 'stop', 'strict', 'strip', 'switch', 'text', 'then', 'thesaurus', 'times',
36
- 'to', 'transform', 'treat', 'try', 'tumbling', 'type', 'typeswitch', 'union', 'unordered',
37
- 'update', 'updating', 'uppercase', 'using', 'validate', 'value', 'variable', 'version',
38
- 'weight', 'when', 'where', 'wildcards', 'window', 'with', 'without', 'word', 'words', 'xquery'];
39
- for(var i=0, l=basic.length; i < l; i++) { kwObj[basic[i]] = kw(basic[i]);}
40
- // a list of types. For each add a property to kwObj with the value of
41
- // {type: "atom", style: "atom"}
42
- var types = ['xs:anyAtomicType', 'xs:anySimpleType', 'xs:anyType', 'xs:anyURI',
43
- 'xs:base64Binary', 'xs:boolean', 'xs:byte', 'xs:date', 'xs:dateTime', 'xs:dateTimeStamp',
44
- 'xs:dayTimeDuration', 'xs:decimal', 'xs:double', 'xs:duration', 'xs:ENTITIES', 'xs:ENTITY',
45
- 'xs:float', 'xs:gDay', 'xs:gMonth', 'xs:gMonthDay', 'xs:gYear', 'xs:gYearMonth', 'xs:hexBinary',
46
- 'xs:ID', 'xs:IDREF', 'xs:IDREFS', 'xs:int', 'xs:integer', 'xs:item', 'xs:java', 'xs:language',
47
- 'xs:long', 'xs:Name', 'xs:NCName', 'xs:negativeInteger', 'xs:NMTOKEN', 'xs:NMTOKENS',
48
- 'xs:nonNegativeInteger', 'xs:nonPositiveInteger', 'xs:normalizedString', 'xs:NOTATION',
49
- 'xs:numeric', 'xs:positiveInteger', 'xs:precisionDecimal', 'xs:QName', 'xs:short', 'xs:string',
50
- 'xs:time', 'xs:token', 'xs:unsignedByte', 'xs:unsignedInt', 'xs:unsignedLong',
51
- 'xs:unsignedShort', 'xs:untyped', 'xs:untypedAtomic', 'xs:yearMonthDuration'];
52
- for(var i=0, l=types.length; i < l; i++) { kwObj[types[i]] = atom;}
53
- // each operator will add a property to kwObj with value of {type: "operator", style: "keyword"}
54
- var operators = ['eq', 'ne', 'lt', 'le', 'gt', 'ge', ':=', '=', '>', '>=', '<', '<=', '.', '|', '?', 'and', 'or', 'div', 'idiv', 'mod', '*', '/', '+', '-'];
55
- for(var i=0, l=operators.length; i < l; i++) { kwObj[operators[i]] = operator;}
56
- // each axis_specifiers will add a property to kwObj with value of {type: "axis_specifier", style: "qualifier"}
57
- var axis_specifiers = ["self::", "attribute::", "child::", "descendant::", "descendant-or-self::", "parent::",
58
- "ancestor::", "ancestor-or-self::", "following::", "preceding::", "following-sibling::", "preceding-sibling::"];
59
- for(var i=0, l=axis_specifiers.length; i < l; i++) { kwObj[axis_specifiers[i]] = qualifier; }
60
- return kwObj;
61
- }();
62
-
63
- function chain(stream, state, f) {
64
- state.tokenize = f;
65
- return f(stream, state);
66
- }
67
-
68
- // the primary mode tokenizer
69
- function tokenBase(stream, state) {
70
- var ch = stream.next(),
71
- mightBeFunction = false,
72
- isEQName = isEQNameAhead(stream);
73
-
74
- // an XML tag (if not in some sub, chained tokenizer)
75
- if (ch == "<") {
76
- if(stream.match("!--", true))
77
- return chain(stream, state, tokenXMLComment);
78
-
79
- if(stream.match("![CDATA", false)) {
80
- state.tokenize = tokenCDATA;
81
- return "tag";
82
- }
83
-
84
- if(stream.match("?", false)) {
85
- return chain(stream, state, tokenPreProcessing);
86
- }
87
-
88
- var isclose = stream.eat("/");
89
- stream.eatSpace();
90
- var tagName = "", c;
91
- while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c;
92
-
93
- return chain(stream, state, tokenTag(tagName, isclose));
94
- }
95
- // start code block
96
- else if(ch == "{") {
97
- pushStateStack(state, { type: "codeblock"});
98
- return null;
99
- }
100
- // end code block
101
- else if(ch == "}") {
102
- popStateStack(state);
103
- return null;
104
- }
105
- // if we're in an XML block
106
- else if(isInXmlBlock(state)) {
107
- if(ch == ">")
108
- return "tag";
109
- else if(ch == "/" && stream.eat(">")) {
110
- popStateStack(state);
111
- return "tag";
112
- }
113
- else
114
- return "variable";
115
- }
116
- // if a number
117
- else if (/\d/.test(ch)) {
118
- stream.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/);
119
- return "atom";
120
- }
121
- // comment start
122
- else if (ch === "(" && stream.eat(":")) {
123
- pushStateStack(state, { type: "comment"});
124
- return chain(stream, state, tokenComment);
125
- }
126
- // quoted string
127
- else if (!isEQName && (ch === '"' || ch === "'"))
128
- return startString(stream, state, ch);
129
- // variable
130
- else if(ch === "$") {
131
- return chain(stream, state, tokenVariable);
132
- }
133
- // assignment
134
- else if(ch ===":" && stream.eat("=")) {
135
- return "keyword";
136
- }
137
- // open paren
138
- else if(ch === "(") {
139
- pushStateStack(state, { type: "paren"});
140
- return null;
141
- }
142
- // close paren
143
- else if(ch === ")") {
144
- popStateStack(state);
145
- return null;
146
- }
147
- // open paren
148
- else if(ch === "[") {
149
- pushStateStack(state, { type: "bracket"});
150
- return null;
151
- }
152
- // close paren
153
- else if(ch === "]") {
154
- popStateStack(state);
155
- return null;
156
- }
157
- else {
158
- var known = keywords.propertyIsEnumerable(ch) && keywords[ch];
159
-
160
- // if there's a EQName ahead, consume the rest of the string portion, it's likely a function
161
- if(isEQName && ch === '\"') while(stream.next() !== '"'){}
162
- if(isEQName && ch === '\'') while(stream.next() !== '\''){}
163
-
164
- // gobble up a word if the character is not known
165
- if(!known) stream.eatWhile(/[\w\$_-]/);
166
-
167
- // gobble a colon in the case that is a lib func type call fn:doc
168
- var foundColon = stream.eat(":");
169
-
170
- // if there's not a second colon, gobble another word. Otherwise, it's probably an axis specifier
171
- // which should get matched as a keyword
172
- if(!stream.eat(":") && foundColon) {
173
- stream.eatWhile(/[\w\$_-]/);
174
- }
175
- // if the next non whitespace character is an open paren, this is probably a function (if not a keyword of other sort)
176
- if(stream.match(/^[ \t]*\(/, false)) {
177
- mightBeFunction = true;
178
- }
179
- // is the word a keyword?
180
- var word = stream.current();
181
- known = keywords.propertyIsEnumerable(word) && keywords[word];
182
-
183
- // if we think it's a function call but not yet known,
184
- // set style to variable for now for lack of something better
185
- if(mightBeFunction && !known) known = {type: "function_call", style: "def"};
186
-
187
- // if the previous word was element, attribute, axis specifier, this word should be the name of that
188
- if(isInXmlConstructor(state)) {
189
- popStateStack(state);
190
- return "variable";
191
- }
192
- // as previously checked, if the word is element,attribute, axis specifier, call it an "xmlconstructor" and
193
- // push the stack so we know to look for it on the next word
194
- if(word == "element" || word == "attribute" || known.type == "axis_specifier") pushStateStack(state, {type: "xmlconstructor"});
195
-
196
- // if the word is known, return the details of that else just call this a generic 'word'
197
- return known ? known.style : "variable";
198
- }
199
- }
200
-
201
- // handle comments, including nested
202
- function tokenComment(stream, state) {
203
- var maybeEnd = false, maybeNested = false, nestedCount = 0, ch;
204
- while (ch = stream.next()) {
205
- if (ch == ")" && maybeEnd) {
206
- if(nestedCount > 0)
207
- nestedCount--;
208
- else {
209
- popStateStack(state);
210
- break;
211
- }
212
- }
213
- else if(ch == ":" && maybeNested) {
214
- nestedCount++;
215
- }
216
- maybeEnd = (ch == ":");
217
- maybeNested = (ch == "(");
218
- }
219
-
220
- return "comment";
221
- }
222
-
223
- // tokenizer for string literals
224
- // optionally pass a tokenizer function to set state.tokenize back to when finished
225
- function tokenString(quote, f) {
226
- return function(stream, state) {
227
- var ch;
228
- while (ch = stream.next()) {
229
- if (ch == quote) {
230
- popStateStack(state);
231
- if (f) state.tokenize = f;
232
- break;
233
- } else if (stream.match("{", false) && isInXmlAttributeBlock(state)) {
234
- // if we're in a string and in an XML block, allow an embedded code block in an attribute
235
- pushStateStack(state, { type: "codeblock"});
236
- state.tokenize = tokenBase;
237
- return "string";
238
- }
239
- }
240
-
241
- return "string";
242
- };
243
- }
244
-
245
- function startString(stream, state, quote, f) {
246
- let tokenize = tokenString(quote, f);
247
- pushStateStack(state, { type: "string", name: quote, tokenize });
248
- return chain(stream, state, tokenize);
249
- }
250
-
251
- // tokenizer for variables
252
- function tokenVariable(stream, state) {
253
- var isVariableChar = /[\w\$_-]/;
254
-
255
- // a variable may start with a quoted EQName so if the next character is quote, consume to the next quote
256
- if(stream.eat("\"")) {
257
- while(stream.next() !== '\"'){} stream.eat(":");
258
- } else {
259
- stream.eatWhile(isVariableChar);
260
- if(!stream.match(":=", false)) stream.eat(":");
261
- }
262
- stream.eatWhile(isVariableChar);
263
- state.tokenize = tokenBase;
264
- return "variable";
265
- }
266
-
267
- // tokenizer for XML tags
268
- function tokenTag(name, isclose) {
269
- return function(stream, state) {
270
- stream.eatSpace();
271
- if(isclose && stream.eat(">")) {
272
- popStateStack(state);
273
- state.tokenize = tokenBase;
274
- return "tag";
275
- }
276
- // self closing tag without attributes?
277
- if(!stream.eat("/"))
278
- pushStateStack(state, { type: "tag", name: name, tokenize: tokenBase});
279
- if(!stream.eat(">")) {
280
- state.tokenize = tokenAttribute;
281
- return "tag";
282
- }
283
- else {
284
- state.tokenize = tokenBase;
285
- }
286
- return "tag";
287
- };
288
- }
289
-
290
- // tokenizer for XML attributes
291
- function tokenAttribute(stream, state) {
292
- var ch = stream.next();
293
-
294
- if(ch == "/" && stream.eat(">")) {
295
- if(isInXmlAttributeBlock(state)) popStateStack(state);
296
- if(isInXmlBlock(state)) popStateStack(state);
297
- return "tag";
298
- }
299
- if(ch == ">") {
300
- if(isInXmlAttributeBlock(state)) popStateStack(state);
301
- return "tag";
302
- }
303
- if(ch == "=")
304
- return null;
305
- // quoted string
306
- if (ch == '"' || ch == "'")
307
- return startString(stream, state, ch, tokenAttribute);
308
-
309
- if(!isInXmlAttributeBlock(state))
310
- pushStateStack(state, { type: "attribute", tokenize: tokenAttribute});
311
-
312
- stream.eat(/[a-zA-Z_:]/);
313
- stream.eatWhile(/[-a-zA-Z0-9_:.]/);
314
- stream.eatSpace();
315
-
316
- // the case where the attribute has not value and the tag was closed
317
- if(stream.match(">", false) || stream.match("/", false)) {
318
- popStateStack(state);
319
- state.tokenize = tokenBase;
320
- }
321
-
322
- return "attribute";
323
- }
324
-
325
- // handle comments, including nested
326
- function tokenXMLComment(stream, state) {
327
- var ch;
328
- while (ch = stream.next()) {
329
- if (ch == "-" && stream.match("->", true)) {
330
- state.tokenize = tokenBase;
331
- return "comment";
332
- }
333
- }
334
- }
335
-
336
-
337
- // handle CDATA
338
- function tokenCDATA(stream, state) {
339
- var ch;
340
- while (ch = stream.next()) {
341
- if (ch == "]" && stream.match("]", true)) {
342
- state.tokenize = tokenBase;
343
- return "comment";
344
- }
345
- }
346
- }
347
-
348
- // handle preprocessing instructions
349
- function tokenPreProcessing(stream, state) {
350
- var ch;
351
- while (ch = stream.next()) {
352
- if (ch == "?" && stream.match(">", true)) {
353
- state.tokenize = tokenBase;
354
- return "processingInstruction";
355
- }
356
- }
357
- }
358
-
359
-
360
- // functions to test the current context of the state
361
- function isInXmlBlock(state) { return isIn(state, "tag"); }
362
- function isInXmlAttributeBlock(state) { return isIn(state, "attribute"); }
363
- function isInXmlConstructor(state) { return isIn(state, "xmlconstructor"); }
364
-
365
- function isEQNameAhead(stream) {
366
- // assume we've already eaten a quote (")
367
- if(stream.current() === '"')
368
- return stream.match(/^[^\"]+\"\:/, false);
369
- else if(stream.current() === '\'')
370
- return stream.match(/^[^\"]+\'\:/, false);
371
- else
372
- return false;
373
- }
374
-
375
- function isIn(state, type) {
376
- return (state.stack.length && state.stack[state.stack.length - 1].type == type);
377
- }
378
-
379
- function pushStateStack(state, newState) {
380
- state.stack.push(newState);
381
- }
382
-
383
- function popStateStack(state) {
384
- state.stack.pop();
385
- var reinstateTokenize = state.stack.length && state.stack[state.stack.length-1].tokenize;
386
- state.tokenize = reinstateTokenize || tokenBase;
387
- }
388
-
389
- // the interface for the mode API
390
- const xQuery = {
391
- name: "xquery",
392
- startState: function() {
393
- return {
394
- tokenize: tokenBase,
395
- cc: [],
396
- stack: []
397
- };
398
- },
399
-
400
- token: function(stream, state) {
401
- if (stream.eatSpace()) return null;
402
- var style = state.tokenize(stream, state);
403
- return style;
404
- },
405
-
406
- languageData: {
407
- commentTokens: {block: {open: "(:", close: ":)"}}
408
- }
409
- };
410
-
411
- export { xQuery };