@milkdown/crepe 7.5.0 → 7.5.2

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 (584) hide show
  1. package/lib/cjs/index-N1cRxqdw.js +39 -0
  2. package/lib/cjs/index-N1cRxqdw.js.map +1 -0
  3. package/lib/cjs/{index-cpC-j5Nt.js → index-TGmNEvsj.js} +31 -40
  4. package/lib/cjs/index-TGmNEvsj.js.map +1 -0
  5. package/lib/cjs/index-dEVmN_aj.js +26 -0
  6. package/lib/cjs/index-dEVmN_aj.js.map +1 -0
  7. package/lib/cjs/index-fhKBUFkq.js +46 -0
  8. package/lib/cjs/index-fhKBUFkq.js.map +1 -0
  9. package/lib/cjs/index-ocxd4A-M.js +675 -0
  10. package/lib/cjs/index-ocxd4A-M.js.map +1 -0
  11. package/lib/cjs/{index-J3XY9IPt.js → index-rFFAL9YA.js} +9 -17
  12. package/lib/cjs/{index-J3XY9IPt.js.map → index-rFFAL9YA.js.map} +1 -1
  13. package/lib/cjs/index-rLAgJeYn.js +28 -0
  14. package/lib/cjs/index-rLAgJeYn.js.map +1 -0
  15. package/lib/cjs/index-tlx25I_m.js +36 -0
  16. package/lib/cjs/index-tlx25I_m.js.map +1 -0
  17. package/lib/cjs/index-uleaJDBC.js +19 -0
  18. package/lib/cjs/index-uleaJDBC.js.map +1 -0
  19. package/lib/cjs/index.js +150 -14
  20. package/lib/cjs/index.js.map +1 -1
  21. package/lib/cjs/{todoList-Ze4FLMlx.js → todoList-YYRQo7wG.js} +1 -12
  22. package/lib/cjs/todoList-YYRQo7wG.js.map +1 -0
  23. package/lib/esm/index-6JoGWH2I.js +17 -0
  24. package/lib/esm/index-6JoGWH2I.js.map +1 -0
  25. package/lib/esm/{index-MB6wQe1U.js → index-CMGDOz11.js} +5 -13
  26. package/lib/esm/{index-MB6wQe1U.js.map → index-CMGDOz11.js.map} +1 -1
  27. package/lib/esm/index-HlPKwzLC.js +34 -0
  28. package/lib/esm/index-HlPKwzLC.js.map +1 -0
  29. package/lib/esm/index-_A9vu1ED.js +673 -0
  30. package/lib/esm/index-_A9vu1ED.js.map +1 -0
  31. package/lib/esm/index-amuALmzU.js +26 -0
  32. package/lib/esm/index-amuALmzU.js.map +1 -0
  33. package/lib/esm/index-fVrfHXda.js +24 -0
  34. package/lib/esm/index-fVrfHXda.js.map +1 -0
  35. package/lib/esm/index-jU_6odT9.js +44 -0
  36. package/lib/esm/index-jU_6odT9.js.map +1 -0
  37. package/lib/esm/index-ohmbt6Ys.js +37 -0
  38. package/lib/esm/index-ohmbt6Ys.js.map +1 -0
  39. package/lib/esm/{index-A83StUe6.js → index-w69wbtEZ.js} +9 -18
  40. package/lib/esm/{index-A83StUe6.js.map → index-w69wbtEZ.js.map} +1 -1
  41. package/lib/esm/index.js +152 -12
  42. package/lib/esm/index.js.map +1 -1
  43. package/lib/esm/{todoList-M-PGJKde.js → todoList-9QsDDcmB.js} +2 -12
  44. package/lib/esm/todoList-9QsDDcmB.js.map +1 -0
  45. package/package.json +2 -4
  46. package/lib/cjs/_view-N32ied53.js +0 -27
  47. package/lib/cjs/_view-N32ied53.js.map +0 -1
  48. package/lib/cjs/apl-99bWvYTf.js +0 -145
  49. package/lib/cjs/apl-99bWvYTf.js.map +0 -1
  50. package/lib/cjs/asciiarmor-cf0JLIr_.js +0 -59
  51. package/lib/cjs/asciiarmor-cf0JLIr_.js.map +0 -1
  52. package/lib/cjs/asn1-H4XzAvBS.js +0 -195
  53. package/lib/cjs/asn1-H4XzAvBS.js.map +0 -1
  54. package/lib/cjs/asterisk-0FgJEfZB.js +0 -190
  55. package/lib/cjs/asterisk-0FgJEfZB.js.map +0 -1
  56. package/lib/cjs/brainfuck-JX7vRZy7.js +0 -73
  57. package/lib/cjs/brainfuck-JX7vRZy7.js.map +0 -1
  58. package/lib/cjs/clike-ueXlMQy5.js +0 -1034
  59. package/lib/cjs/clike-ueXlMQy5.js.map +0 -1
  60. package/lib/cjs/clojure-6iDAG5oi.js +0 -277
  61. package/lib/cjs/clojure-6iDAG5oi.js.map +0 -1
  62. package/lib/cjs/clsx-dASsG01A.js +0 -6
  63. package/lib/cjs/clsx-dASsG01A.js.map +0 -1
  64. package/lib/cjs/cmake-L0RIBnfc.js +0 -84
  65. package/lib/cjs/cmake-L0RIBnfc.js.map +0 -1
  66. package/lib/cjs/cobol-oxkMh1GJ.js +0 -238
  67. package/lib/cjs/cobol-oxkMh1GJ.js.map +0 -1
  68. package/lib/cjs/coffeescript--eauIeRQ.js +0 -332
  69. package/lib/cjs/coffeescript--eauIeRQ.js.map +0 -1
  70. package/lib/cjs/commonlisp-pgSu-q6f.js +0 -111
  71. package/lib/cjs/commonlisp-pgSu-q6f.js.map +0 -1
  72. package/lib/cjs/crystal-2y3I5ibZ.js +0 -422
  73. package/lib/cjs/crystal-2y3I5ibZ.js.map +0 -1
  74. package/lib/cjs/css-WH69cXzo.js +0 -855
  75. package/lib/cjs/css-WH69cXzo.js.map +0 -1
  76. package/lib/cjs/cypher-da-dqVyQ.js +0 -125
  77. package/lib/cjs/cypher-da-dqVyQ.js.map +0 -1
  78. package/lib/cjs/d-58J7EOkP.js +0 -208
  79. package/lib/cjs/d-58J7EOkP.js.map +0 -1
  80. package/lib/cjs/diff-437Hfzqm.js +0 -33
  81. package/lib/cjs/diff-437Hfzqm.js.map +0 -1
  82. package/lib/cjs/dockerfile-7i0OoaQe.js +0 -202
  83. package/lib/cjs/dockerfile-7i0OoaQe.js.map +0 -1
  84. package/lib/cjs/dtd-AKekCPPB.js +0 -124
  85. package/lib/cjs/dtd-AKekCPPB.js.map +0 -1
  86. package/lib/cjs/dylan-DLEmvz1I.js +0 -340
  87. package/lib/cjs/dylan-DLEmvz1I.js.map +0 -1
  88. package/lib/cjs/ebnf-36cJWqxB.js +0 -154
  89. package/lib/cjs/ebnf-36cJWqxB.js.map +0 -1
  90. package/lib/cjs/ecl-UWr5vJKJ.js +0 -193
  91. package/lib/cjs/ecl-UWr5vJKJ.js.map +0 -1
  92. package/lib/cjs/eiffel-Su-C9LAY.js +0 -149
  93. package/lib/cjs/eiffel-Su-C9LAY.js.map +0 -1
  94. package/lib/cjs/elm-vNNfVJj7.js +0 -233
  95. package/lib/cjs/elm-vNNfVJj7.js.map +0 -1
  96. package/lib/cjs/erlang-NM9dgYaS.js +0 -584
  97. package/lib/cjs/erlang-NM9dgYaS.js.map +0 -1
  98. package/lib/cjs/factor-RWs-4aWg.js +0 -68
  99. package/lib/cjs/factor-RWs-4aWg.js.map +0 -1
  100. package/lib/cjs/fcl-acUhGCfs.js +0 -157
  101. package/lib/cjs/fcl-acUhGCfs.js.map +0 -1
  102. package/lib/cjs/floating-ui.dom-2cjBpir5.js +0 -1134
  103. package/lib/cjs/floating-ui.dom-2cjBpir5.js.map +0 -1
  104. package/lib/cjs/forth-sDkE6z3A.js +0 -167
  105. package/lib/cjs/forth-sDkE6z3A.js.map +0 -1
  106. package/lib/cjs/fortran-gkb4yvdk.js +0 -175
  107. package/lib/cjs/fortran-gkb4yvdk.js.map +0 -1
  108. package/lib/cjs/gas-mNA0qvkv.js +0 -347
  109. package/lib/cjs/gas-mNA0qvkv.js.map +0 -1
  110. package/lib/cjs/gherkin-5uyKpXXh.js +0 -150
  111. package/lib/cjs/gherkin-5uyKpXXh.js.map +0 -1
  112. package/lib/cjs/go-5XitXoIZ.js +0 -167
  113. package/lib/cjs/go-5XitXoIZ.js.map +0 -1
  114. package/lib/cjs/groovy-mz3pWMKN.js +0 -233
  115. package/lib/cjs/groovy-mz3pWMKN.js.map +0 -1
  116. package/lib/cjs/haskell-9KaSS7kb.js +0 -242
  117. package/lib/cjs/haskell-9KaSS7kb.js.map +0 -1
  118. package/lib/cjs/haxe-L8h6Pvni.js +0 -494
  119. package/lib/cjs/haxe-L8h6Pvni.js.map +0 -1
  120. package/lib/cjs/helper-1aludV1Z.js +0 -15
  121. package/lib/cjs/helper-1aludV1Z.js.map +0 -1
  122. package/lib/cjs/http-BFQQnRR-.js +0 -92
  123. package/lib/cjs/http-BFQQnRR-.js.map +0 -1
  124. package/lib/cjs/idl-29T-AzAy.js +0 -277
  125. package/lib/cjs/idl-29T-AzAy.js.map +0 -1
  126. package/lib/cjs/index--sa4NMpW.js +0 -119
  127. package/lib/cjs/index--sa4NMpW.js.map +0 -1
  128. package/lib/cjs/index--tnUmqZ_.js +0 -108
  129. package/lib/cjs/index--tnUmqZ_.js.map +0 -1
  130. package/lib/cjs/index-1vHyMXH8.js +0 -203
  131. package/lib/cjs/index-1vHyMXH8.js.map +0 -1
  132. package/lib/cjs/index-28q261C7.js +0 -448
  133. package/lib/cjs/index-28q261C7.js.map +0 -1
  134. package/lib/cjs/index-55VIM-52.js +0 -156
  135. package/lib/cjs/index-55VIM-52.js.map +0 -1
  136. package/lib/cjs/index-92bwto5V.js +0 -405
  137. package/lib/cjs/index-92bwto5V.js.map +0 -1
  138. package/lib/cjs/index-Buu2tD9O.js +0 -534
  139. package/lib/cjs/index-Buu2tD9O.js.map +0 -1
  140. package/lib/cjs/index-E4Ist86Z.js +0 -532
  141. package/lib/cjs/index-E4Ist86Z.js.map +0 -1
  142. package/lib/cjs/index-FbNqlZU8.js +0 -263
  143. package/lib/cjs/index-FbNqlZU8.js.map +0 -1
  144. package/lib/cjs/index-HH5lPgpj.js +0 -443
  145. package/lib/cjs/index-HH5lPgpj.js.map +0 -1
  146. package/lib/cjs/index-J1-yHn7v.js +0 -128
  147. package/lib/cjs/index-J1-yHn7v.js.map +0 -1
  148. package/lib/cjs/index-Jztk6JlP.js +0 -25698
  149. package/lib/cjs/index-Jztk6JlP.js.map +0 -1
  150. package/lib/cjs/index-N6pPZY61.js +0 -191
  151. package/lib/cjs/index-N6pPZY61.js.map +0 -1
  152. package/lib/cjs/index-TUJs6KKL.js +0 -472
  153. package/lib/cjs/index-TUJs6KKL.js.map +0 -1
  154. package/lib/cjs/index-Tjg8KyK7.js +0 -398
  155. package/lib/cjs/index-Tjg8KyK7.js.map +0 -1
  156. package/lib/cjs/index-VYwHTL3F.js +0 -161
  157. package/lib/cjs/index-VYwHTL3F.js.map +0 -1
  158. package/lib/cjs/index-_GOdKqUK.js +0 -1147
  159. package/lib/cjs/index-_GOdKqUK.js.map +0 -1
  160. package/lib/cjs/index-cKQcw-eu.js +0 -386
  161. package/lib/cjs/index-cKQcw-eu.js.map +0 -1
  162. package/lib/cjs/index-c_OzudR7.js +0 -699
  163. package/lib/cjs/index-c_OzudR7.js.map +0 -1
  164. package/lib/cjs/index-cb-5m0vG.js +0 -2519
  165. package/lib/cjs/index-cb-5m0vG.js.map +0 -1
  166. package/lib/cjs/index-cpC-j5Nt.js.map +0 -1
  167. package/lib/cjs/index-crv_k6dv.js +0 -1353
  168. package/lib/cjs/index-crv_k6dv.js.map +0 -1
  169. package/lib/cjs/index-jlfsu92T.js +0 -362
  170. package/lib/cjs/index-jlfsu92T.js.map +0 -1
  171. package/lib/cjs/index-jn036wuh.js +0 -1045
  172. package/lib/cjs/index-jn036wuh.js.map +0 -1
  173. package/lib/cjs/index-kqz-P6o6.js +0 -55
  174. package/lib/cjs/index-kqz-P6o6.js.map +0 -1
  175. package/lib/cjs/index-lBumFRUQ.js +0 -209
  176. package/lib/cjs/index-lBumFRUQ.js.map +0 -1
  177. package/lib/cjs/index-lUNj3xuC.js +0 -81
  178. package/lib/cjs/index-lUNj3xuC.js.map +0 -1
  179. package/lib/cjs/index-mcxgNBq9.js +0 -464
  180. package/lib/cjs/index-mcxgNBq9.js.map +0 -1
  181. package/lib/cjs/index-nTfDKYYi.js +0 -1029
  182. package/lib/cjs/index-nTfDKYYi.js.map +0 -1
  183. package/lib/cjs/index-tBw4NmwY.js +0 -33852
  184. package/lib/cjs/index-tBw4NmwY.js.map +0 -1
  185. package/lib/cjs/index-vfzLCXfi.js +0 -774
  186. package/lib/cjs/index-vfzLCXfi.js.map +0 -1
  187. package/lib/cjs/index-von4W2LG.js +0 -356
  188. package/lib/cjs/index-von4W2LG.js.map +0 -1
  189. package/lib/cjs/index-zXSAHvAj.js +0 -1877
  190. package/lib/cjs/index-zXSAHvAj.js.map +0 -1
  191. package/lib/cjs/javascript-5-BTydbD.js +0 -928
  192. package/lib/cjs/javascript-5-BTydbD.js.map +0 -1
  193. package/lib/cjs/jinja2-BWMz4gPk.js +0 -174
  194. package/lib/cjs/jinja2-BWMz4gPk.js.map +0 -1
  195. package/lib/cjs/julia-dtR9J3KZ.js +0 -372
  196. package/lib/cjs/julia-dtR9J3KZ.js.map +0 -1
  197. package/lib/cjs/livescript-YxT0INe3.js +0 -262
  198. package/lib/cjs/livescript-YxT0INe3.js.map +0 -1
  199. package/lib/cjs/lua-h7_AXjy9.js +0 -140
  200. package/lib/cjs/lua-h7_AXjy9.js.map +0 -1
  201. package/lib/cjs/mathematica-Zc57fOr3.js +0 -156
  202. package/lib/cjs/mathematica-Zc57fOr3.js.map +0 -1
  203. package/lib/cjs/mbox-ltKsKgJd.js +0 -117
  204. package/lib/cjs/mbox-ltKsKgJd.js.map +0 -1
  205. package/lib/cjs/mirc-xTLeWqmy.js +0 -179
  206. package/lib/cjs/mirc-xTLeWqmy.js.map +0 -1
  207. package/lib/cjs/mllike-xukl-Kjp.js +0 -351
  208. package/lib/cjs/mllike-xukl-Kjp.js.map +0 -1
  209. package/lib/cjs/modelica-LsXtAawk.js +0 -195
  210. package/lib/cjs/modelica-LsXtAawk.js.map +0 -1
  211. package/lib/cjs/mscgen-9HooYIVW.js +0 -154
  212. package/lib/cjs/mscgen-9HooYIVW.js.map +0 -1
  213. package/lib/cjs/mumps-VXqGp84f.js +0 -132
  214. package/lib/cjs/mumps-VXqGp84f.js.map +0 -1
  215. package/lib/cjs/nginx-UrubUbn1.js +0 -166
  216. package/lib/cjs/nginx-UrubUbn1.js.map +0 -1
  217. package/lib/cjs/nsis-c2AYwqyy.js +0 -83
  218. package/lib/cjs/nsis-c2AYwqyy.js.map +0 -1
  219. package/lib/cjs/ntriples-N1nwiheD.js +0 -144
  220. package/lib/cjs/ntriples-N1nwiheD.js.map +0 -1
  221. package/lib/cjs/octave-ElonStfZ.js +0 -115
  222. package/lib/cjs/octave-ElonStfZ.js.map +0 -1
  223. package/lib/cjs/oz-7VQTnCfu.js +0 -238
  224. package/lib/cjs/oz-7VQTnCfu.js.map +0 -1
  225. package/lib/cjs/pascal-yq2Cb88Q.js +0 -127
  226. package/lib/cjs/pascal-yq2Cb88Q.js.map +0 -1
  227. package/lib/cjs/perl-hJq4byS9.js +0 -822
  228. package/lib/cjs/perl-hJq4byS9.js.map +0 -1
  229. package/lib/cjs/pig-2syuOlAa.js +0 -152
  230. package/lib/cjs/pig-2syuOlAa.js.map +0 -1
  231. package/lib/cjs/powershell-NDwxuSDg.js +0 -384
  232. package/lib/cjs/powershell-NDwxuSDg.js.map +0 -1
  233. package/lib/cjs/properties-wacODxDJ.js +0 -65
  234. package/lib/cjs/properties-wacODxDJ.js.map +0 -1
  235. package/lib/cjs/protobuf-zVHZwskk.js +0 -57
  236. package/lib/cjs/protobuf-zVHZwskk.js.map +0 -1
  237. package/lib/cjs/puppet-koQikqO-.js +0 -208
  238. package/lib/cjs/puppet-koQikqO-.js.map +0 -1
  239. package/lib/cjs/python-P3UsKHbj.js +0 -394
  240. package/lib/cjs/python-P3UsKHbj.js.map +0 -1
  241. package/lib/cjs/q-Z_d2uXoA.js +0 -126
  242. package/lib/cjs/q-Z_d2uXoA.js.map +0 -1
  243. package/lib/cjs/r-J6Jl9z1i.js +0 -177
  244. package/lib/cjs/r-J6Jl9z1i.js.map +0 -1
  245. package/lib/cjs/rpm-6C0Omumu.js +0 -93
  246. package/lib/cjs/rpm-6C0Omumu.js.map +0 -1
  247. package/lib/cjs/ruby-POVyUmsb.js +0 -290
  248. package/lib/cjs/ruby-POVyUmsb.js.map +0 -1
  249. package/lib/cjs/sas-vDtpSmFr.js +0 -271
  250. package/lib/cjs/sas-vDtpSmFr.js.map +0 -1
  251. package/lib/cjs/schema-RVrwDDcq.js +0 -74
  252. package/lib/cjs/schema-RVrwDDcq.js.map +0 -1
  253. package/lib/cjs/scheme-5AA5BH7S.js +0 -266
  254. package/lib/cjs/scheme-5AA5BH7S.js.map +0 -1
  255. package/lib/cjs/shell-_ztDMiW6.js +0 -148
  256. package/lib/cjs/shell-_ztDMiW6.js.map +0 -1
  257. package/lib/cjs/sieve-R_vzlbvH.js +0 -181
  258. package/lib/cjs/sieve-R_vzlbvH.js.map +0 -1
  259. package/lib/cjs/simple-mode-ZwmNbV0h.js +0 -138
  260. package/lib/cjs/simple-mode-ZwmNbV0h.js.map +0 -1
  261. package/lib/cjs/smalltalk-dWLp5zN8.js +0 -156
  262. package/lib/cjs/smalltalk-dWLp5zN8.js.map +0 -1
  263. package/lib/cjs/solr-wSmvjKI8.js +0 -83
  264. package/lib/cjs/solr-wSmvjKI8.js.map +0 -1
  265. package/lib/cjs/sparql-GNU_0xKB.js +0 -173
  266. package/lib/cjs/sparql-GNU_0xKB.js.map +0 -1
  267. package/lib/cjs/spreadsheet-BiqYLk6M.js +0 -101
  268. package/lib/cjs/spreadsheet-BiqYLk6M.js.map +0 -1
  269. package/lib/cjs/sql-9GpHBPsC.js +0 -497
  270. package/lib/cjs/sql-9GpHBPsC.js.map +0 -1
  271. package/lib/cjs/stex-1V41CNLk.js +0 -250
  272. package/lib/cjs/stex-1V41CNLk.js.map +0 -1
  273. package/lib/cjs/stylus-H6hn9z_G.js +0 -753
  274. package/lib/cjs/stylus-H6hn9z_G.js.map +0 -1
  275. package/lib/cjs/swift-Xv5f8zgN.js +0 -205
  276. package/lib/cjs/swift-Xv5f8zgN.js.map +0 -1
  277. package/lib/cjs/tcl-LI-LOw_t.js +0 -128
  278. package/lib/cjs/tcl-LI-LOw_t.js.map +0 -1
  279. package/lib/cjs/textile-3NvRPUgg.js +0 -444
  280. package/lib/cjs/textile-3NvRPUgg.js.map +0 -1
  281. package/lib/cjs/tiddlywiki-PkMzy8_R.js +0 -281
  282. package/lib/cjs/tiddlywiki-PkMzy8_R.js.map +0 -1
  283. package/lib/cjs/tiki-Zk_GnEC8.js +0 -292
  284. package/lib/cjs/tiki-Zk_GnEC8.js.map +0 -1
  285. package/lib/cjs/todoList-Ze4FLMlx.js.map +0 -1
  286. package/lib/cjs/toml-36gJ0YCq.js +0 -78
  287. package/lib/cjs/toml-36gJ0YCq.js.map +0 -1
  288. package/lib/cjs/tooltip-plugin--lhebztC.js +0 -191
  289. package/lib/cjs/tooltip-plugin--lhebztC.js.map +0 -1
  290. package/lib/cjs/troff-RLZ_o61o.js +0 -67
  291. package/lib/cjs/troff-RLZ_o61o.js.map +0 -1
  292. package/lib/cjs/ttcn-cfg-twaoJYvf.js +0 -204
  293. package/lib/cjs/ttcn-cfg-twaoJYvf.js.map +0 -1
  294. package/lib/cjs/ttcn-kGwvGb2v.js +0 -260
  295. package/lib/cjs/ttcn-kGwvGb2v.js.map +0 -1
  296. package/lib/cjs/turtle-nnevat7b.js +0 -144
  297. package/lib/cjs/turtle-nnevat7b.js.map +0 -1
  298. package/lib/cjs/vb-fO_I9s3s.js +0 -252
  299. package/lib/cjs/vb-fO_I9s3s.js.map +0 -1
  300. package/lib/cjs/vbscript-HXnn40y4.js +0 -324
  301. package/lib/cjs/vbscript-HXnn40y4.js.map +0 -1
  302. package/lib/cjs/velocity-Wn-ZfFzr.js +0 -189
  303. package/lib/cjs/velocity-Wn-ZfFzr.js.map +0 -1
  304. package/lib/cjs/verilog-y1ev34z6.js +0 -569
  305. package/lib/cjs/verilog-y1ev34z6.js.map +0 -1
  306. package/lib/cjs/vhdl-LF0oeXxc.js +0 -177
  307. package/lib/cjs/vhdl-LF0oeXxc.js.map +0 -1
  308. package/lib/cjs/webidl-6kI5KbeC.js +0 -182
  309. package/lib/cjs/webidl-6kI5KbeC.js.map +0 -1
  310. package/lib/cjs/xquery-BavrmwsO.js +0 -428
  311. package/lib/cjs/xquery-BavrmwsO.js.map +0 -1
  312. package/lib/cjs/yacas-1g_AbTrl.js +0 -185
  313. package/lib/cjs/yacas-1g_AbTrl.js.map +0 -1
  314. package/lib/cjs/z80-QYzKAAp7.js +0 -106
  315. package/lib/cjs/z80-QYzKAAp7.js.map +0 -1
  316. package/lib/esm/_view-IlZC8FA6.js +0 -25
  317. package/lib/esm/_view-IlZC8FA6.js.map +0 -1
  318. package/lib/esm/apl-eHQxyJFn.js +0 -143
  319. package/lib/esm/apl-eHQxyJFn.js.map +0 -1
  320. package/lib/esm/asciiarmor-Z-IGYCI4.js +0 -57
  321. package/lib/esm/asciiarmor-Z-IGYCI4.js.map +0 -1
  322. package/lib/esm/asn1-gF7x-q1y.js +0 -193
  323. package/lib/esm/asn1-gF7x-q1y.js.map +0 -1
  324. package/lib/esm/asterisk-swk20ftp.js +0 -188
  325. package/lib/esm/asterisk-swk20ftp.js.map +0 -1
  326. package/lib/esm/brainfuck-IFQdiQoR.js +0 -71
  327. package/lib/esm/brainfuck-IFQdiQoR.js.map +0 -1
  328. package/lib/esm/clike-q3hUF2Cx.js +0 -1019
  329. package/lib/esm/clike-q3hUF2Cx.js.map +0 -1
  330. package/lib/esm/clojure-I2Krbr2M.js +0 -275
  331. package/lib/esm/clojure-I2Krbr2M.js.map +0 -1
  332. package/lib/esm/clsx-RxCLxYpD.js +0 -4
  333. package/lib/esm/clsx-RxCLxYpD.js.map +0 -1
  334. package/lib/esm/cmake-ewwXLeuZ.js +0 -82
  335. package/lib/esm/cmake-ewwXLeuZ.js.map +0 -1
  336. package/lib/esm/cobol-fpN1nAnR.js +0 -236
  337. package/lib/esm/cobol-fpN1nAnR.js.map +0 -1
  338. package/lib/esm/coffeescript--eTFR-bH.js +0 -330
  339. package/lib/esm/coffeescript--eTFR-bH.js.map +0 -1
  340. package/lib/esm/commonlisp-XLSwVdLc.js +0 -109
  341. package/lib/esm/commonlisp-XLSwVdLc.js.map +0 -1
  342. package/lib/esm/crystal-_r3Aa1_a.js +0 -420
  343. package/lib/esm/crystal-_r3Aa1_a.js.map +0 -1
  344. package/lib/esm/css-hgwYGMKZ.js +0 -848
  345. package/lib/esm/css-hgwYGMKZ.js.map +0 -1
  346. package/lib/esm/cypher-bbJyAa-4.js +0 -123
  347. package/lib/esm/cypher-bbJyAa-4.js.map +0 -1
  348. package/lib/esm/d-5MyulviS.js +0 -206
  349. package/lib/esm/d-5MyulviS.js.map +0 -1
  350. package/lib/esm/diff-neOaT_vk.js +0 -31
  351. package/lib/esm/diff-neOaT_vk.js.map +0 -1
  352. package/lib/esm/dockerfile-lzx42-zz.js +0 -200
  353. package/lib/esm/dockerfile-lzx42-zz.js.map +0 -1
  354. package/lib/esm/dtd-FmzPLZcQ.js +0 -122
  355. package/lib/esm/dtd-FmzPLZcQ.js.map +0 -1
  356. package/lib/esm/dylan-1HtRK4GO.js +0 -338
  357. package/lib/esm/dylan-1HtRK4GO.js.map +0 -1
  358. package/lib/esm/ebnf-Nz-pnLHy.js +0 -152
  359. package/lib/esm/ebnf-Nz-pnLHy.js.map +0 -1
  360. package/lib/esm/ecl-lQsZhQz0.js +0 -191
  361. package/lib/esm/ecl-lQsZhQz0.js.map +0 -1
  362. package/lib/esm/eiffel-R_HiEkhx.js +0 -147
  363. package/lib/esm/eiffel-R_HiEkhx.js.map +0 -1
  364. package/lib/esm/elm-KYv4VTDg.js +0 -231
  365. package/lib/esm/elm-KYv4VTDg.js.map +0 -1
  366. package/lib/esm/erlang-7YaHCBIe.js +0 -582
  367. package/lib/esm/erlang-7YaHCBIe.js.map +0 -1
  368. package/lib/esm/factor-opBU9aTK.js +0 -66
  369. package/lib/esm/factor-opBU9aTK.js.map +0 -1
  370. package/lib/esm/fcl-jm31FmFz.js +0 -155
  371. package/lib/esm/fcl-jm31FmFz.js.map +0 -1
  372. package/lib/esm/floating-ui.dom-CAYjY8Gv.js +0 -1130
  373. package/lib/esm/floating-ui.dom-CAYjY8Gv.js.map +0 -1
  374. package/lib/esm/forth-5NKbjnWh.js +0 -165
  375. package/lib/esm/forth-5NKbjnWh.js.map +0 -1
  376. package/lib/esm/fortran-dXm_-cb9.js +0 -173
  377. package/lib/esm/fortran-dXm_-cb9.js.map +0 -1
  378. package/lib/esm/gas-nsYVnsy-.js +0 -344
  379. package/lib/esm/gas-nsYVnsy-.js.map +0 -1
  380. package/lib/esm/gherkin-fzKpjm3M.js +0 -148
  381. package/lib/esm/gherkin-fzKpjm3M.js.map +0 -1
  382. package/lib/esm/go-Pn1qh7yl.js +0 -165
  383. package/lib/esm/go-Pn1qh7yl.js.map +0 -1
  384. package/lib/esm/groovy-DZY-8keZ.js +0 -231
  385. package/lib/esm/groovy-DZY-8keZ.js.map +0 -1
  386. package/lib/esm/haskell-JGh2upDd.js +0 -240
  387. package/lib/esm/haskell-JGh2upDd.js.map +0 -1
  388. package/lib/esm/haxe-1hvVK-Fy.js +0 -491
  389. package/lib/esm/haxe-1hvVK-Fy.js.map +0 -1
  390. package/lib/esm/helper-wZAtC67x.js +0 -13
  391. package/lib/esm/helper-wZAtC67x.js.map +0 -1
  392. package/lib/esm/http-mY1M77wn.js +0 -90
  393. package/lib/esm/http-mY1M77wn.js.map +0 -1
  394. package/lib/esm/idl-dy_653wH.js +0 -275
  395. package/lib/esm/idl-dy_653wH.js.map +0 -1
  396. package/lib/esm/index-0-j8Icms.js +0 -384
  397. package/lib/esm/index-0-j8Icms.js.map +0 -1
  398. package/lib/esm/index-1l-61HI-.js +0 -358
  399. package/lib/esm/index-1l-61HI-.js.map +0 -1
  400. package/lib/esm/index-3HeWs5rX.js +0 -440
  401. package/lib/esm/index-3HeWs5rX.js.map +0 -1
  402. package/lib/esm/index-3bDzhU6z.js +0 -759
  403. package/lib/esm/index-3bDzhU6z.js.map +0 -1
  404. package/lib/esm/index-6GrVnloh.js +0 -1027
  405. package/lib/esm/index-6GrVnloh.js.map +0 -1
  406. package/lib/esm/index-8QJbxTYk.js +0 -1145
  407. package/lib/esm/index-8QJbxTYk.js.map +0 -1
  408. package/lib/esm/index-9w_hdnvb.js +0 -532
  409. package/lib/esm/index-9w_hdnvb.js.map +0 -1
  410. package/lib/esm/index-AOoFzBaK.js +0 -53
  411. package/lib/esm/index-AOoFzBaK.js.map +0 -1
  412. package/lib/esm/index-DS7Z4Ach.js +0 -686
  413. package/lib/esm/index-DS7Z4Ach.js.map +0 -1
  414. package/lib/esm/index-LAdX6LsO.js +0 -33805
  415. package/lib/esm/index-LAdX6LsO.js.map +0 -1
  416. package/lib/esm/index-MxgqkRtj.js +0 -125
  417. package/lib/esm/index-MxgqkRtj.js.map +0 -1
  418. package/lib/esm/index-NZ5-xr5_.js +0 -351
  419. package/lib/esm/index-NZ5-xr5_.js.map +0 -1
  420. package/lib/esm/index-OpUb5xP6.js +0 -1872
  421. package/lib/esm/index-OpUb5xP6.js.map +0 -1
  422. package/lib/esm/index-SDPCpsD5.js +0 -461
  423. package/lib/esm/index-SDPCpsD5.js.map +0 -1
  424. package/lib/esm/index-VP76m4nW.js +0 -157
  425. package/lib/esm/index-VP76m4nW.js.map +0 -1
  426. package/lib/esm/index-Vl0W0S3h.js +0 -259
  427. package/lib/esm/index-Vl0W0S3h.js.map +0 -1
  428. package/lib/esm/index-VoX_n1l_.js +0 -1038
  429. package/lib/esm/index-VoX_n1l_.js.map +0 -1
  430. package/lib/esm/index-XH7OnwZl.js +0 -527
  431. package/lib/esm/index-XH7OnwZl.js.map +0 -1
  432. package/lib/esm/index-Yuj7sNhQ.js +0 -105
  433. package/lib/esm/index-Yuj7sNhQ.js.map +0 -1
  434. package/lib/esm/index-_4fWmRbN.js +0 -206
  435. package/lib/esm/index-_4fWmRbN.js.map +0 -1
  436. package/lib/esm/index-bexsWrgs.js +0 -153
  437. package/lib/esm/index-bexsWrgs.js.map +0 -1
  438. package/lib/esm/index-chrnjY1D.js +0 -470
  439. package/lib/esm/index-chrnjY1D.js.map +0 -1
  440. package/lib/esm/index-eqd5wtjX.js +0 -393
  441. package/lib/esm/index-eqd5wtjX.js.map +0 -1
  442. package/lib/esm/index-g_3dzLYU.js +0 -200
  443. package/lib/esm/index-g_3dzLYU.js.map +0 -1
  444. package/lib/esm/index-grT-Kuf2.js +0 -78
  445. package/lib/esm/index-grT-Kuf2.js.map +0 -1
  446. package/lib/esm/index-hF04phbf.js +0 -189
  447. package/lib/esm/index-hF04phbf.js.map +0 -1
  448. package/lib/esm/index-i79QMXpJ.js +0 -25654
  449. package/lib/esm/index-i79QMXpJ.js.map +0 -1
  450. package/lib/esm/index-rvOBAXap.js +0 -2512
  451. package/lib/esm/index-rvOBAXap.js.map +0 -1
  452. package/lib/esm/index-uP9BKsTM.js +0 -446
  453. package/lib/esm/index-uP9BKsTM.js.map +0 -1
  454. package/lib/esm/index-ueQQMSgm.js +0 -1351
  455. package/lib/esm/index-ueQQMSgm.js.map +0 -1
  456. package/lib/esm/index-x8SyiPMC.js +0 -401
  457. package/lib/esm/index-x8SyiPMC.js.map +0 -1
  458. package/lib/esm/index-zrQXXSXm.js +0 -115
  459. package/lib/esm/index-zrQXXSXm.js.map +0 -1
  460. package/lib/esm/javascript-TMTz-YQH.js +0 -923
  461. package/lib/esm/javascript-TMTz-YQH.js.map +0 -1
  462. package/lib/esm/jinja2-sRIdliZK.js +0 -172
  463. package/lib/esm/jinja2-sRIdliZK.js.map +0 -1
  464. package/lib/esm/julia-fK0wmpGL.js +0 -370
  465. package/lib/esm/julia-fK0wmpGL.js.map +0 -1
  466. package/lib/esm/livescript-FRbAot3D.js +0 -260
  467. package/lib/esm/livescript-FRbAot3D.js.map +0 -1
  468. package/lib/esm/lua-t4FHEjvK.js +0 -138
  469. package/lib/esm/lua-t4FHEjvK.js.map +0 -1
  470. package/lib/esm/mathematica-sn_KGlYj.js +0 -154
  471. package/lib/esm/mathematica-sn_KGlYj.js.map +0 -1
  472. package/lib/esm/mbox-KvVC319E.js +0 -115
  473. package/lib/esm/mbox-KvVC319E.js.map +0 -1
  474. package/lib/esm/mirc-PzJ0zKSk.js +0 -177
  475. package/lib/esm/mirc-PzJ0zKSk.js.map +0 -1
  476. package/lib/esm/mllike-ZK411xkN.js +0 -347
  477. package/lib/esm/mllike-ZK411xkN.js.map +0 -1
  478. package/lib/esm/modelica-ZaHlRCbp.js +0 -193
  479. package/lib/esm/modelica-ZaHlRCbp.js.map +0 -1
  480. package/lib/esm/mscgen-Kkq4o4Zm.js +0 -150
  481. package/lib/esm/mscgen-Kkq4o4Zm.js.map +0 -1
  482. package/lib/esm/mumps-M8a87-rl.js +0 -130
  483. package/lib/esm/mumps-M8a87-rl.js.map +0 -1
  484. package/lib/esm/nginx-2LJIX23E.js +0 -164
  485. package/lib/esm/nginx-2LJIX23E.js.map +0 -1
  486. package/lib/esm/nsis-zvfFgMLi.js +0 -81
  487. package/lib/esm/nsis-zvfFgMLi.js.map +0 -1
  488. package/lib/esm/ntriples-tVkHy5bk.js +0 -142
  489. package/lib/esm/ntriples-tVkHy5bk.js.map +0 -1
  490. package/lib/esm/octave-mE4T5MF5.js +0 -113
  491. package/lib/esm/octave-mE4T5MF5.js.map +0 -1
  492. package/lib/esm/oz-q-LCsuVg.js +0 -236
  493. package/lib/esm/oz-q-LCsuVg.js.map +0 -1
  494. package/lib/esm/pascal-0IgUAn4C.js +0 -125
  495. package/lib/esm/pascal-0IgUAn4C.js.map +0 -1
  496. package/lib/esm/perl-AqxdYGac.js +0 -820
  497. package/lib/esm/perl-AqxdYGac.js.map +0 -1
  498. package/lib/esm/pig-ESM-IjQj.js +0 -150
  499. package/lib/esm/pig-ESM-IjQj.js.map +0 -1
  500. package/lib/esm/powershell-CLFP0L55.js +0 -382
  501. package/lib/esm/powershell-CLFP0L55.js.map +0 -1
  502. package/lib/esm/properties-oWHNzvb9.js +0 -63
  503. package/lib/esm/properties-oWHNzvb9.js.map +0 -1
  504. package/lib/esm/protobuf-c7eMmdcc.js +0 -55
  505. package/lib/esm/protobuf-c7eMmdcc.js.map +0 -1
  506. package/lib/esm/puppet-FjzvdRJr.js +0 -206
  507. package/lib/esm/puppet-FjzvdRJr.js.map +0 -1
  508. package/lib/esm/python-3Pv0tnvt.js +0 -390
  509. package/lib/esm/python-3Pv0tnvt.js.map +0 -1
  510. package/lib/esm/q-IImW8da6.js +0 -124
  511. package/lib/esm/q-IImW8da6.js.map +0 -1
  512. package/lib/esm/r-CnEkTvR0.js +0 -175
  513. package/lib/esm/r-CnEkTvR0.js.map +0 -1
  514. package/lib/esm/rpm-Q55-fEHj.js +0 -90
  515. package/lib/esm/rpm-Q55-fEHj.js.map +0 -1
  516. package/lib/esm/ruby-zhaGB3Kh.js +0 -288
  517. package/lib/esm/ruby-zhaGB3Kh.js.map +0 -1
  518. package/lib/esm/sas-Ur9jZIOV.js +0 -269
  519. package/lib/esm/sas-Ur9jZIOV.js.map +0 -1
  520. package/lib/esm/schema-JWJqD9qa.js +0 -71
  521. package/lib/esm/schema-JWJqD9qa.js.map +0 -1
  522. package/lib/esm/scheme-daT5-Rya.js +0 -264
  523. package/lib/esm/scheme-daT5-Rya.js.map +0 -1
  524. package/lib/esm/shell-cwFL0AYP.js +0 -146
  525. package/lib/esm/shell-cwFL0AYP.js.map +0 -1
  526. package/lib/esm/sieve-MlNXFFUq.js +0 -179
  527. package/lib/esm/sieve-MlNXFFUq.js.map +0 -1
  528. package/lib/esm/simple-mode-m1rsX7Gw.js +0 -136
  529. package/lib/esm/simple-mode-m1rsX7Gw.js.map +0 -1
  530. package/lib/esm/smalltalk-xrQICp9e.js +0 -154
  531. package/lib/esm/smalltalk-xrQICp9e.js.map +0 -1
  532. package/lib/esm/solr-PU3oPgQz.js +0 -81
  533. package/lib/esm/solr-PU3oPgQz.js.map +0 -1
  534. package/lib/esm/sparql--u8NRBii.js +0 -171
  535. package/lib/esm/sparql--u8NRBii.js.map +0 -1
  536. package/lib/esm/spreadsheet-QCp0LifX.js +0 -99
  537. package/lib/esm/spreadsheet-QCp0LifX.js.map +0 -1
  538. package/lib/esm/sql-dsGfl64h.js +0 -482
  539. package/lib/esm/sql-dsGfl64h.js.map +0 -1
  540. package/lib/esm/stex-WcLBzvkD.js +0 -247
  541. package/lib/esm/stex-WcLBzvkD.js.map +0 -1
  542. package/lib/esm/stylus--A5XAqOX.js +0 -751
  543. package/lib/esm/stylus--A5XAqOX.js.map +0 -1
  544. package/lib/esm/swift-qAm73i7G.js +0 -203
  545. package/lib/esm/swift-qAm73i7G.js.map +0 -1
  546. package/lib/esm/tcl-Kdc7qxc-.js +0 -126
  547. package/lib/esm/tcl-Kdc7qxc-.js.map +0 -1
  548. package/lib/esm/textile--sz8UrIz.js +0 -442
  549. package/lib/esm/textile--sz8UrIz.js.map +0 -1
  550. package/lib/esm/tiddlywiki-xNXTeBlQ.js +0 -279
  551. package/lib/esm/tiddlywiki-xNXTeBlQ.js.map +0 -1
  552. package/lib/esm/tiki-LCXjrNH3.js +0 -290
  553. package/lib/esm/tiki-LCXjrNH3.js.map +0 -1
  554. package/lib/esm/todoList-M-PGJKde.js.map +0 -1
  555. package/lib/esm/toml-Ac4tlBMn.js +0 -76
  556. package/lib/esm/toml-Ac4tlBMn.js.map +0 -1
  557. package/lib/esm/tooltip-plugin-iw2EQWIG.js +0 -185
  558. package/lib/esm/tooltip-plugin-iw2EQWIG.js.map +0 -1
  559. package/lib/esm/troff-LLW1x1Yz.js +0 -65
  560. package/lib/esm/troff-LLW1x1Yz.js.map +0 -1
  561. package/lib/esm/ttcn-ZYZ9FS3u.js +0 -258
  562. package/lib/esm/ttcn-ZYZ9FS3u.js.map +0 -1
  563. package/lib/esm/ttcn-cfg-qsvf3MfB.js +0 -202
  564. package/lib/esm/ttcn-cfg-qsvf3MfB.js.map +0 -1
  565. package/lib/esm/turtle-wq3TqOth.js +0 -142
  566. package/lib/esm/turtle-wq3TqOth.js.map +0 -1
  567. package/lib/esm/vb-86M_JuNP.js +0 -250
  568. package/lib/esm/vb-86M_JuNP.js.map +0 -1
  569. package/lib/esm/vbscript-GueAeVug.js +0 -321
  570. package/lib/esm/vbscript-GueAeVug.js.map +0 -1
  571. package/lib/esm/velocity-7PW9GXO2.js +0 -187
  572. package/lib/esm/velocity-7PW9GXO2.js.map +0 -1
  573. package/lib/esm/verilog-PXtXH14C.js +0 -566
  574. package/lib/esm/verilog-PXtXH14C.js.map +0 -1
  575. package/lib/esm/vhdl-I8eyK83X.js +0 -175
  576. package/lib/esm/vhdl-I8eyK83X.js.map +0 -1
  577. package/lib/esm/webidl-1f8ATJ66.js +0 -180
  578. package/lib/esm/webidl-1f8ATJ66.js.map +0 -1
  579. package/lib/esm/xquery-IYp28Wx6.js +0 -426
  580. package/lib/esm/xquery-IYp28Wx6.js.map +0 -1
  581. package/lib/esm/yacas-wkENB05f.js +0 -183
  582. package/lib/esm/yacas-wkENB05f.js.map +0 -1
  583. package/lib/esm/z80-GaXiLdiV.js +0 -103
  584. package/lib/esm/z80-GaXiLdiV.js.map +0 -1
@@ -1,928 +0,0 @@
1
- 'use strict';
2
-
3
- function mkJavaScript(parserConfig) {
4
- var statementIndent = parserConfig.statementIndent;
5
- var jsonldMode = parserConfig.jsonld;
6
- var jsonMode = parserConfig.json || jsonldMode;
7
- var isTS = parserConfig.typescript;
8
- var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
9
-
10
- // Tokenizer
11
-
12
- var keywords = function(){
13
- function kw(type) {return {type: type, style: "keyword"};}
14
- var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
15
- var operator = kw("operator"), atom = {type: "atom", style: "atom"};
16
-
17
- return {
18
- "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
19
- "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
20
- "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
21
- "function": kw("function"), "catch": kw("catch"),
22
- "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
23
- "in": operator, "typeof": operator, "instanceof": operator,
24
- "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
25
- "this": kw("this"), "class": kw("class"), "super": kw("atom"),
26
- "yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
27
- "await": C
28
- };
29
- }();
30
-
31
- var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
32
- var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
33
-
34
- function readRegexp(stream) {
35
- var escaped = false, next, inSet = false;
36
- while ((next = stream.next()) != null) {
37
- if (!escaped) {
38
- if (next == "/" && !inSet) return;
39
- if (next == "[") inSet = true;
40
- else if (inSet && next == "]") inSet = false;
41
- }
42
- escaped = !escaped && next == "\\";
43
- }
44
- }
45
-
46
- // Used as scratch variables to communicate multiple values without
47
- // consing up tons of objects.
48
- var type, content;
49
- function ret(tp, style, cont) {
50
- type = tp; content = cont;
51
- return style;
52
- }
53
- function tokenBase(stream, state) {
54
- var ch = stream.next();
55
- if (ch == '"' || ch == "'") {
56
- state.tokenize = tokenString(ch);
57
- return state.tokenize(stream, state);
58
- } else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) {
59
- return ret("number", "number");
60
- } else if (ch == "." && stream.match("..")) {
61
- return ret("spread", "meta");
62
- } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
63
- return ret(ch);
64
- } else if (ch == "=" && stream.eat(">")) {
65
- return ret("=>", "operator");
66
- } else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) {
67
- return ret("number", "number");
68
- } else if (/\d/.test(ch)) {
69
- stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/);
70
- return ret("number", "number");
71
- } else if (ch == "/") {
72
- if (stream.eat("*")) {
73
- state.tokenize = tokenComment;
74
- return tokenComment(stream, state);
75
- } else if (stream.eat("/")) {
76
- stream.skipToEnd();
77
- return ret("comment", "comment");
78
- } else if (expressionAllowed(stream, state, 1)) {
79
- readRegexp(stream);
80
- stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
81
- return ret("regexp", "string.special");
82
- } else {
83
- stream.eat("=");
84
- return ret("operator", "operator", stream.current());
85
- }
86
- } else if (ch == "`") {
87
- state.tokenize = tokenQuasi;
88
- return tokenQuasi(stream, state);
89
- } else if (ch == "#" && stream.peek() == "!") {
90
- stream.skipToEnd();
91
- return ret("meta", "meta");
92
- } else if (ch == "#" && stream.eatWhile(wordRE)) {
93
- return ret("variable", "property")
94
- } else if (ch == "<" && stream.match("!--") ||
95
- (ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start)))) {
96
- stream.skipToEnd();
97
- return ret("comment", "comment")
98
- } else if (isOperatorChar.test(ch)) {
99
- if (ch != ">" || !state.lexical || state.lexical.type != ">") {
100
- if (stream.eat("=")) {
101
- if (ch == "!" || ch == "=") stream.eat("=");
102
- } else if (/[<>*+\-|&?]/.test(ch)) {
103
- stream.eat(ch);
104
- if (ch == ">") stream.eat(ch);
105
- }
106
- }
107
- if (ch == "?" && stream.eat(".")) return ret(".")
108
- return ret("operator", "operator", stream.current());
109
- } else if (wordRE.test(ch)) {
110
- stream.eatWhile(wordRE);
111
- var word = stream.current();
112
- if (state.lastType != ".") {
113
- if (keywords.propertyIsEnumerable(word)) {
114
- var kw = keywords[word];
115
- return ret(kw.type, kw.style, word)
116
- }
117
- if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false))
118
- return ret("async", "keyword", word)
119
- }
120
- return ret("variable", "variable", word)
121
- }
122
- }
123
-
124
- function tokenString(quote) {
125
- return function(stream, state) {
126
- var escaped = false, next;
127
- if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
128
- state.tokenize = tokenBase;
129
- return ret("jsonld-keyword", "meta");
130
- }
131
- while ((next = stream.next()) != null) {
132
- if (next == quote && !escaped) break;
133
- escaped = !escaped && next == "\\";
134
- }
135
- if (!escaped) state.tokenize = tokenBase;
136
- return ret("string", "string");
137
- };
138
- }
139
-
140
- function tokenComment(stream, state) {
141
- var maybeEnd = false, ch;
142
- while (ch = stream.next()) {
143
- if (ch == "/" && maybeEnd) {
144
- state.tokenize = tokenBase;
145
- break;
146
- }
147
- maybeEnd = (ch == "*");
148
- }
149
- return ret("comment", "comment");
150
- }
151
-
152
- function tokenQuasi(stream, state) {
153
- var escaped = false, next;
154
- while ((next = stream.next()) != null) {
155
- if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
156
- state.tokenize = tokenBase;
157
- break;
158
- }
159
- escaped = !escaped && next == "\\";
160
- }
161
- return ret("quasi", "string.special", stream.current());
162
- }
163
-
164
- var brackets = "([{}])";
165
- // This is a crude lookahead trick to try and notice that we're
166
- // parsing the argument patterns for a fat-arrow function before we
167
- // actually hit the arrow token. It only works if the arrow is on
168
- // the same line as the arguments and there's no strange noise
169
- // (comments) in between. Fallback is to only notice when we hit the
170
- // arrow, and not declare the arguments as locals for the arrow
171
- // body.
172
- function findFatArrow(stream, state) {
173
- if (state.fatArrowAt) state.fatArrowAt = null;
174
- var arrow = stream.string.indexOf("=>", stream.start);
175
- if (arrow < 0) return;
176
-
177
- if (isTS) { // Try to skip TypeScript return type declarations after the arguments
178
- var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow));
179
- if (m) arrow = m.index;
180
- }
181
-
182
- var depth = 0, sawSomething = false;
183
- for (var pos = arrow - 1; pos >= 0; --pos) {
184
- var ch = stream.string.charAt(pos);
185
- var bracket = brackets.indexOf(ch);
186
- if (bracket >= 0 && bracket < 3) {
187
- if (!depth) { ++pos; break; }
188
- if (--depth == 0) { if (ch == "(") sawSomething = true; break; }
189
- } else if (bracket >= 3 && bracket < 6) {
190
- ++depth;
191
- } else if (wordRE.test(ch)) {
192
- sawSomething = true;
193
- } else if (/["'\/`]/.test(ch)) {
194
- for (;; --pos) {
195
- if (pos == 0) return
196
- var next = stream.string.charAt(pos - 1);
197
- if (next == ch && stream.string.charAt(pos - 2) != "\\") { pos--; break }
198
- }
199
- } else if (sawSomething && !depth) {
200
- ++pos;
201
- break;
202
- }
203
- }
204
- if (sawSomething && !depth) state.fatArrowAt = pos;
205
- }
206
-
207
- // Parser
208
-
209
- var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true,
210
- "regexp": true, "this": true, "import": true, "jsonld-keyword": true};
211
-
212
- function JSLexical(indented, column, type, align, prev, info) {
213
- this.indented = indented;
214
- this.column = column;
215
- this.type = type;
216
- this.prev = prev;
217
- this.info = info;
218
- if (align != null) this.align = align;
219
- }
220
-
221
- function inScope(state, varname) {
222
- for (var v = state.localVars; v; v = v.next)
223
- if (v.name == varname) return true;
224
- for (var cx = state.context; cx; cx = cx.prev) {
225
- for (var v = cx.vars; v; v = v.next)
226
- if (v.name == varname) return true;
227
- }
228
- }
229
-
230
- function parseJS(state, style, type, content, stream) {
231
- var cc = state.cc;
232
- // Communicate our context to the combinators.
233
- // (Less wasteful than consing up a hundred closures on every call.)
234
- cx.state = state; cx.stream = stream; cx.marked = null; cx.cc = cc; cx.style = style;
235
-
236
- if (!state.lexical.hasOwnProperty("align"))
237
- state.lexical.align = true;
238
-
239
- while(true) {
240
- var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
241
- if (combinator(type, content)) {
242
- while(cc.length && cc[cc.length - 1].lex)
243
- cc.pop()();
244
- if (cx.marked) return cx.marked;
245
- if (type == "variable" && inScope(state, content)) return "variableName.local";
246
- return style;
247
- }
248
- }
249
- }
250
-
251
- // Combinator utils
252
-
253
- var cx = {state: null, column: null, marked: null, cc: null};
254
- function pass() {
255
- for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
256
- }
257
- function cont() {
258
- pass.apply(null, arguments);
259
- return true;
260
- }
261
- function inList(name, list) {
262
- for (var v = list; v; v = v.next) if (v.name == name) return true
263
- return false;
264
- }
265
- function register(varname) {
266
- var state = cx.state;
267
- cx.marked = "def";
268
- if (state.context) {
269
- if (state.lexical.info == "var" && state.context && state.context.block) {
270
- // FIXME function decls are also not block scoped
271
- var newContext = registerVarScoped(varname, state.context);
272
- if (newContext != null) {
273
- state.context = newContext;
274
- return
275
- }
276
- } else if (!inList(varname, state.localVars)) {
277
- state.localVars = new Var(varname, state.localVars);
278
- return
279
- }
280
- }
281
- // Fall through means this is global
282
- if (parserConfig.globalVars && !inList(varname, state.globalVars))
283
- state.globalVars = new Var(varname, state.globalVars);
284
- }
285
- function registerVarScoped(varname, context) {
286
- if (!context) {
287
- return null
288
- } else if (context.block) {
289
- var inner = registerVarScoped(varname, context.prev);
290
- if (!inner) return null
291
- if (inner == context.prev) return context
292
- return new Context(inner, context.vars, true)
293
- } else if (inList(varname, context.vars)) {
294
- return context
295
- } else {
296
- return new Context(context.prev, new Var(varname, context.vars), false)
297
- }
298
- }
299
-
300
- function isModifier(name) {
301
- return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"
302
- }
303
-
304
- // Combinators
305
-
306
- function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block; }
307
- function Var(name, next) { this.name = name; this.next = next; }
308
-
309
- var defaultVars = new Var("this", new Var("arguments", null));
310
- function pushcontext() {
311
- cx.state.context = new Context(cx.state.context, cx.state.localVars, false);
312
- cx.state.localVars = defaultVars;
313
- }
314
- function pushblockcontext() {
315
- cx.state.context = new Context(cx.state.context, cx.state.localVars, true);
316
- cx.state.localVars = null;
317
- }
318
- pushcontext.lex = pushblockcontext.lex = true;
319
- function popcontext() {
320
- cx.state.localVars = cx.state.context.vars;
321
- cx.state.context = cx.state.context.prev;
322
- }
323
- popcontext.lex = true;
324
- function pushlex(type, info) {
325
- var result = function() {
326
- var state = cx.state, indent = state.indented;
327
- if (state.lexical.type == "stat") indent = state.lexical.indented;
328
- else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
329
- indent = outer.indented;
330
- state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
331
- };
332
- result.lex = true;
333
- return result;
334
- }
335
- function poplex() {
336
- var state = cx.state;
337
- if (state.lexical.prev) {
338
- if (state.lexical.type == ")")
339
- state.indented = state.lexical.indented;
340
- state.lexical = state.lexical.prev;
341
- }
342
- }
343
- poplex.lex = true;
344
-
345
- function expect(wanted) {
346
- function exp(type) {
347
- if (type == wanted) return cont();
348
- else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();
349
- else return cont(exp);
350
- } return exp;
351
- }
352
-
353
- function statement(type, value) {
354
- if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
355
- if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
356
- if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
357
- if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
358
- if (type == "debugger") return cont(expect(";"));
359
- if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
360
- if (type == ";") return cont();
361
- if (type == "if") {
362
- if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
363
- cx.state.cc.pop()();
364
- return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
365
- }
366
- if (type == "function") return cont(functiondef);
367
- if (type == "for") return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex);
368
- if (type == "class" || (isTS && value == "interface")) {
369
- cx.marked = "keyword";
370
- return cont(pushlex("form", type == "class" ? type : value), className, poplex)
371
- }
372
- if (type == "variable") {
373
- if (isTS && value == "declare") {
374
- cx.marked = "keyword";
375
- return cont(statement)
376
- } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
377
- cx.marked = "keyword";
378
- if (value == "enum") return cont(enumdef);
379
- else if (value == "type") return cont(typename, expect("operator"), typeexpr, expect(";"));
380
- else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
381
- } else if (isTS && value == "namespace") {
382
- cx.marked = "keyword";
383
- return cont(pushlex("form"), expression, statement, poplex)
384
- } else if (isTS && value == "abstract") {
385
- cx.marked = "keyword";
386
- return cont(statement)
387
- } else {
388
- return cont(pushlex("stat"), maybelabel);
389
- }
390
- }
391
- if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,
392
- block, poplex, poplex, popcontext);
393
- if (type == "case") return cont(expression, expect(":"));
394
- if (type == "default") return cont(expect(":"));
395
- if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
396
- if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
397
- if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
398
- if (type == "async") return cont(statement)
399
- if (value == "@") return cont(expression, statement)
400
- return pass(pushlex("stat"), expression, expect(";"), poplex);
401
- }
402
- function maybeCatchBinding(type) {
403
- if (type == "(") return cont(funarg, expect(")"))
404
- }
405
- function expression(type, value) {
406
- return expressionInner(type, value, false);
407
- }
408
- function expressionNoComma(type, value) {
409
- return expressionInner(type, value, true);
410
- }
411
- function parenExpr(type) {
412
- if (type != "(") return pass()
413
- return cont(pushlex(")"), maybeexpression, expect(")"), poplex)
414
- }
415
- function expressionInner(type, value, noComma) {
416
- if (cx.state.fatArrowAt == cx.stream.start) {
417
- var body = noComma ? arrowBodyNoComma : arrowBody;
418
- if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
419
- else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
420
- }
421
-
422
- var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
423
- if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
424
- if (type == "function") return cont(functiondef, maybeop);
425
- if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }
426
- if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
427
- if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
428
- if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
429
- if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
430
- if (type == "{") return contCommasep(objprop, "}", null, maybeop);
431
- if (type == "quasi") return pass(quasi, maybeop);
432
- if (type == "new") return cont(maybeTarget(noComma));
433
- return cont();
434
- }
435
- function maybeexpression(type) {
436
- if (type.match(/[;\}\)\],]/)) return pass();
437
- return pass(expression);
438
- }
439
-
440
- function maybeoperatorComma(type, value) {
441
- if (type == ",") return cont(maybeexpression);
442
- return maybeoperatorNoComma(type, value, false);
443
- }
444
- function maybeoperatorNoComma(type, value, noComma) {
445
- var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
446
- var expr = noComma == false ? expression : expressionNoComma;
447
- if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
448
- if (type == "operator") {
449
- if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
450
- if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false))
451
- return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
452
- if (value == "?") return cont(expression, expect(":"), expr);
453
- return cont(expr);
454
- }
455
- if (type == "quasi") { return pass(quasi, me); }
456
- if (type == ";") return;
457
- if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
458
- if (type == ".") return cont(property, me);
459
- if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
460
- if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) }
461
- if (type == "regexp") {
462
- cx.state.lastType = cx.marked = "operator";
463
- cx.stream.backUp(cx.stream.pos - cx.stream.start - 1);
464
- return cont(expr)
465
- }
466
- }
467
- function quasi(type, value) {
468
- if (type != "quasi") return pass();
469
- if (value.slice(value.length - 2) != "${") return cont(quasi);
470
- return cont(maybeexpression, continueQuasi);
471
- }
472
- function continueQuasi(type) {
473
- if (type == "}") {
474
- cx.marked = "string.special";
475
- cx.state.tokenize = tokenQuasi;
476
- return cont(quasi);
477
- }
478
- }
479
- function arrowBody(type) {
480
- findFatArrow(cx.stream, cx.state);
481
- return pass(type == "{" ? statement : expression);
482
- }
483
- function arrowBodyNoComma(type) {
484
- findFatArrow(cx.stream, cx.state);
485
- return pass(type == "{" ? statement : expressionNoComma);
486
- }
487
- function maybeTarget(noComma) {
488
- return function(type) {
489
- if (type == ".") return cont(noComma ? targetNoComma : target);
490
- else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)
491
- else return pass(noComma ? expressionNoComma : expression);
492
- };
493
- }
494
- function target(_, value) {
495
- if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); }
496
- }
497
- function targetNoComma(_, value) {
498
- if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); }
499
- }
500
- function maybelabel(type) {
501
- if (type == ":") return cont(poplex, statement);
502
- return pass(maybeoperatorComma, expect(";"), poplex);
503
- }
504
- function property(type) {
505
- if (type == "variable") {cx.marked = "property"; return cont();}
506
- }
507
- function objprop(type, value) {
508
- if (type == "async") {
509
- cx.marked = "property";
510
- return cont(objprop);
511
- } else if (type == "variable" || cx.style == "keyword") {
512
- cx.marked = "property";
513
- if (value == "get" || value == "set") return cont(getterSetter);
514
- var m; // Work around fat-arrow-detection complication for detecting typescript typed arrow params
515
- if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false)))
516
- cx.state.fatArrowAt = cx.stream.pos + m[0].length;
517
- return cont(afterprop);
518
- } else if (type == "number" || type == "string") {
519
- cx.marked = jsonldMode ? "property" : (cx.style + " property");
520
- return cont(afterprop);
521
- } else if (type == "jsonld-keyword") {
522
- return cont(afterprop);
523
- } else if (isTS && isModifier(value)) {
524
- cx.marked = "keyword";
525
- return cont(objprop)
526
- } else if (type == "[") {
527
- return cont(expression, maybetype, expect("]"), afterprop);
528
- } else if (type == "spread") {
529
- return cont(expressionNoComma, afterprop);
530
- } else if (value == "*") {
531
- cx.marked = "keyword";
532
- return cont(objprop);
533
- } else if (type == ":") {
534
- return pass(afterprop)
535
- }
536
- }
537
- function getterSetter(type) {
538
- if (type != "variable") return pass(afterprop);
539
- cx.marked = "property";
540
- return cont(functiondef);
541
- }
542
- function afterprop(type) {
543
- if (type == ":") return cont(expressionNoComma);
544
- if (type == "(") return pass(functiondef);
545
- }
546
- function commasep(what, end, sep) {
547
- function proceed(type, value) {
548
- if (sep ? sep.indexOf(type) > -1 : type == ",") {
549
- var lex = cx.state.lexical;
550
- if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
551
- return cont(function(type, value) {
552
- if (type == end || value == end) return pass()
553
- return pass(what)
554
- }, proceed);
555
- }
556
- if (type == end || value == end) return cont();
557
- if (sep && sep.indexOf(";") > -1) return pass(what)
558
- return cont(expect(end));
559
- }
560
- return function(type, value) {
561
- if (type == end || value == end) return cont();
562
- return pass(what, proceed);
563
- };
564
- }
565
- function contCommasep(what, end, info) {
566
- for (var i = 3; i < arguments.length; i++)
567
- cx.cc.push(arguments[i]);
568
- return cont(pushlex(end, info), commasep(what, end), poplex);
569
- }
570
- function block(type) {
571
- if (type == "}") return cont();
572
- return pass(statement, block);
573
- }
574
- function maybetype(type, value) {
575
- if (isTS) {
576
- if (type == ":") return cont(typeexpr);
577
- if (value == "?") return cont(maybetype);
578
- }
579
- }
580
- function maybetypeOrIn(type, value) {
581
- if (isTS && (type == ":" || value == "in")) return cont(typeexpr)
582
- }
583
- function mayberettype(type) {
584
- if (isTS && type == ":") {
585
- if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr)
586
- else return cont(typeexpr)
587
- }
588
- }
589
- function isKW(_, value) {
590
- if (value == "is") {
591
- cx.marked = "keyword";
592
- return cont()
593
- }
594
- }
595
- function typeexpr(type, value) {
596
- if (value == "keyof" || value == "typeof" || value == "infer" || value == "readonly") {
597
- cx.marked = "keyword";
598
- return cont(value == "typeof" ? expressionNoComma : typeexpr)
599
- }
600
- if (type == "variable" || value == "void") {
601
- cx.marked = "type";
602
- return cont(afterType)
603
- }
604
- if (value == "|" || value == "&") return cont(typeexpr)
605
- if (type == "string" || type == "number" || type == "atom") return cont(afterType);
606
- if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
607
- if (type == "{") return cont(pushlex("}"), typeprops, poplex, afterType)
608
- if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType)
609
- if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
610
- if (type == "quasi") return pass(quasiType, afterType)
611
- }
612
- function maybeReturnType(type) {
613
- if (type == "=>") return cont(typeexpr)
614
- }
615
- function typeprops(type) {
616
- if (type.match(/[\}\)\]]/)) return cont()
617
- if (type == "," || type == ";") return cont(typeprops)
618
- return pass(typeprop, typeprops)
619
- }
620
- function typeprop(type, value) {
621
- if (type == "variable" || cx.style == "keyword") {
622
- cx.marked = "property";
623
- return cont(typeprop)
624
- } else if (value == "?" || type == "number" || type == "string") {
625
- return cont(typeprop)
626
- } else if (type == ":") {
627
- return cont(typeexpr)
628
- } else if (type == "[") {
629
- return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop)
630
- } else if (type == "(") {
631
- return pass(functiondecl, typeprop)
632
- } else if (!type.match(/[;\}\)\],]/)) {
633
- return cont()
634
- }
635
- }
636
- function quasiType(type, value) {
637
- if (type != "quasi") return pass();
638
- if (value.slice(value.length - 2) != "${") return cont(quasiType);
639
- return cont(typeexpr, continueQuasiType);
640
- }
641
- function continueQuasiType(type) {
642
- if (type == "}") {
643
- cx.marked = "string.special";
644
- cx.state.tokenize = tokenQuasi;
645
- return cont(quasiType);
646
- }
647
- }
648
- function typearg(type, value) {
649
- if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
650
- if (type == ":") return cont(typeexpr)
651
- if (type == "spread") return cont(typearg)
652
- return pass(typeexpr)
653
- }
654
- function afterType(type, value) {
655
- if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
656
- if (value == "|" || type == "." || value == "&") return cont(typeexpr)
657
- if (type == "[") return cont(typeexpr, expect("]"), afterType)
658
- if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) }
659
- if (value == "?") return cont(typeexpr, expect(":"), typeexpr)
660
- }
661
- function maybeTypeArgs(_, value) {
662
- if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
663
- }
664
- function typeparam() {
665
- return pass(typeexpr, maybeTypeDefault)
666
- }
667
- function maybeTypeDefault(_, value) {
668
- if (value == "=") return cont(typeexpr)
669
- }
670
- function vardef(_, value) {
671
- if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}
672
- return pass(pattern, maybetype, maybeAssign, vardefCont);
673
- }
674
- function pattern(type, value) {
675
- if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) }
676
- if (type == "variable") { register(value); return cont(); }
677
- if (type == "spread") return cont(pattern);
678
- if (type == "[") return contCommasep(eltpattern, "]");
679
- if (type == "{") return contCommasep(proppattern, "}");
680
- }
681
- function proppattern(type, value) {
682
- if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
683
- register(value);
684
- return cont(maybeAssign);
685
- }
686
- if (type == "variable") cx.marked = "property";
687
- if (type == "spread") return cont(pattern);
688
- if (type == "}") return pass();
689
- if (type == "[") return cont(expression, expect(']'), expect(':'), proppattern);
690
- return cont(expect(":"), pattern, maybeAssign);
691
- }
692
- function eltpattern() {
693
- return pass(pattern, maybeAssign)
694
- }
695
- function maybeAssign(_type, value) {
696
- if (value == "=") return cont(expressionNoComma);
697
- }
698
- function vardefCont(type) {
699
- if (type == ",") return cont(vardef);
700
- }
701
- function maybeelse(type, value) {
702
- if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
703
- }
704
- function forspec(type, value) {
705
- if (value == "await") return cont(forspec);
706
- if (type == "(") return cont(pushlex(")"), forspec1, poplex);
707
- }
708
- function forspec1(type) {
709
- if (type == "var") return cont(vardef, forspec2);
710
- if (type == "variable") return cont(forspec2);
711
- return pass(forspec2)
712
- }
713
- function forspec2(type, value) {
714
- if (type == ")") return cont()
715
- if (type == ";") return cont(forspec2)
716
- if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression, forspec2) }
717
- return pass(expression, forspec2)
718
- }
719
- function functiondef(type, value) {
720
- if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
721
- if (type == "variable") {register(value); return cont(functiondef);}
722
- if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
723
- if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef)
724
- }
725
- function functiondecl(type, value) {
726
- if (value == "*") {cx.marked = "keyword"; return cont(functiondecl);}
727
- if (type == "variable") {register(value); return cont(functiondecl);}
728
- if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext);
729
- if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl)
730
- }
731
- function typename(type, value) {
732
- if (type == "keyword" || type == "variable") {
733
- cx.marked = "type";
734
- return cont(typename)
735
- } else if (value == "<") {
736
- return cont(pushlex(">"), commasep(typeparam, ">"), poplex)
737
- }
738
- }
739
- function funarg(type, value) {
740
- if (value == "@") cont(expression, funarg);
741
- if (type == "spread") return cont(funarg);
742
- if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
743
- if (isTS && type == "this") return cont(maybetype, maybeAssign)
744
- return pass(pattern, maybetype, maybeAssign);
745
- }
746
- function classExpression(type, value) {
747
- // Class expressions may have an optional name.
748
- if (type == "variable") return className(type, value);
749
- return classNameAfter(type, value);
750
- }
751
- function className(type, value) {
752
- if (type == "variable") {register(value); return cont(classNameAfter);}
753
- }
754
- function classNameAfter(type, value) {
755
- if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)
756
- if (value == "extends" || value == "implements" || (isTS && type == ",")) {
757
- if (value == "implements") cx.marked = "keyword";
758
- return cont(isTS ? typeexpr : expression, classNameAfter);
759
- }
760
- if (type == "{") return cont(pushlex("}"), classBody, poplex);
761
- }
762
- function classBody(type, value) {
763
- if (type == "async" ||
764
- (type == "variable" &&
765
- (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
766
- cx.stream.match(/^\s+#?[\w$\xa1-\uffff]/, false))) {
767
- cx.marked = "keyword";
768
- return cont(classBody);
769
- }
770
- if (type == "variable" || cx.style == "keyword") {
771
- cx.marked = "property";
772
- return cont(classfield, classBody);
773
- }
774
- if (type == "number" || type == "string") return cont(classfield, classBody);
775
- if (type == "[")
776
- return cont(expression, maybetype, expect("]"), classfield, classBody)
777
- if (value == "*") {
778
- cx.marked = "keyword";
779
- return cont(classBody);
780
- }
781
- if (isTS && type == "(") return pass(functiondecl, classBody)
782
- if (type == ";" || type == ",") return cont(classBody);
783
- if (type == "}") return cont();
784
- if (value == "@") return cont(expression, classBody)
785
- }
786
- function classfield(type, value) {
787
- if (value == "!" || value == "?") return cont(classfield)
788
- if (type == ":") return cont(typeexpr, maybeAssign)
789
- if (value == "=") return cont(expressionNoComma)
790
- var context = cx.state.lexical.prev, isInterface = context && context.info == "interface";
791
- return pass(isInterface ? functiondecl : functiondef)
792
- }
793
- function afterExport(type, value) {
794
- if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
795
- if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
796
- if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";"));
797
- return pass(statement);
798
- }
799
- function exportField(type, value) {
800
- if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); }
801
- if (type == "variable") return pass(expressionNoComma, exportField);
802
- }
803
- function afterImport(type) {
804
- if (type == "string") return cont();
805
- if (type == "(") return pass(expression);
806
- if (type == ".") return pass(maybeoperatorComma);
807
- return pass(importSpec, maybeMoreImports, maybeFrom);
808
- }
809
- function importSpec(type, value) {
810
- if (type == "{") return contCommasep(importSpec, "}");
811
- if (type == "variable") register(value);
812
- if (value == "*") cx.marked = "keyword";
813
- return cont(maybeAs);
814
- }
815
- function maybeMoreImports(type) {
816
- if (type == ",") return cont(importSpec, maybeMoreImports)
817
- }
818
- function maybeAs(_type, value) {
819
- if (value == "as") { cx.marked = "keyword"; return cont(importSpec); }
820
- }
821
- function maybeFrom(_type, value) {
822
- if (value == "from") { cx.marked = "keyword"; return cont(expression); }
823
- }
824
- function arrayLiteral(type) {
825
- if (type == "]") return cont();
826
- return pass(commasep(expressionNoComma, "]"));
827
- }
828
- function enumdef() {
829
- return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)
830
- }
831
- function enummember() {
832
- return pass(pattern, maybeAssign);
833
- }
834
-
835
- function isContinuedStatement(state, textAfter) {
836
- return state.lastType == "operator" || state.lastType == "," ||
837
- isOperatorChar.test(textAfter.charAt(0)) ||
838
- /[,.]/.test(textAfter.charAt(0));
839
- }
840
-
841
- function expressionAllowed(stream, state, backUp) {
842
- return state.tokenize == tokenBase &&
843
- /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
844
- (state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
845
- }
846
-
847
- // Interface
848
-
849
- return {
850
- name: parserConfig.name,
851
-
852
- startState: function(indentUnit) {
853
- var state = {
854
- tokenize: tokenBase,
855
- lastType: "sof",
856
- cc: [],
857
- lexical: new JSLexical(-indentUnit, 0, "block", false),
858
- localVars: parserConfig.localVars,
859
- context: parserConfig.localVars && new Context(null, null, false),
860
- indented: 0
861
- };
862
- if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
863
- state.globalVars = parserConfig.globalVars;
864
- return state;
865
- },
866
-
867
- token: function(stream, state) {
868
- if (stream.sol()) {
869
- if (!state.lexical.hasOwnProperty("align"))
870
- state.lexical.align = false;
871
- state.indented = stream.indentation();
872
- findFatArrow(stream, state);
873
- }
874
- if (state.tokenize != tokenComment && stream.eatSpace()) return null;
875
- var style = state.tokenize(stream, state);
876
- if (type == "comment") return style;
877
- state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
878
- return parseJS(state, style, type, content, stream);
879
- },
880
-
881
- indent: function(state, textAfter, cx) {
882
- if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return null;
883
- if (state.tokenize != tokenBase) return 0;
884
- var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top;
885
- // Kludge to prevent 'maybelse' from blocking lexical scope pops
886
- if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
887
- var c = state.cc[i];
888
- if (c == poplex) lexical = lexical.prev;
889
- else if (c != maybeelse && c != popcontext) break;
890
- }
891
- while ((lexical.type == "stat" || lexical.type == "form") &&
892
- (firstChar == "}" || ((top = state.cc[state.cc.length - 1]) &&
893
- (top == maybeoperatorComma || top == maybeoperatorNoComma) &&
894
- !/^[,\.=+\-*:?[\(]/.test(textAfter))))
895
- lexical = lexical.prev;
896
- if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
897
- lexical = lexical.prev;
898
- var type = lexical.type, closing = firstChar == type;
899
-
900
- if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
901
- else if (type == "form" && firstChar == "{") return lexical.indented;
902
- else if (type == "form") return lexical.indented + cx.unit;
903
- else if (type == "stat")
904
- return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || cx.unit : 0);
905
- else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
906
- return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? cx.unit : 2 * cx.unit);
907
- else if (lexical.align) return lexical.column + (closing ? 0 : 1);
908
- else return lexical.indented + (closing ? 0 : cx.unit);
909
- },
910
-
911
- languageData: {
912
- indentOnInput: /^\s*(?:case .*?:|default:|\{|\})$/,
913
- commentTokens: jsonMode ? undefined : {line: "//", block: {open: "/*", close: "*/"}},
914
- closeBrackets: {brackets: ["(", "[", "{", "'", '"', "`"]},
915
- wordChars: "$"
916
- }
917
- };
918
- }
919
- const javascript = mkJavaScript({name: "javascript"});
920
- const json = mkJavaScript({name: "json", json: true});
921
- const jsonld = mkJavaScript({name: "json", jsonld: true});
922
- const typescript = mkJavaScript({name: "typescript", typescript: true});
923
-
924
- exports.javascript = javascript;
925
- exports.json = json;
926
- exports.jsonld = jsonld;
927
- exports.typescript = typescript;
928
- //# sourceMappingURL=javascript-5-BTydbD.js.map