@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,89 +0,0 @@
1
- var headerSeparator = /^-+$/;
2
- var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /;
3
- var simpleEmail = /^[\w+.-]+@[\w.-]+/;
4
-
5
- const rpmChanges = {
6
- name: "rpmchanges",
7
- token: function(stream) {
8
- if (stream.sol()) {
9
- if (stream.match(headerSeparator)) { return 'tag'; }
10
- if (stream.match(headerLine)) { return 'tag'; }
11
- }
12
- if (stream.match(simpleEmail)) { return 'string'; }
13
- stream.next();
14
- return null;
15
- }
16
- };
17
-
18
- // Quick and dirty spec file highlighting
19
-
20
- var arch = /^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/;
21
-
22
- var preamble = /^[a-zA-Z0-9()]+:/;
23
- var section = /^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/;
24
- var control_flow_complex = /^%(ifnarch|ifarch|if)/; // rpm control flow macros
25
- var control_flow_simple = /^%(else|endif)/; // rpm control flow macros
26
- var operators = /^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/; // operators in control flow macros
27
-
28
- const rpmSpec = {
29
- name: "rpmspec",
30
- startState: function () {
31
- return {
32
- controlFlow: false,
33
- macroParameters: false,
34
- section: false
35
- };
36
- },
37
- token: function (stream, state) {
38
- var ch = stream.peek();
39
- if (ch == "#") { stream.skipToEnd(); return "comment"; }
40
-
41
- if (stream.sol()) {
42
- if (stream.match(preamble)) { return "header"; }
43
- if (stream.match(section)) { return "atom"; }
44
- }
45
-
46
- if (stream.match(/^\$\w+/)) { return "def"; } // Variables like '$RPM_BUILD_ROOT'
47
- if (stream.match(/^\$\{\w+\}/)) { return "def"; } // Variables like '${RPM_BUILD_ROOT}'
48
-
49
- if (stream.match(control_flow_simple)) { return "keyword"; }
50
- if (stream.match(control_flow_complex)) {
51
- state.controlFlow = true;
52
- return "keyword";
53
- }
54
- if (state.controlFlow) {
55
- if (stream.match(operators)) { return "operator"; }
56
- if (stream.match(/^(\d+)/)) { return "number"; }
57
- if (stream.eol()) { state.controlFlow = false; }
58
- }
59
-
60
- if (stream.match(arch)) {
61
- if (stream.eol()) { state.controlFlow = false; }
62
- return "number";
63
- }
64
-
65
- // Macros like '%make_install' or '%attr(0775,root,root)'
66
- if (stream.match(/^%[\w]+/)) {
67
- if (stream.match('(')) { state.macroParameters = true; }
68
- return "keyword";
69
- }
70
- if (state.macroParameters) {
71
- if (stream.match(/^\d+/)) { return "number";}
72
- if (stream.match(')')) {
73
- state.macroParameters = false;
74
- return "keyword";
75
- }
76
- }
77
-
78
- // Macros like '%{defined fedora}'
79
- if (stream.match(/^%\{\??[\w \-\:\!]+\}/)) {
80
- if (stream.eol()) { state.controlFlow = false; }
81
- return "def";
82
- }
83
-
84
- stream.next();
85
- return null;
86
- }
87
- };
88
-
89
- export { rpmChanges, rpmSpec };
@@ -1,287 +0,0 @@
1
- function wordObj(words) {
2
- var o = {};
3
- for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;
4
- return o;
5
- }
6
-
7
- var keywordList = [
8
- "alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined?", "do", "else",
9
- "elsif", "END", "end", "ensure", "false", "for", "if", "in", "module", "next", "not", "or",
10
- "redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless",
11
- "until", "when", "while", "yield", "nil", "raise", "throw", "catch", "fail", "loop", "callcc",
12
- "caller", "lambda", "proc", "public", "protected", "private", "require", "load",
13
- "require_relative", "extend", "autoload", "__END__", "__FILE__", "__LINE__", "__dir__"
14
- ], keywords = wordObj(keywordList);
15
-
16
- var indentWords = wordObj(["def", "class", "case", "for", "while", "until", "module",
17
- "catch", "loop", "proc", "begin"]);
18
- var dedentWords = wordObj(["end", "until"]);
19
- var opening = {"[": "]", "{": "}", "(": ")"};
20
- var closing = {"]": "[", "}": "{", ")": "("};
21
-
22
- var curPunc;
23
-
24
- function chain(newtok, stream, state) {
25
- state.tokenize.push(newtok);
26
- return newtok(stream, state);
27
- }
28
-
29
- function tokenBase(stream, state) {
30
- if (stream.sol() && stream.match("=begin") && stream.eol()) {
31
- state.tokenize.push(readBlockComment);
32
- return "comment";
33
- }
34
- if (stream.eatSpace()) return null;
35
- var ch = stream.next(), m;
36
- if (ch == "`" || ch == "'" || ch == '"') {
37
- return chain(readQuoted(ch, "string", ch == '"' || ch == "`"), stream, state);
38
- } else if (ch == "/") {
39
- if (regexpAhead(stream))
40
- return chain(readQuoted(ch, "string.special", true), stream, state);
41
- else
42
- return "operator";
43
- } else if (ch == "%") {
44
- var style = "string", embed = true;
45
- if (stream.eat("s")) style = "atom";
46
- else if (stream.eat(/[WQ]/)) style = "string";
47
- else if (stream.eat(/[r]/)) style = "string.special";
48
- else if (stream.eat(/[wxq]/)) { style = "string"; embed = false; }
49
- var delim = stream.eat(/[^\w\s=]/);
50
- if (!delim) return "operator";
51
- if (opening.propertyIsEnumerable(delim)) delim = opening[delim];
52
- return chain(readQuoted(delim, style, embed, true), stream, state);
53
- } else if (ch == "#") {
54
- stream.skipToEnd();
55
- return "comment";
56
- } else if (ch == "<" && (m = stream.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/))) {
57
- return chain(readHereDoc(m[2], m[1]), stream, state);
58
- } else if (ch == "0") {
59
- if (stream.eat("x")) stream.eatWhile(/[\da-fA-F]/);
60
- else if (stream.eat("b")) stream.eatWhile(/[01]/);
61
- else stream.eatWhile(/[0-7]/);
62
- return "number";
63
- } else if (/\d/.test(ch)) {
64
- stream.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/);
65
- return "number";
66
- } else if (ch == "?") {
67
- while (stream.match(/^\\[CM]-/)) {}
68
- if (stream.eat("\\")) stream.eatWhile(/\w/);
69
- else stream.next();
70
- return "string";
71
- } else if (ch == ":") {
72
- if (stream.eat("'")) return chain(readQuoted("'", "atom", false), stream, state);
73
- if (stream.eat('"')) return chain(readQuoted('"', "atom", true), stream, state);
74
-
75
- // :> :>> :< :<< are valid symbols
76
- if (stream.eat(/[\<\>]/)) {
77
- stream.eat(/[\<\>]/);
78
- return "atom";
79
- }
80
-
81
- // :+ :- :/ :* :| :& :! are valid symbols
82
- if (stream.eat(/[\+\-\*\/\&\|\:\!]/)) {
83
- return "atom";
84
- }
85
-
86
- // Symbols can't start by a digit
87
- if (stream.eat(/[a-zA-Z$@_\xa1-\uffff]/)) {
88
- stream.eatWhile(/[\w$\xa1-\uffff]/);
89
- // Only one ? ! = is allowed and only as the last character
90
- stream.eat(/[\?\!\=]/);
91
- return "atom";
92
- }
93
- return "operator";
94
- } else if (ch == "@" && stream.match(/^@?[a-zA-Z_\xa1-\uffff]/)) {
95
- stream.eat("@");
96
- stream.eatWhile(/[\w\xa1-\uffff]/);
97
- return "propertyName";
98
- } else if (ch == "$") {
99
- if (stream.eat(/[a-zA-Z_]/)) {
100
- stream.eatWhile(/[\w]/);
101
- } else if (stream.eat(/\d/)) {
102
- stream.eat(/\d/);
103
- } else {
104
- stream.next(); // Must be a special global like $: or $!
105
- }
106
- return "variableName.special";
107
- } else if (/[a-zA-Z_\xa1-\uffff]/.test(ch)) {
108
- stream.eatWhile(/[\w\xa1-\uffff]/);
109
- stream.eat(/[\?\!]/);
110
- if (stream.eat(":")) return "atom";
111
- return "variable";
112
- } else if (ch == "|" && (state.varList || state.lastTok == "{" || state.lastTok == "do")) {
113
- curPunc = "|";
114
- return null;
115
- } else if (/[\(\)\[\]{}\\;]/.test(ch)) {
116
- curPunc = ch;
117
- return null;
118
- } else if (ch == "-" && stream.eat(">")) {
119
- return "operator";
120
- } else if (/[=+\-\/*:\.^%<>~|]/.test(ch)) {
121
- var more = stream.eatWhile(/[=+\-\/*:\.^%<>~|]/);
122
- if (ch == "." && !more) curPunc = ".";
123
- return "operator";
124
- } else {
125
- return null;
126
- }
127
- }
128
-
129
- function regexpAhead(stream) {
130
- var start = stream.pos, depth = 0, next, found = false, escaped = false;
131
- while ((next = stream.next()) != null) {
132
- if (!escaped) {
133
- if ("[{(".indexOf(next) > -1) {
134
- depth++;
135
- } else if ("]})".indexOf(next) > -1) {
136
- depth--;
137
- if (depth < 0) break
138
- } else if (next == "/" && depth == 0) {
139
- found = true;
140
- break
141
- }
142
- escaped = next == "\\";
143
- } else {
144
- escaped = false;
145
- }
146
- }
147
- stream.backUp(stream.pos - start);
148
- return found
149
- }
150
-
151
- function tokenBaseUntilBrace(depth) {
152
- if (!depth) depth = 1;
153
- return function(stream, state) {
154
- if (stream.peek() == "}") {
155
- if (depth == 1) {
156
- state.tokenize.pop();
157
- return state.tokenize[state.tokenize.length-1](stream, state);
158
- } else {
159
- state.tokenize[state.tokenize.length - 1] = tokenBaseUntilBrace(depth - 1);
160
- }
161
- } else if (stream.peek() == "{") {
162
- state.tokenize[state.tokenize.length - 1] = tokenBaseUntilBrace(depth + 1);
163
- }
164
- return tokenBase(stream, state);
165
- };
166
- }
167
- function tokenBaseOnce() {
168
- var alreadyCalled = false;
169
- return function(stream, state) {
170
- if (alreadyCalled) {
171
- state.tokenize.pop();
172
- return state.tokenize[state.tokenize.length-1](stream, state);
173
- }
174
- alreadyCalled = true;
175
- return tokenBase(stream, state);
176
- };
177
- }
178
- function readQuoted(quote, style, embed, unescaped) {
179
- return function(stream, state) {
180
- var escaped = false, ch;
181
-
182
- if (state.context.type === 'read-quoted-paused') {
183
- state.context = state.context.prev;
184
- stream.eat("}");
185
- }
186
-
187
- while ((ch = stream.next()) != null) {
188
- if (ch == quote && (unescaped || !escaped)) {
189
- state.tokenize.pop();
190
- break;
191
- }
192
- if (embed && ch == "#" && !escaped) {
193
- if (stream.eat("{")) {
194
- if (quote == "}") {
195
- state.context = {prev: state.context, type: 'read-quoted-paused'};
196
- }
197
- state.tokenize.push(tokenBaseUntilBrace());
198
- break;
199
- } else if (/[@\$]/.test(stream.peek())) {
200
- state.tokenize.push(tokenBaseOnce());
201
- break;
202
- }
203
- }
204
- escaped = !escaped && ch == "\\";
205
- }
206
- return style;
207
- };
208
- }
209
- function readHereDoc(phrase, mayIndent) {
210
- return function(stream, state) {
211
- if (mayIndent) stream.eatSpace();
212
- if (stream.match(phrase)) state.tokenize.pop();
213
- else stream.skipToEnd();
214
- return "string";
215
- };
216
- }
217
- function readBlockComment(stream, state) {
218
- if (stream.sol() && stream.match("=end") && stream.eol())
219
- state.tokenize.pop();
220
- stream.skipToEnd();
221
- return "comment";
222
- }
223
-
224
- const ruby = {
225
- name: "ruby",
226
- startState: function(indentUnit) {
227
- return {tokenize: [tokenBase],
228
- indented: 0,
229
- context: {type: "top", indented: -indentUnit},
230
- continuedLine: false,
231
- lastTok: null,
232
- varList: false};
233
- },
234
-
235
- token: function(stream, state) {
236
- curPunc = null;
237
- if (stream.sol()) state.indented = stream.indentation();
238
- var style = state.tokenize[state.tokenize.length-1](stream, state), kwtype;
239
- var thisTok = curPunc;
240
- if (style == "variable") {
241
- var word = stream.current();
242
- style = state.lastTok == "." ? "property"
243
- : keywords.propertyIsEnumerable(stream.current()) ? "keyword"
244
- : /^[A-Z]/.test(word) ? "tag"
245
- : (state.lastTok == "def" || state.lastTok == "class" || state.varList) ? "def"
246
- : "variable";
247
- if (style == "keyword") {
248
- thisTok = word;
249
- if (indentWords.propertyIsEnumerable(word)) kwtype = "indent";
250
- else if (dedentWords.propertyIsEnumerable(word)) kwtype = "dedent";
251
- else if ((word == "if" || word == "unless") && stream.column() == stream.indentation())
252
- kwtype = "indent";
253
- else if (word == "do" && state.context.indented < state.indented)
254
- kwtype = "indent";
255
- }
256
- }
257
- if (curPunc || (style && style != "comment")) state.lastTok = thisTok;
258
- if (curPunc == "|") state.varList = !state.varList;
259
-
260
- if (kwtype == "indent" || /[\(\[\{]/.test(curPunc))
261
- state.context = {prev: state.context, type: curPunc || style, indented: state.indented};
262
- else if ((kwtype == "dedent" || /[\)\]\}]/.test(curPunc)) && state.context.prev)
263
- state.context = state.context.prev;
264
-
265
- if (stream.eol())
266
- state.continuedLine = (curPunc == "\\" || style == "operator");
267
- return style;
268
- },
269
-
270
- indent: function(state, textAfter, cx) {
271
- if (state.tokenize[state.tokenize.length-1] != tokenBase) return null;
272
- var firstChar = textAfter && textAfter.charAt(0);
273
- var ct = state.context;
274
- var closed = ct.type == closing[firstChar] ||
275
- ct.type == "keyword" && /^(?:end|until|else|elsif|when|rescue)\b/.test(textAfter);
276
- return ct.indented + (closed ? 0 : cx.unit) +
277
- (state.continuedLine ? cx.unit : 0);
278
- },
279
-
280
- languageData: {
281
- indentOnInput: /^\s*(?:end|rescue|elsif|else|\})$/,
282
- commentTokens: {line: "#"},
283
- autocomplete: keywordList
284
- }
285
- };
286
-
287
- export { ruby };
@@ -1,268 +0,0 @@
1
- var words = {};
2
- var isDoubleOperatorSym = {
3
- eq: 'operator',
4
- lt: 'operator',
5
- le: 'operator',
6
- gt: 'operator',
7
- ge: 'operator',
8
- "in": 'operator',
9
- ne: 'operator',
10
- or: 'operator'
11
- };
12
- var isDoubleOperatorChar = /(<=|>=|!=|<>)/;
13
- var isSingleOperatorChar = /[=\(:\),{}.*<>+\-\/^\[\]]/;
14
-
15
- // Takes a string of words separated by spaces and adds them as
16
- // keys with the value of the first argument 'style'
17
- function define(style, string, context) {
18
- if (context) {
19
- var split = string.split(' ');
20
- for (var i = 0; i < split.length; i++) {
21
- words[split[i]] = {style: style, state: context};
22
- }
23
- }
24
- }
25
- //datastep
26
- define('def', 'stack pgm view source debug nesting nolist', ['inDataStep']);
27
- define('def', 'if while until for do do; end end; then else cancel', ['inDataStep']);
28
- define('def', 'label format _n_ _error_', ['inDataStep']);
29
- define('def', 'ALTER BUFNO BUFSIZE CNTLLEV COMPRESS DLDMGACTION ENCRYPT ENCRYPTKEY EXTENDOBSCOUNTER GENMAX GENNUM INDEX LABEL OBSBUF OUTREP PW PWREQ READ REPEMPTY REPLACE REUSE ROLE SORTEDBY SPILL TOBSNO TYPE WRITE FILECLOSE FIRSTOBS IN OBS POINTOBS WHERE WHEREUP IDXNAME IDXWHERE DROP KEEP RENAME', ['inDataStep']);
30
- define('def', 'filevar finfo finv fipname fipnamel fipstate first firstobs floor', ['inDataStep']);
31
- define('def', 'varfmt varinfmt varlabel varlen varname varnum varray varrayx vartype verify vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vnferr vtype vtypex weekday', ['inDataStep']);
32
- define('def', 'zipfips zipname zipnamel zipstate', ['inDataStep']);
33
- define('def', 'put putc putn', ['inDataStep']);
34
- define('builtin', 'data run', ['inDataStep']);
35
-
36
-
37
- //proc
38
- define('def', 'data', ['inProc']);
39
-
40
- // flow control for macros
41
- define('def', '%if %end %end; %else %else; %do %do; %then', ['inMacro']);
42
-
43
- //everywhere
44
- define('builtin', 'proc run; quit; libname filename %macro %mend option options', ['ALL']);
45
-
46
- define('def', 'footnote title libname ods', ['ALL']);
47
- define('def', '%let %put %global %sysfunc %eval ', ['ALL']);
48
- // automatic macro variables http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a003167023.htm
49
- define('variable', '&sysbuffr &syscc &syscharwidth &syscmd &sysdate &sysdate9 &sysday &sysdevic &sysdmg &sysdsn &sysencoding &sysenv &syserr &syserrortext &sysfilrc &syshostname &sysindex &sysinfo &sysjobid &syslast &syslckrc &syslibrc &syslogapplname &sysmacroname &sysmenv &sysmsg &sysncpu &sysodspath &sysparm &syspbuff &sysprocessid &sysprocessname &sysprocname &sysrc &sysscp &sysscpl &sysscpl &syssite &sysstartid &sysstartname &systcpiphostname &systime &sysuserid &sysver &sysvlong &sysvlong4 &syswarningtext', ['ALL']);
50
-
51
- //footnote[1-9]? title[1-9]?
52
-
53
- //options statement
54
- define('def', 'source2 nosource2 page pageno pagesize', ['ALL']);
55
-
56
- //proc and datastep
57
- define('def', '_all_ _character_ _cmd_ _freq_ _i_ _infile_ _last_ _msg_ _null_ _numeric_ _temporary_ _type_ abort abs addr adjrsq airy alpha alter altlog altprint and arcos array arsin as atan attrc attrib attrn authserver autoexec awscontrol awsdef awsmenu awsmenumerge awstitle backward band base betainv between blocksize blshift bnot bor brshift bufno bufsize bxor by byerr byline byte calculated call cards cards4 catcache cbufno cdf ceil center cexist change chisq cinv class cleanup close cnonct cntllev coalesce codegen col collate collin column comamid comaux1 comaux2 comdef compbl compound compress config continue convert cos cosh cpuid create cross crosstab css curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy datalines datalines4 datejul datepart datetime day dbcslang dbcstype dclose ddfm ddm delete delimiter depdb depdbsl depsl depsyd deptab dequote descending descript design= device dflang dhms dif digamma dim dinfo display distinct dkricond dkrocond dlm dnum do dopen doptname doptnum dread drop dropnote dsname dsnferr echo else emaildlg emailid emailpw emailserver emailsys encrypt end endsas engine eof eov erf erfc error errorcheck errors exist exp fappend fclose fcol fdelete feedback fetch fetchobs fexist fget file fileclose fileexist filefmt filename fileref fmterr fmtsearch fnonct fnote font fontalias fopen foptname foptnum force formatted formchar formdelim formdlim forward fpoint fpos fput fread frewind frlen from fsep fuzz fwrite gaminv gamma getoption getvarc getvarn go goto group gwindow hbar hbound helpenv helploc hms honorappearance hosthelp hostprint hour hpct html hvar ibessel ibr id if index indexc indexw initcmd initstmt inner input inputc inputn inr insert int intck intnx into intrr invaliddata irr is jbessel join juldate keep kentb kurtosis label lag last lbound leave left length levels lgamma lib library libref line linesize link list log log10 log2 logpdf logpmf logsdf lostcard lowcase lrecl ls macro macrogen maps mautosource max maxdec maxr mdy mean measures median memtype merge merror min minute missing missover mlogic mod mode model modify month mopen mort mprint mrecall msglevel msymtabmax mvarsize myy n nest netpv new news nmiss no nobatch nobs nocaps nocardimage nocenter nocharcode nocmdmac nocol nocum nodate nodbcs nodetails nodmr nodms nodmsbatch nodup nodupkey noduplicates noechoauto noequals noerrorabend noexitwindows nofullstimer noicon noimplmac noint nolist noloadlist nomiss nomlogic nomprint nomrecall nomsgcase nomstored nomultenvappl nonotes nonumber noobs noovp nopad nopercent noprint noprintinit normal norow norsasuser nosetinit nosplash nosymbolgen note notes notitle notitles notsorted noverbose noxsync noxwait npv null number numkeys nummousekeys nway obs on open order ordinal otherwise out outer outp= output over ovp p(1 5 10 25 50 75 90 95 99) pad pad2 paired parm parmcards path pathdll pathname pdf peek peekc pfkey pmf point poisson poke position printer probbeta probbnml probchi probf probgam probhypr probit probnegb probnorm probsig probt procleave prt ps pw pwreq qtr quote r ranbin rancau random ranexp rangam range ranks rannor ranpoi rantbl rantri ranuni rcorr read recfm register regr remote remove rename repeat repeated replace resolve retain return reuse reverse rewind right round rsquare rtf rtrace rtraceloc s s2 samploc sasautos sascontrol sasfrscr sasmsg sasmstore sasscript sasuser saving scan sdf second select selection separated seq serror set setcomm setot sign simple sin sinh siteinfo skewness skip sle sls sortedby sortpgm sortseq sortsize soundex spedis splashlocation split spool sqrt start std stderr stdin stfips stimer stname stnamel stop stopover sub subgroup subpopn substr sum sumwgt symbol symbolgen symget symput sysget sysin sysleave sysmsg sysparm sysprint sysprintfont sysprod sysrc system t table tables tan tanh tapeclose tbufsize terminal test then timepart tinv tnonct to today tol tooldef totper transformout translate trantab tranwrd trigamma trim trimn trunc truncover type unformatted uniform union until upcase update user usericon uss validate value var weight when where while wincharset window work workinit workterm write wsum xsync xwait yearcutoff yes yyq min max', ['inDataStep', 'inProc']);
58
- define('operator', 'and not ', ['inDataStep', 'inProc']);
59
-
60
- // Main function
61
- function tokenize(stream, state) {
62
- // Finally advance the stream
63
- var ch = stream.next();
64
-
65
- // BLOCKCOMMENT
66
- if (ch === '/' && stream.eat('*')) {
67
- state.continueComment = true;
68
- return "comment";
69
- } else if (state.continueComment === true) { // in comment block
70
- //comment ends at the beginning of the line
71
- if (ch === '*' && stream.peek() === '/') {
72
- stream.next();
73
- state.continueComment = false;
74
- } else if (stream.skipTo('*')) { //comment is potentially later in line
75
- stream.skipTo('*');
76
- stream.next();
77
- if (stream.eat('/'))
78
- state.continueComment = false;
79
- } else {
80
- stream.skipToEnd();
81
- }
82
- return "comment";
83
- }
84
-
85
- if (ch == "*" && stream.column() == stream.indentation()) {
86
- stream.skipToEnd();
87
- return "comment"
88
- }
89
-
90
- // DoubleOperator match
91
- var doubleOperator = ch + stream.peek();
92
-
93
- if ((ch === '"' || ch === "'") && !state.continueString) {
94
- state.continueString = ch;
95
- return "string"
96
- } else if (state.continueString) {
97
- if (state.continueString == ch) {
98
- state.continueString = null;
99
- } else if (stream.skipTo(state.continueString)) {
100
- // quote found on this line
101
- stream.next();
102
- state.continueString = null;
103
- } else {
104
- stream.skipToEnd();
105
- }
106
- return "string";
107
- } else if (state.continueString !== null && stream.eol()) {
108
- stream.skipTo(state.continueString) || stream.skipToEnd();
109
- return "string";
110
- } else if (/[\d\.]/.test(ch)) { //find numbers
111
- if (ch === ".")
112
- stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/);
113
- else if (ch === "0")
114
- stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/);
115
- else
116
- stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/);
117
- return "number";
118
- } else if (isDoubleOperatorChar.test(ch + stream.peek())) { // TWO SYMBOL TOKENS
119
- stream.next();
120
- return "operator";
121
- } else if (isDoubleOperatorSym.hasOwnProperty(doubleOperator)) {
122
- stream.next();
123
- if (stream.peek() === ' ')
124
- return isDoubleOperatorSym[doubleOperator.toLowerCase()];
125
- } else if (isSingleOperatorChar.test(ch)) { // SINGLE SYMBOL TOKENS
126
- return "operator";
127
- }
128
-
129
- // Matches one whole word -- even if the word is a character
130
- var word;
131
- if (stream.match(/[%&;\w]+/, false) != null) {
132
- word = ch + stream.match(/[%&;\w]+/, true);
133
- if (/&/.test(word)) return 'variable'
134
- } else {
135
- word = ch;
136
- }
137
- // the word after DATA PROC or MACRO
138
- if (state.nextword) {
139
- stream.match(/[\w]+/);
140
- // match memname.libname
141
- if (stream.peek() === '.') stream.skipTo(' ');
142
- state.nextword = false;
143
- return 'variableName.special';
144
- }
145
-
146
- word = word.toLowerCase();
147
- // Are we in a DATA Step?
148
- if (state.inDataStep) {
149
- if (word === 'run;' || stream.match(/run\s;/)) {
150
- state.inDataStep = false;
151
- return 'builtin';
152
- }
153
- // variable formats
154
- if ((word) && stream.next() === '.') {
155
- //either a format or libname.memname
156
- if (/\w/.test(stream.peek())) return 'variableName.special';
157
- else return 'variable';
158
- }
159
- // do we have a DATA Step keyword
160
- if (word && words.hasOwnProperty(word) &&
161
- (words[word].state.indexOf("inDataStep") !== -1 ||
162
- words[word].state.indexOf("ALL") !== -1)) {
163
- //backup to the start of the word
164
- if (stream.start < stream.pos)
165
- stream.backUp(stream.pos - stream.start);
166
- //advance the length of the word and return
167
- for (var i = 0; i < word.length; ++i) stream.next();
168
- return words[word].style;
169
- }
170
- }
171
- // Are we in an Proc statement?
172
- if (state.inProc) {
173
- if (word === 'run;' || word === 'quit;') {
174
- state.inProc = false;
175
- return 'builtin';
176
- }
177
- // do we have a proc keyword
178
- if (word && words.hasOwnProperty(word) &&
179
- (words[word].state.indexOf("inProc") !== -1 ||
180
- words[word].state.indexOf("ALL") !== -1)) {
181
- stream.match(/[\w]+/);
182
- return words[word].style;
183
- }
184
- }
185
- // Are we in a Macro statement?
186
- if (state.inMacro) {
187
- if (word === '%mend') {
188
- if (stream.peek() === ';') stream.next();
189
- state.inMacro = false;
190
- return 'builtin';
191
- }
192
- if (word && words.hasOwnProperty(word) &&
193
- (words[word].state.indexOf("inMacro") !== -1 ||
194
- words[word].state.indexOf("ALL") !== -1)) {
195
- stream.match(/[\w]+/);
196
- return words[word].style;
197
- }
198
-
199
- return 'atom';
200
- }
201
- // Do we have Keywords specific words?
202
- if (word && words.hasOwnProperty(word)) {
203
- // Negates the initial next()
204
- stream.backUp(1);
205
- // Actually move the stream
206
- stream.match(/[\w]+/);
207
- if (word === 'data' && /=/.test(stream.peek()) === false) {
208
- state.inDataStep = true;
209
- state.nextword = true;
210
- return 'builtin';
211
- }
212
- if (word === 'proc') {
213
- state.inProc = true;
214
- state.nextword = true;
215
- return 'builtin';
216
- }
217
- if (word === '%macro') {
218
- state.inMacro = true;
219
- state.nextword = true;
220
- return 'builtin';
221
- }
222
- if (/title[1-9]/.test(word)) return 'def';
223
-
224
- if (word === 'footnote') {
225
- stream.eat(/[1-9]/);
226
- return 'def';
227
- }
228
-
229
- // Returns their value as state in the prior define methods
230
- if (state.inDataStep === true && words[word].state.indexOf("inDataStep") !== -1)
231
- return words[word].style;
232
- if (state.inProc === true && words[word].state.indexOf("inProc") !== -1)
233
- return words[word].style;
234
- if (state.inMacro === true && words[word].state.indexOf("inMacro") !== -1)
235
- return words[word].style;
236
- if (words[word].state.indexOf("ALL") !== -1)
237
- return words[word].style;
238
- return null;
239
- }
240
- // Unrecognized syntax
241
- return null;
242
- }
243
-
244
- const sas = {
245
- name: "sas",
246
- startState: function () {
247
- return {
248
- inDataStep: false,
249
- inProc: false,
250
- inMacro: false,
251
- nextword: false,
252
- continueString: null,
253
- continueComment: false
254
- };
255
- },
256
- token: function (stream, state) {
257
- // Strip the spaces, but regex will account for them either way
258
- if (stream.eatSpace()) return null;
259
- // Go through the main process
260
- return tokenize(stream, state);
261
- },
262
-
263
- languageData: {
264
- commentTokens: {block: {open: "/*", close: "*/"}}
265
- }
266
- };
267
-
268
- export { sas };