@milkdown/crepe 7.5.1 → 7.5.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 (499) hide show
  1. package/lib/cjs/{index-udZSknd8.js → index-TGmNEvsj.js} +7 -7
  2. package/lib/cjs/index-TGmNEvsj.js.map +1 -0
  3. package/lib/cjs/index-fhKBUFkq.js +46 -0
  4. package/lib/cjs/index-fhKBUFkq.js.map +1 -0
  5. package/lib/cjs/{index-tqAbVyds.js → index-rLAgJeYn.js} +4 -4
  6. package/lib/cjs/index-rLAgJeYn.js.map +1 -0
  7. package/lib/cjs/index.js +3 -3
  8. package/lib/cjs/index.js.map +1 -1
  9. package/lib/esm/{index-v3rvbocl.js → index-amuALmzU.js} +2 -2
  10. package/lib/esm/{index-v3rvbocl.js.map → index-amuALmzU.js.map} +1 -1
  11. package/lib/esm/index-jU_6odT9.js +44 -0
  12. package/lib/esm/index-jU_6odT9.js.map +1 -0
  13. package/lib/esm/{index-lm00PM0y.js → index-w69wbtEZ.js} +2 -2
  14. package/lib/esm/{index-lm00PM0y.js.map → index-w69wbtEZ.js.map} +1 -1
  15. package/lib/esm/index.js +3 -3
  16. package/lib/esm/index.js.map +1 -1
  17. package/package.json +3 -5
  18. package/lib/cjs/apl-99bWvYTf.js +0 -145
  19. package/lib/cjs/apl-99bWvYTf.js.map +0 -1
  20. package/lib/cjs/asciiarmor-cf0JLIr_.js +0 -59
  21. package/lib/cjs/asciiarmor-cf0JLIr_.js.map +0 -1
  22. package/lib/cjs/asn1-H4XzAvBS.js +0 -195
  23. package/lib/cjs/asn1-H4XzAvBS.js.map +0 -1
  24. package/lib/cjs/asterisk-0FgJEfZB.js +0 -190
  25. package/lib/cjs/asterisk-0FgJEfZB.js.map +0 -1
  26. package/lib/cjs/brainfuck-JX7vRZy7.js +0 -73
  27. package/lib/cjs/brainfuck-JX7vRZy7.js.map +0 -1
  28. package/lib/cjs/clike-ueXlMQy5.js +0 -1034
  29. package/lib/cjs/clike-ueXlMQy5.js.map +0 -1
  30. package/lib/cjs/clojure-6iDAG5oi.js +0 -277
  31. package/lib/cjs/clojure-6iDAG5oi.js.map +0 -1
  32. package/lib/cjs/clsx-dASsG01A.js +0 -6
  33. package/lib/cjs/clsx-dASsG01A.js.map +0 -1
  34. package/lib/cjs/cmake-L0RIBnfc.js +0 -84
  35. package/lib/cjs/cmake-L0RIBnfc.js.map +0 -1
  36. package/lib/cjs/cobol-oxkMh1GJ.js +0 -238
  37. package/lib/cjs/cobol-oxkMh1GJ.js.map +0 -1
  38. package/lib/cjs/coffeescript--eauIeRQ.js +0 -332
  39. package/lib/cjs/coffeescript--eauIeRQ.js.map +0 -1
  40. package/lib/cjs/commonlisp-pgSu-q6f.js +0 -111
  41. package/lib/cjs/commonlisp-pgSu-q6f.js.map +0 -1
  42. package/lib/cjs/crystal-2y3I5ibZ.js +0 -422
  43. package/lib/cjs/crystal-2y3I5ibZ.js.map +0 -1
  44. package/lib/cjs/css-WH69cXzo.js +0 -855
  45. package/lib/cjs/css-WH69cXzo.js.map +0 -1
  46. package/lib/cjs/cypher-da-dqVyQ.js +0 -125
  47. package/lib/cjs/cypher-da-dqVyQ.js.map +0 -1
  48. package/lib/cjs/d-58J7EOkP.js +0 -208
  49. package/lib/cjs/d-58J7EOkP.js.map +0 -1
  50. package/lib/cjs/diff-437Hfzqm.js +0 -33
  51. package/lib/cjs/diff-437Hfzqm.js.map +0 -1
  52. package/lib/cjs/dockerfile-7i0OoaQe.js +0 -202
  53. package/lib/cjs/dockerfile-7i0OoaQe.js.map +0 -1
  54. package/lib/cjs/dtd-AKekCPPB.js +0 -124
  55. package/lib/cjs/dtd-AKekCPPB.js.map +0 -1
  56. package/lib/cjs/dylan-DLEmvz1I.js +0 -340
  57. package/lib/cjs/dylan-DLEmvz1I.js.map +0 -1
  58. package/lib/cjs/ebnf-36cJWqxB.js +0 -154
  59. package/lib/cjs/ebnf-36cJWqxB.js.map +0 -1
  60. package/lib/cjs/ecl-UWr5vJKJ.js +0 -193
  61. package/lib/cjs/ecl-UWr5vJKJ.js.map +0 -1
  62. package/lib/cjs/eiffel-Su-C9LAY.js +0 -149
  63. package/lib/cjs/eiffel-Su-C9LAY.js.map +0 -1
  64. package/lib/cjs/elm-vNNfVJj7.js +0 -233
  65. package/lib/cjs/elm-vNNfVJj7.js.map +0 -1
  66. package/lib/cjs/erlang-NM9dgYaS.js +0 -584
  67. package/lib/cjs/erlang-NM9dgYaS.js.map +0 -1
  68. package/lib/cjs/factor-RWs-4aWg.js +0 -68
  69. package/lib/cjs/factor-RWs-4aWg.js.map +0 -1
  70. package/lib/cjs/fcl-acUhGCfs.js +0 -157
  71. package/lib/cjs/fcl-acUhGCfs.js.map +0 -1
  72. package/lib/cjs/forth-sDkE6z3A.js +0 -167
  73. package/lib/cjs/forth-sDkE6z3A.js.map +0 -1
  74. package/lib/cjs/fortran-gkb4yvdk.js +0 -175
  75. package/lib/cjs/fortran-gkb4yvdk.js.map +0 -1
  76. package/lib/cjs/gas-mNA0qvkv.js +0 -347
  77. package/lib/cjs/gas-mNA0qvkv.js.map +0 -1
  78. package/lib/cjs/gherkin-5uyKpXXh.js +0 -150
  79. package/lib/cjs/gherkin-5uyKpXXh.js.map +0 -1
  80. package/lib/cjs/go-5XitXoIZ.js +0 -167
  81. package/lib/cjs/go-5XitXoIZ.js.map +0 -1
  82. package/lib/cjs/groovy-mz3pWMKN.js +0 -233
  83. package/lib/cjs/groovy-mz3pWMKN.js.map +0 -1
  84. package/lib/cjs/haskell-9KaSS7kb.js +0 -242
  85. package/lib/cjs/haskell-9KaSS7kb.js.map +0 -1
  86. package/lib/cjs/haxe-L8h6Pvni.js +0 -494
  87. package/lib/cjs/haxe-L8h6Pvni.js.map +0 -1
  88. package/lib/cjs/http-BFQQnRR-.js +0 -92
  89. package/lib/cjs/http-BFQQnRR-.js.map +0 -1
  90. package/lib/cjs/idl-29T-AzAy.js +0 -277
  91. package/lib/cjs/idl-29T-AzAy.js.map +0 -1
  92. package/lib/cjs/index--2zEz40J.js +0 -93
  93. package/lib/cjs/index--2zEz40J.js.map +0 -1
  94. package/lib/cjs/index-5n9R-QCl.js +0 -390
  95. package/lib/cjs/index-5n9R-QCl.js.map +0 -1
  96. package/lib/cjs/index-HEdBw63r.js +0 -428
  97. package/lib/cjs/index-HEdBw63r.js.map +0 -1
  98. package/lib/cjs/index-Hlt9dRH5.js +0 -113
  99. package/lib/cjs/index-Hlt9dRH5.js.map +0 -1
  100. package/lib/cjs/index-KCW2CzRk.js +0 -2504
  101. package/lib/cjs/index-KCW2CzRk.js.map +0 -1
  102. package/lib/cjs/index-KSZhahYb.js +0 -146
  103. package/lib/cjs/index-KSZhahYb.js.map +0 -1
  104. package/lib/cjs/index-NNo_VSEA.js +0 -684
  105. package/lib/cjs/index-NNo_VSEA.js.map +0 -1
  106. package/lib/cjs/index-O1bDbloo.js +0 -383
  107. package/lib/cjs/index-O1bDbloo.js.map +0 -1
  108. package/lib/cjs/index-OPh9naof.js +0 -141
  109. package/lib/cjs/index-OPh9naof.js.map +0 -1
  110. package/lib/cjs/index-PAhfZtcH.js +0 -517
  111. package/lib/cjs/index-PAhfZtcH.js.map +0 -1
  112. package/lib/cjs/index-PeRHVz4A.js +0 -759
  113. package/lib/cjs/index-PeRHVz4A.js.map +0 -1
  114. package/lib/cjs/index-U7GWrg-w.js +0 -25251
  115. package/lib/cjs/index-U7GWrg-w.js.map +0 -1
  116. package/lib/cjs/index-UTb0Az5e.js +0 -1877
  117. package/lib/cjs/index-UTb0Az5e.js.map +0 -1
  118. package/lib/cjs/index-UnEAyH8X.js +0 -194
  119. package/lib/cjs/index-UnEAyH8X.js.map +0 -1
  120. package/lib/cjs/index-VCkq0ru1.js +0 -188
  121. package/lib/cjs/index-VCkq0ru1.js.map +0 -1
  122. package/lib/cjs/index-WQl7Du53.js +0 -248
  123. package/lib/cjs/index-WQl7Du53.js.map +0 -1
  124. package/lib/cjs/index-ahL5MvrQ.js +0 -1014
  125. package/lib/cjs/index-ahL5MvrQ.js.map +0 -1
  126. package/lib/cjs/index-bpgWLeRY.js +0 -104
  127. package/lib/cjs/index-bpgWLeRY.js.map +0 -1
  128. package/lib/cjs/index-fZupvR_f.js +0 -341
  129. package/lib/cjs/index-fZupvR_f.js.map +0 -1
  130. package/lib/cjs/index-gSM-jgti.js +0 -449
  131. package/lib/cjs/index-gSM-jgti.js.map +0 -1
  132. package/lib/cjs/index-jlPr_A_N.js +0 -66
  133. package/lib/cjs/index-jlPr_A_N.js.map +0 -1
  134. package/lib/cjs/index-tqAbVyds.js.map +0 -1
  135. package/lib/cjs/index-udZSknd8.js.map +0 -1
  136. package/lib/cjs/index-urB-WDqA.js +0 -1030
  137. package/lib/cjs/index-urB-WDqA.js.map +0 -1
  138. package/lib/cjs/index-xWgWtxUR.js +0 -347
  139. package/lib/cjs/index-xWgWtxUR.js.map +0 -1
  140. package/lib/cjs/javascript-5-BTydbD.js +0 -928
  141. package/lib/cjs/javascript-5-BTydbD.js.map +0 -1
  142. package/lib/cjs/jinja2-BWMz4gPk.js +0 -174
  143. package/lib/cjs/jinja2-BWMz4gPk.js.map +0 -1
  144. package/lib/cjs/julia-dtR9J3KZ.js +0 -372
  145. package/lib/cjs/julia-dtR9J3KZ.js.map +0 -1
  146. package/lib/cjs/livescript-YxT0INe3.js +0 -262
  147. package/lib/cjs/livescript-YxT0INe3.js.map +0 -1
  148. package/lib/cjs/lua-h7_AXjy9.js +0 -140
  149. package/lib/cjs/lua-h7_AXjy9.js.map +0 -1
  150. package/lib/cjs/mathematica-Zc57fOr3.js +0 -156
  151. package/lib/cjs/mathematica-Zc57fOr3.js.map +0 -1
  152. package/lib/cjs/mbox-ltKsKgJd.js +0 -117
  153. package/lib/cjs/mbox-ltKsKgJd.js.map +0 -1
  154. package/lib/cjs/mirc-xTLeWqmy.js +0 -179
  155. package/lib/cjs/mirc-xTLeWqmy.js.map +0 -1
  156. package/lib/cjs/mllike-xukl-Kjp.js +0 -351
  157. package/lib/cjs/mllike-xukl-Kjp.js.map +0 -1
  158. package/lib/cjs/modelica-LsXtAawk.js +0 -195
  159. package/lib/cjs/modelica-LsXtAawk.js.map +0 -1
  160. package/lib/cjs/mscgen-9HooYIVW.js +0 -154
  161. package/lib/cjs/mscgen-9HooYIVW.js.map +0 -1
  162. package/lib/cjs/mumps-VXqGp84f.js +0 -132
  163. package/lib/cjs/mumps-VXqGp84f.js.map +0 -1
  164. package/lib/cjs/nginx-UrubUbn1.js +0 -166
  165. package/lib/cjs/nginx-UrubUbn1.js.map +0 -1
  166. package/lib/cjs/nsis-c2AYwqyy.js +0 -83
  167. package/lib/cjs/nsis-c2AYwqyy.js.map +0 -1
  168. package/lib/cjs/ntriples-N1nwiheD.js +0 -144
  169. package/lib/cjs/ntriples-N1nwiheD.js.map +0 -1
  170. package/lib/cjs/octave-ElonStfZ.js +0 -115
  171. package/lib/cjs/octave-ElonStfZ.js.map +0 -1
  172. package/lib/cjs/oz-7VQTnCfu.js +0 -238
  173. package/lib/cjs/oz-7VQTnCfu.js.map +0 -1
  174. package/lib/cjs/pascal-yq2Cb88Q.js +0 -127
  175. package/lib/cjs/pascal-yq2Cb88Q.js.map +0 -1
  176. package/lib/cjs/perl-hJq4byS9.js +0 -822
  177. package/lib/cjs/perl-hJq4byS9.js.map +0 -1
  178. package/lib/cjs/pig-2syuOlAa.js +0 -152
  179. package/lib/cjs/pig-2syuOlAa.js.map +0 -1
  180. package/lib/cjs/powershell-NDwxuSDg.js +0 -384
  181. package/lib/cjs/powershell-NDwxuSDg.js.map +0 -1
  182. package/lib/cjs/properties-wacODxDJ.js +0 -65
  183. package/lib/cjs/properties-wacODxDJ.js.map +0 -1
  184. package/lib/cjs/protobuf-zVHZwskk.js +0 -57
  185. package/lib/cjs/protobuf-zVHZwskk.js.map +0 -1
  186. package/lib/cjs/puppet-koQikqO-.js +0 -208
  187. package/lib/cjs/puppet-koQikqO-.js.map +0 -1
  188. package/lib/cjs/python-P3UsKHbj.js +0 -394
  189. package/lib/cjs/python-P3UsKHbj.js.map +0 -1
  190. package/lib/cjs/q-Z_d2uXoA.js +0 -126
  191. package/lib/cjs/q-Z_d2uXoA.js.map +0 -1
  192. package/lib/cjs/r-J6Jl9z1i.js +0 -177
  193. package/lib/cjs/r-J6Jl9z1i.js.map +0 -1
  194. package/lib/cjs/rpm-6C0Omumu.js +0 -93
  195. package/lib/cjs/rpm-6C0Omumu.js.map +0 -1
  196. package/lib/cjs/ruby-POVyUmsb.js +0 -290
  197. package/lib/cjs/ruby-POVyUmsb.js.map +0 -1
  198. package/lib/cjs/sas-vDtpSmFr.js +0 -271
  199. package/lib/cjs/sas-vDtpSmFr.js.map +0 -1
  200. package/lib/cjs/scheme-5AA5BH7S.js +0 -266
  201. package/lib/cjs/scheme-5AA5BH7S.js.map +0 -1
  202. package/lib/cjs/shell-_ztDMiW6.js +0 -148
  203. package/lib/cjs/shell-_ztDMiW6.js.map +0 -1
  204. package/lib/cjs/sieve-R_vzlbvH.js +0 -181
  205. package/lib/cjs/sieve-R_vzlbvH.js.map +0 -1
  206. package/lib/cjs/simple-mode-ZwmNbV0h.js +0 -138
  207. package/lib/cjs/simple-mode-ZwmNbV0h.js.map +0 -1
  208. package/lib/cjs/smalltalk-dWLp5zN8.js +0 -156
  209. package/lib/cjs/smalltalk-dWLp5zN8.js.map +0 -1
  210. package/lib/cjs/solr-wSmvjKI8.js +0 -83
  211. package/lib/cjs/solr-wSmvjKI8.js.map +0 -1
  212. package/lib/cjs/sparql-GNU_0xKB.js +0 -173
  213. package/lib/cjs/sparql-GNU_0xKB.js.map +0 -1
  214. package/lib/cjs/spreadsheet-BiqYLk6M.js +0 -101
  215. package/lib/cjs/spreadsheet-BiqYLk6M.js.map +0 -1
  216. package/lib/cjs/sql-9GpHBPsC.js +0 -497
  217. package/lib/cjs/sql-9GpHBPsC.js.map +0 -1
  218. package/lib/cjs/stex-1V41CNLk.js +0 -250
  219. package/lib/cjs/stex-1V41CNLk.js.map +0 -1
  220. package/lib/cjs/stylus-H6hn9z_G.js +0 -753
  221. package/lib/cjs/stylus-H6hn9z_G.js.map +0 -1
  222. package/lib/cjs/swift-Xv5f8zgN.js +0 -205
  223. package/lib/cjs/swift-Xv5f8zgN.js.map +0 -1
  224. package/lib/cjs/tcl-LI-LOw_t.js +0 -128
  225. package/lib/cjs/tcl-LI-LOw_t.js.map +0 -1
  226. package/lib/cjs/textile-3NvRPUgg.js +0 -444
  227. package/lib/cjs/textile-3NvRPUgg.js.map +0 -1
  228. package/lib/cjs/tiddlywiki-PkMzy8_R.js +0 -281
  229. package/lib/cjs/tiddlywiki-PkMzy8_R.js.map +0 -1
  230. package/lib/cjs/tiki-Zk_GnEC8.js +0 -292
  231. package/lib/cjs/tiki-Zk_GnEC8.js.map +0 -1
  232. package/lib/cjs/toml-36gJ0YCq.js +0 -78
  233. package/lib/cjs/toml-36gJ0YCq.js.map +0 -1
  234. package/lib/cjs/troff-RLZ_o61o.js +0 -67
  235. package/lib/cjs/troff-RLZ_o61o.js.map +0 -1
  236. package/lib/cjs/ttcn-cfg-twaoJYvf.js +0 -204
  237. package/lib/cjs/ttcn-cfg-twaoJYvf.js.map +0 -1
  238. package/lib/cjs/ttcn-kGwvGb2v.js +0 -260
  239. package/lib/cjs/ttcn-kGwvGb2v.js.map +0 -1
  240. package/lib/cjs/turtle-nnevat7b.js +0 -144
  241. package/lib/cjs/turtle-nnevat7b.js.map +0 -1
  242. package/lib/cjs/vb-fO_I9s3s.js +0 -252
  243. package/lib/cjs/vb-fO_I9s3s.js.map +0 -1
  244. package/lib/cjs/vbscript-HXnn40y4.js +0 -324
  245. package/lib/cjs/vbscript-HXnn40y4.js.map +0 -1
  246. package/lib/cjs/velocity-Wn-ZfFzr.js +0 -189
  247. package/lib/cjs/velocity-Wn-ZfFzr.js.map +0 -1
  248. package/lib/cjs/verilog-y1ev34z6.js +0 -569
  249. package/lib/cjs/verilog-y1ev34z6.js.map +0 -1
  250. package/lib/cjs/vhdl-LF0oeXxc.js +0 -177
  251. package/lib/cjs/vhdl-LF0oeXxc.js.map +0 -1
  252. package/lib/cjs/webidl-6kI5KbeC.js +0 -182
  253. package/lib/cjs/webidl-6kI5KbeC.js.map +0 -1
  254. package/lib/cjs/xquery-BavrmwsO.js +0 -428
  255. package/lib/cjs/xquery-BavrmwsO.js.map +0 -1
  256. package/lib/cjs/yacas-1g_AbTrl.js +0 -185
  257. package/lib/cjs/yacas-1g_AbTrl.js.map +0 -1
  258. package/lib/cjs/z80-QYzKAAp7.js +0 -106
  259. package/lib/cjs/z80-QYzKAAp7.js.map +0 -1
  260. package/lib/esm/apl-eHQxyJFn.js +0 -143
  261. package/lib/esm/apl-eHQxyJFn.js.map +0 -1
  262. package/lib/esm/asciiarmor-Z-IGYCI4.js +0 -57
  263. package/lib/esm/asciiarmor-Z-IGYCI4.js.map +0 -1
  264. package/lib/esm/asn1-gF7x-q1y.js +0 -193
  265. package/lib/esm/asn1-gF7x-q1y.js.map +0 -1
  266. package/lib/esm/asterisk-swk20ftp.js +0 -188
  267. package/lib/esm/asterisk-swk20ftp.js.map +0 -1
  268. package/lib/esm/brainfuck-IFQdiQoR.js +0 -71
  269. package/lib/esm/brainfuck-IFQdiQoR.js.map +0 -1
  270. package/lib/esm/clike-q3hUF2Cx.js +0 -1019
  271. package/lib/esm/clike-q3hUF2Cx.js.map +0 -1
  272. package/lib/esm/clojure-I2Krbr2M.js +0 -275
  273. package/lib/esm/clojure-I2Krbr2M.js.map +0 -1
  274. package/lib/esm/clsx-RxCLxYpD.js +0 -4
  275. package/lib/esm/clsx-RxCLxYpD.js.map +0 -1
  276. package/lib/esm/cmake-ewwXLeuZ.js +0 -82
  277. package/lib/esm/cmake-ewwXLeuZ.js.map +0 -1
  278. package/lib/esm/cobol-fpN1nAnR.js +0 -236
  279. package/lib/esm/cobol-fpN1nAnR.js.map +0 -1
  280. package/lib/esm/coffeescript--eTFR-bH.js +0 -330
  281. package/lib/esm/coffeescript--eTFR-bH.js.map +0 -1
  282. package/lib/esm/commonlisp-XLSwVdLc.js +0 -109
  283. package/lib/esm/commonlisp-XLSwVdLc.js.map +0 -1
  284. package/lib/esm/crystal-_r3Aa1_a.js +0 -420
  285. package/lib/esm/crystal-_r3Aa1_a.js.map +0 -1
  286. package/lib/esm/css-hgwYGMKZ.js +0 -848
  287. package/lib/esm/css-hgwYGMKZ.js.map +0 -1
  288. package/lib/esm/cypher-bbJyAa-4.js +0 -123
  289. package/lib/esm/cypher-bbJyAa-4.js.map +0 -1
  290. package/lib/esm/d-5MyulviS.js +0 -206
  291. package/lib/esm/d-5MyulviS.js.map +0 -1
  292. package/lib/esm/diff-neOaT_vk.js +0 -31
  293. package/lib/esm/diff-neOaT_vk.js.map +0 -1
  294. package/lib/esm/dockerfile-lzx42-zz.js +0 -200
  295. package/lib/esm/dockerfile-lzx42-zz.js.map +0 -1
  296. package/lib/esm/dtd-FmzPLZcQ.js +0 -122
  297. package/lib/esm/dtd-FmzPLZcQ.js.map +0 -1
  298. package/lib/esm/dylan-1HtRK4GO.js +0 -338
  299. package/lib/esm/dylan-1HtRK4GO.js.map +0 -1
  300. package/lib/esm/ebnf-Nz-pnLHy.js +0 -152
  301. package/lib/esm/ebnf-Nz-pnLHy.js.map +0 -1
  302. package/lib/esm/ecl-lQsZhQz0.js +0 -191
  303. package/lib/esm/ecl-lQsZhQz0.js.map +0 -1
  304. package/lib/esm/eiffel-R_HiEkhx.js +0 -147
  305. package/lib/esm/eiffel-R_HiEkhx.js.map +0 -1
  306. package/lib/esm/elm-KYv4VTDg.js +0 -231
  307. package/lib/esm/elm-KYv4VTDg.js.map +0 -1
  308. package/lib/esm/erlang-7YaHCBIe.js +0 -582
  309. package/lib/esm/erlang-7YaHCBIe.js.map +0 -1
  310. package/lib/esm/factor-opBU9aTK.js +0 -66
  311. package/lib/esm/factor-opBU9aTK.js.map +0 -1
  312. package/lib/esm/fcl-jm31FmFz.js +0 -155
  313. package/lib/esm/fcl-jm31FmFz.js.map +0 -1
  314. package/lib/esm/forth-5NKbjnWh.js +0 -165
  315. package/lib/esm/forth-5NKbjnWh.js.map +0 -1
  316. package/lib/esm/fortran-dXm_-cb9.js +0 -173
  317. package/lib/esm/fortran-dXm_-cb9.js.map +0 -1
  318. package/lib/esm/gas-nsYVnsy-.js +0 -344
  319. package/lib/esm/gas-nsYVnsy-.js.map +0 -1
  320. package/lib/esm/gherkin-fzKpjm3M.js +0 -148
  321. package/lib/esm/gherkin-fzKpjm3M.js.map +0 -1
  322. package/lib/esm/go-Pn1qh7yl.js +0 -165
  323. package/lib/esm/go-Pn1qh7yl.js.map +0 -1
  324. package/lib/esm/groovy-DZY-8keZ.js +0 -231
  325. package/lib/esm/groovy-DZY-8keZ.js.map +0 -1
  326. package/lib/esm/haskell-JGh2upDd.js +0 -240
  327. package/lib/esm/haskell-JGh2upDd.js.map +0 -1
  328. package/lib/esm/haxe-1hvVK-Fy.js +0 -491
  329. package/lib/esm/haxe-1hvVK-Fy.js.map +0 -1
  330. package/lib/esm/http-mY1M77wn.js +0 -90
  331. package/lib/esm/http-mY1M77wn.js.map +0 -1
  332. package/lib/esm/idl-dy_653wH.js +0 -275
  333. package/lib/esm/idl-dy_653wH.js.map +0 -1
  334. package/lib/esm/index-1NetiFdJ.js +0 -90
  335. package/lib/esm/index-1NetiFdJ.js.map +0 -1
  336. package/lib/esm/index-2I_xbjAZ.js +0 -1012
  337. package/lib/esm/index-2I_xbjAZ.js.map +0 -1
  338. package/lib/esm/index-2huXYfuJ.js +0 -138
  339. package/lib/esm/index-2huXYfuJ.js.map +0 -1
  340. package/lib/esm/index-4x6_TVZv.js +0 -100
  341. package/lib/esm/index-4x6_TVZv.js.map +0 -1
  342. package/lib/esm/index-A-dNwMMf.js +0 -1872
  343. package/lib/esm/index-A-dNwMMf.js.map +0 -1
  344. package/lib/esm/index-AV99ipmP.js +0 -446
  345. package/lib/esm/index-AV99ipmP.js.map +0 -1
  346. package/lib/esm/index-PC2bahtq.js +0 -110
  347. package/lib/esm/index-PC2bahtq.js.map +0 -1
  348. package/lib/esm/index-QBYz82jZ.js +0 -378
  349. package/lib/esm/index-QBYz82jZ.js.map +0 -1
  350. package/lib/esm/index-W1pAMr_8.js +0 -142
  351. package/lib/esm/index-W1pAMr_8.js.map +0 -1
  352. package/lib/esm/index-Xzdc2jbA.js +0 -25207
  353. package/lib/esm/index-Xzdc2jbA.js.map +0 -1
  354. package/lib/esm/index-ZAtZWqJQ.js +0 -191
  355. package/lib/esm/index-ZAtZWqJQ.js.map +0 -1
  356. package/lib/esm/index-bnSKBrbD.js +0 -386
  357. package/lib/esm/index-bnSKBrbD.js.map +0 -1
  358. package/lib/esm/index-ftnOhuRS.js +0 -244
  359. package/lib/esm/index-ftnOhuRS.js.map +0 -1
  360. package/lib/esm/index-iQPB0Rdl.js +0 -343
  361. package/lib/esm/index-iQPB0Rdl.js.map +0 -1
  362. package/lib/esm/index-kPj3-TKp.js +0 -63
  363. package/lib/esm/index-kPj3-TKp.js.map +0 -1
  364. package/lib/esm/index-kgOR7SZ6.js +0 -336
  365. package/lib/esm/index-kgOR7SZ6.js.map +0 -1
  366. package/lib/esm/index-m49Bj3q7.js +0 -185
  367. package/lib/esm/index-m49Bj3q7.js.map +0 -1
  368. package/lib/esm/index-sWVjGw-3.js +0 -2497
  369. package/lib/esm/index-sWVjGw-3.js.map +0 -1
  370. package/lib/esm/index-twh8lL5o.js +0 -671
  371. package/lib/esm/index-twh8lL5o.js.map +0 -1
  372. package/lib/esm/index-v02MCz4_.js +0 -744
  373. package/lib/esm/index-v02MCz4_.js.map +0 -1
  374. package/lib/esm/index-wEXT8mbN.js +0 -512
  375. package/lib/esm/index-wEXT8mbN.js.map +0 -1
  376. package/lib/esm/index-wFIac5Kw.js +0 -1023
  377. package/lib/esm/index-wFIac5Kw.js.map +0 -1
  378. package/lib/esm/index-wg94ewRo.js +0 -425
  379. package/lib/esm/index-wg94ewRo.js.map +0 -1
  380. package/lib/esm/javascript-TMTz-YQH.js +0 -923
  381. package/lib/esm/javascript-TMTz-YQH.js.map +0 -1
  382. package/lib/esm/jinja2-sRIdliZK.js +0 -172
  383. package/lib/esm/jinja2-sRIdliZK.js.map +0 -1
  384. package/lib/esm/julia-fK0wmpGL.js +0 -370
  385. package/lib/esm/julia-fK0wmpGL.js.map +0 -1
  386. package/lib/esm/livescript-FRbAot3D.js +0 -260
  387. package/lib/esm/livescript-FRbAot3D.js.map +0 -1
  388. package/lib/esm/lua-t4FHEjvK.js +0 -138
  389. package/lib/esm/lua-t4FHEjvK.js.map +0 -1
  390. package/lib/esm/mathematica-sn_KGlYj.js +0 -154
  391. package/lib/esm/mathematica-sn_KGlYj.js.map +0 -1
  392. package/lib/esm/mbox-KvVC319E.js +0 -115
  393. package/lib/esm/mbox-KvVC319E.js.map +0 -1
  394. package/lib/esm/mirc-PzJ0zKSk.js +0 -177
  395. package/lib/esm/mirc-PzJ0zKSk.js.map +0 -1
  396. package/lib/esm/mllike-ZK411xkN.js +0 -347
  397. package/lib/esm/mllike-ZK411xkN.js.map +0 -1
  398. package/lib/esm/modelica-ZaHlRCbp.js +0 -193
  399. package/lib/esm/modelica-ZaHlRCbp.js.map +0 -1
  400. package/lib/esm/mscgen-Kkq4o4Zm.js +0 -150
  401. package/lib/esm/mscgen-Kkq4o4Zm.js.map +0 -1
  402. package/lib/esm/mumps-M8a87-rl.js +0 -130
  403. package/lib/esm/mumps-M8a87-rl.js.map +0 -1
  404. package/lib/esm/nginx-2LJIX23E.js +0 -164
  405. package/lib/esm/nginx-2LJIX23E.js.map +0 -1
  406. package/lib/esm/nsis-zvfFgMLi.js +0 -81
  407. package/lib/esm/nsis-zvfFgMLi.js.map +0 -1
  408. package/lib/esm/ntriples-tVkHy5bk.js +0 -142
  409. package/lib/esm/ntriples-tVkHy5bk.js.map +0 -1
  410. package/lib/esm/octave-mE4T5MF5.js +0 -113
  411. package/lib/esm/octave-mE4T5MF5.js.map +0 -1
  412. package/lib/esm/oz-q-LCsuVg.js +0 -236
  413. package/lib/esm/oz-q-LCsuVg.js.map +0 -1
  414. package/lib/esm/pascal-0IgUAn4C.js +0 -125
  415. package/lib/esm/pascal-0IgUAn4C.js.map +0 -1
  416. package/lib/esm/perl-AqxdYGac.js +0 -820
  417. package/lib/esm/perl-AqxdYGac.js.map +0 -1
  418. package/lib/esm/pig-ESM-IjQj.js +0 -150
  419. package/lib/esm/pig-ESM-IjQj.js.map +0 -1
  420. package/lib/esm/powershell-CLFP0L55.js +0 -382
  421. package/lib/esm/powershell-CLFP0L55.js.map +0 -1
  422. package/lib/esm/properties-oWHNzvb9.js +0 -63
  423. package/lib/esm/properties-oWHNzvb9.js.map +0 -1
  424. package/lib/esm/protobuf-c7eMmdcc.js +0 -55
  425. package/lib/esm/protobuf-c7eMmdcc.js.map +0 -1
  426. package/lib/esm/puppet-FjzvdRJr.js +0 -206
  427. package/lib/esm/puppet-FjzvdRJr.js.map +0 -1
  428. package/lib/esm/python-3Pv0tnvt.js +0 -390
  429. package/lib/esm/python-3Pv0tnvt.js.map +0 -1
  430. package/lib/esm/q-IImW8da6.js +0 -124
  431. package/lib/esm/q-IImW8da6.js.map +0 -1
  432. package/lib/esm/r-CnEkTvR0.js +0 -175
  433. package/lib/esm/r-CnEkTvR0.js.map +0 -1
  434. package/lib/esm/rpm-Q55-fEHj.js +0 -90
  435. package/lib/esm/rpm-Q55-fEHj.js.map +0 -1
  436. package/lib/esm/ruby-zhaGB3Kh.js +0 -288
  437. package/lib/esm/ruby-zhaGB3Kh.js.map +0 -1
  438. package/lib/esm/sas-Ur9jZIOV.js +0 -269
  439. package/lib/esm/sas-Ur9jZIOV.js.map +0 -1
  440. package/lib/esm/scheme-daT5-Rya.js +0 -264
  441. package/lib/esm/scheme-daT5-Rya.js.map +0 -1
  442. package/lib/esm/shell-cwFL0AYP.js +0 -146
  443. package/lib/esm/shell-cwFL0AYP.js.map +0 -1
  444. package/lib/esm/sieve-MlNXFFUq.js +0 -179
  445. package/lib/esm/sieve-MlNXFFUq.js.map +0 -1
  446. package/lib/esm/simple-mode-m1rsX7Gw.js +0 -136
  447. package/lib/esm/simple-mode-m1rsX7Gw.js.map +0 -1
  448. package/lib/esm/smalltalk-xrQICp9e.js +0 -154
  449. package/lib/esm/smalltalk-xrQICp9e.js.map +0 -1
  450. package/lib/esm/solr-PU3oPgQz.js +0 -81
  451. package/lib/esm/solr-PU3oPgQz.js.map +0 -1
  452. package/lib/esm/sparql--u8NRBii.js +0 -171
  453. package/lib/esm/sparql--u8NRBii.js.map +0 -1
  454. package/lib/esm/spreadsheet-QCp0LifX.js +0 -99
  455. package/lib/esm/spreadsheet-QCp0LifX.js.map +0 -1
  456. package/lib/esm/sql-dsGfl64h.js +0 -482
  457. package/lib/esm/sql-dsGfl64h.js.map +0 -1
  458. package/lib/esm/stex-WcLBzvkD.js +0 -247
  459. package/lib/esm/stex-WcLBzvkD.js.map +0 -1
  460. package/lib/esm/stylus--A5XAqOX.js +0 -751
  461. package/lib/esm/stylus--A5XAqOX.js.map +0 -1
  462. package/lib/esm/swift-qAm73i7G.js +0 -203
  463. package/lib/esm/swift-qAm73i7G.js.map +0 -1
  464. package/lib/esm/tcl-Kdc7qxc-.js +0 -126
  465. package/lib/esm/tcl-Kdc7qxc-.js.map +0 -1
  466. package/lib/esm/textile--sz8UrIz.js +0 -442
  467. package/lib/esm/textile--sz8UrIz.js.map +0 -1
  468. package/lib/esm/tiddlywiki-xNXTeBlQ.js +0 -279
  469. package/lib/esm/tiddlywiki-xNXTeBlQ.js.map +0 -1
  470. package/lib/esm/tiki-LCXjrNH3.js +0 -290
  471. package/lib/esm/tiki-LCXjrNH3.js.map +0 -1
  472. package/lib/esm/toml-Ac4tlBMn.js +0 -76
  473. package/lib/esm/toml-Ac4tlBMn.js.map +0 -1
  474. package/lib/esm/troff-LLW1x1Yz.js +0 -65
  475. package/lib/esm/troff-LLW1x1Yz.js.map +0 -1
  476. package/lib/esm/ttcn-ZYZ9FS3u.js +0 -258
  477. package/lib/esm/ttcn-ZYZ9FS3u.js.map +0 -1
  478. package/lib/esm/ttcn-cfg-qsvf3MfB.js +0 -202
  479. package/lib/esm/ttcn-cfg-qsvf3MfB.js.map +0 -1
  480. package/lib/esm/turtle-wq3TqOth.js +0 -142
  481. package/lib/esm/turtle-wq3TqOth.js.map +0 -1
  482. package/lib/esm/vb-86M_JuNP.js +0 -250
  483. package/lib/esm/vb-86M_JuNP.js.map +0 -1
  484. package/lib/esm/vbscript-GueAeVug.js +0 -321
  485. package/lib/esm/vbscript-GueAeVug.js.map +0 -1
  486. package/lib/esm/velocity-7PW9GXO2.js +0 -187
  487. package/lib/esm/velocity-7PW9GXO2.js.map +0 -1
  488. package/lib/esm/verilog-PXtXH14C.js +0 -566
  489. package/lib/esm/verilog-PXtXH14C.js.map +0 -1
  490. package/lib/esm/vhdl-I8eyK83X.js +0 -175
  491. package/lib/esm/vhdl-I8eyK83X.js.map +0 -1
  492. package/lib/esm/webidl-1f8ATJ66.js +0 -180
  493. package/lib/esm/webidl-1f8ATJ66.js.map +0 -1
  494. package/lib/esm/xquery-IYp28Wx6.js +0 -426
  495. package/lib/esm/xquery-IYp28Wx6.js.map +0 -1
  496. package/lib/esm/yacas-wkENB05f.js +0 -183
  497. package/lib/esm/yacas-wkENB05f.js.map +0 -1
  498. package/lib/esm/z80-GaXiLdiV.js +0 -103
  499. package/lib/esm/z80-GaXiLdiV.js.map +0 -1
@@ -1,1034 +0,0 @@
1
- 'use strict';
2
-
3
- function Context(indented, column, type, info, align, prev) {
4
- this.indented = indented;
5
- this.column = column;
6
- this.type = type;
7
- this.info = info;
8
- this.align = align;
9
- this.prev = prev;
10
- }
11
- function pushContext(state, col, type, info) {
12
- var indent = state.indented;
13
- if (state.context && state.context.type == "statement" && type != "statement")
14
- indent = state.context.indented;
15
- return state.context = new Context(indent, col, type, info, null, state.context);
16
- }
17
- function popContext(state) {
18
- var t = state.context.type;
19
- if (t == ")" || t == "]" || t == "}")
20
- state.indented = state.context.indented;
21
- return state.context = state.context.prev;
22
- }
23
-
24
- function typeBefore(stream, state, pos) {
25
- if (state.prevToken == "variable" || state.prevToken == "type") return true;
26
- if (/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(stream.string.slice(0, pos))) return true;
27
- if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true;
28
- }
29
-
30
- function isTopScope(context) {
31
- for (;;) {
32
- if (!context || context.type == "top") return true;
33
- if (context.type == "}" && context.prev.info != "namespace") return false;
34
- context = context.prev;
35
- }
36
- }
37
-
38
- function clike(parserConfig) {
39
- var statementIndentUnit = parserConfig.statementIndentUnit,
40
- dontAlignCalls = parserConfig.dontAlignCalls,
41
- keywords = parserConfig.keywords || {},
42
- types = parserConfig.types || {},
43
- builtin = parserConfig.builtin || {},
44
- blockKeywords = parserConfig.blockKeywords || {},
45
- defKeywords = parserConfig.defKeywords || {},
46
- atoms = parserConfig.atoms || {},
47
- hooks = parserConfig.hooks || {},
48
- multiLineStrings = parserConfig.multiLineStrings,
49
- indentStatements = parserConfig.indentStatements !== false,
50
- indentSwitch = parserConfig.indentSwitch !== false,
51
- namespaceSeparator = parserConfig.namespaceSeparator,
52
- isPunctuationChar = parserConfig.isPunctuationChar || /[\[\]{}\(\),;\:\.]/,
53
- numberStart = parserConfig.numberStart || /[\d\.]/,
54
- number = parserConfig.number || /^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,
55
- isOperatorChar = parserConfig.isOperatorChar || /[+\-*&%=<>!?|\/]/,
56
- isIdentifierChar = parserConfig.isIdentifierChar || /[\w\$_\xa1-\uffff]/,
57
- // An optional function that takes a {string} token and returns true if it
58
- // should be treated as a builtin.
59
- isReservedIdentifier = parserConfig.isReservedIdentifier || false;
60
-
61
- var curPunc, isDefKeyword;
62
-
63
- function tokenBase(stream, state) {
64
- var ch = stream.next();
65
- if (hooks[ch]) {
66
- var result = hooks[ch](stream, state);
67
- if (result !== false) return result;
68
- }
69
- if (ch == '"' || ch == "'") {
70
- state.tokenize = tokenString(ch);
71
- return state.tokenize(stream, state);
72
- }
73
- if (numberStart.test(ch)) {
74
- stream.backUp(1);
75
- if (stream.match(number)) return "number"
76
- stream.next();
77
- }
78
- if (isPunctuationChar.test(ch)) {
79
- curPunc = ch;
80
- return null;
81
- }
82
- if (ch == "/") {
83
- if (stream.eat("*")) {
84
- state.tokenize = tokenComment;
85
- return tokenComment(stream, state);
86
- }
87
- if (stream.eat("/")) {
88
- stream.skipToEnd();
89
- return "comment";
90
- }
91
- }
92
- if (isOperatorChar.test(ch)) {
93
- while (!stream.match(/^\/[\/*]/, false) && stream.eat(isOperatorChar)) {}
94
- return "operator";
95
- }
96
- stream.eatWhile(isIdentifierChar);
97
- if (namespaceSeparator) while (stream.match(namespaceSeparator))
98
- stream.eatWhile(isIdentifierChar);
99
-
100
- var cur = stream.current();
101
- if (contains(keywords, cur)) {
102
- if (contains(blockKeywords, cur)) curPunc = "newstatement";
103
- if (contains(defKeywords, cur)) isDefKeyword = true;
104
- return "keyword";
105
- }
106
- if (contains(types, cur)) return "type";
107
- if (contains(builtin, cur)
108
- || (isReservedIdentifier && isReservedIdentifier(cur))) {
109
- if (contains(blockKeywords, cur)) curPunc = "newstatement";
110
- return "builtin";
111
- }
112
- if (contains(atoms, cur)) return "atom";
113
- return "variable";
114
- }
115
-
116
- function tokenString(quote) {
117
- return function(stream, state) {
118
- var escaped = false, next, end = false;
119
- while ((next = stream.next()) != null) {
120
- if (next == quote && !escaped) {end = true; break;}
121
- escaped = !escaped && next == "\\";
122
- }
123
- if (end || !(escaped || multiLineStrings))
124
- state.tokenize = null;
125
- return "string";
126
- };
127
- }
128
-
129
- function tokenComment(stream, state) {
130
- var maybeEnd = false, ch;
131
- while (ch = stream.next()) {
132
- if (ch == "/" && maybeEnd) {
133
- state.tokenize = null;
134
- break;
135
- }
136
- maybeEnd = (ch == "*");
137
- }
138
- return "comment";
139
- }
140
-
141
- function maybeEOL(stream, state) {
142
- if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context))
143
- state.typeAtEndOfLine = typeBefore(stream, state, stream.pos);
144
- }
145
-
146
- // Interface
147
-
148
- return {
149
- name: parserConfig.name,
150
- startState: function(indentUnit) {
151
- return {
152
- tokenize: null,
153
- context: new Context(-indentUnit, 0, "top", null, false),
154
- indented: 0,
155
- startOfLine: true,
156
- prevToken: null
157
- };
158
- },
159
-
160
- token: function(stream, state) {
161
- var ctx = state.context;
162
- if (stream.sol()) {
163
- if (ctx.align == null) ctx.align = false;
164
- state.indented = stream.indentation();
165
- state.startOfLine = true;
166
- }
167
- if (stream.eatSpace()) { maybeEOL(stream, state); return null; }
168
- curPunc = isDefKeyword = null;
169
- var style = (state.tokenize || tokenBase)(stream, state);
170
- if (style == "comment" || style == "meta") return style;
171
- if (ctx.align == null) ctx.align = true;
172
-
173
- if (curPunc == ";" || curPunc == ":" || (curPunc == "," && stream.match(/^\s*(?:\/\/.*)?$/, false)))
174
- while (state.context.type == "statement") popContext(state);
175
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
176
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
177
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
178
- else if (curPunc == "}") {
179
- while (ctx.type == "statement") ctx = popContext(state);
180
- if (ctx.type == "}") ctx = popContext(state);
181
- while (ctx.type == "statement") ctx = popContext(state);
182
- }
183
- else if (curPunc == ctx.type) popContext(state);
184
- else if (indentStatements &&
185
- (((ctx.type == "}" || ctx.type == "top") && curPunc != ";") ||
186
- (ctx.type == "statement" && curPunc == "newstatement"))) {
187
- pushContext(state, stream.column(), "statement", stream.current());
188
- }
189
-
190
- if (style == "variable" &&
191
- ((state.prevToken == "def" ||
192
- (parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) &&
193
- isTopScope(state.context) && stream.match(/^\s*\(/, false)))))
194
- style = "def";
195
-
196
- if (hooks.token) {
197
- var result = hooks.token(stream, state, style);
198
- if (result !== undefined) style = result;
199
- }
200
-
201
- if (style == "def" && parserConfig.styleDefs === false) style = "variable";
202
-
203
- state.startOfLine = false;
204
- state.prevToken = isDefKeyword ? "def" : style || curPunc;
205
- maybeEOL(stream, state);
206
- return style;
207
- },
208
-
209
- indent: function(state, textAfter, context) {
210
- if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine && isTopScope(state.context))
211
- return null;
212
- var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
213
- var closing = firstChar == ctx.type;
214
- if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
215
- if (parserConfig.dontIndentStatements)
216
- while (ctx.type == "statement" && parserConfig.dontIndentStatements.test(ctx.info))
217
- ctx = ctx.prev;
218
- if (hooks.indent) {
219
- var hook = hooks.indent(state, ctx, textAfter, context.unit);
220
- if (typeof hook == "number") return hook
221
- }
222
- var switchBlock = ctx.prev && ctx.prev.info == "switch";
223
- if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) {
224
- while (ctx.type != "top" && ctx.type != "}") ctx = ctx.prev;
225
- return ctx.indented
226
- }
227
- if (ctx.type == "statement")
228
- return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit || context.unit);
229
- if (ctx.align && (!dontAlignCalls || ctx.type != ")"))
230
- return ctx.column + (closing ? 0 : 1);
231
- if (ctx.type == ")" && !closing)
232
- return ctx.indented + (statementIndentUnit || context.unit);
233
-
234
- return ctx.indented + (closing ? 0 : context.unit) +
235
- (!closing && switchBlock && !/^(?:case|default)\b/.test(textAfter) ? context.unit : 0);
236
- },
237
-
238
- languageData: {
239
- indentOnInput: indentSwitch ? /^\s*(?:case .*?:|default:|\{\}?|\})$/ : /^\s*[{}]$/,
240
- commentTokens: {line: "//", block: {open: "/*", close: "*/"}},
241
- autocomplete: Object.keys(keywords).concat(Object.keys(types)).concat(Object.keys(builtin)).concat(Object.keys(atoms)),
242
- ...parserConfig.languageData
243
- }
244
- };
245
- }
246
- function words(str) {
247
- var obj = {}, words = str.split(" ");
248
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
249
- return obj;
250
- }
251
- function contains(words, word) {
252
- if (typeof words === "function") {
253
- return words(word);
254
- } else {
255
- return words.propertyIsEnumerable(word);
256
- }
257
- }
258
- var cKeywords = "auto if break case register continue return default do sizeof " +
259
- "static else struct switch extern typedef union for goto while enum const " +
260
- "volatile inline restrict asm fortran";
261
-
262
- // Keywords from https://en.cppreference.com/w/cpp/keyword includes C++20.
263
- var cppKeywords = "alignas alignof and and_eq audit axiom bitand bitor catch " +
264
- "class compl concept constexpr const_cast decltype delete dynamic_cast " +
265
- "explicit export final friend import module mutable namespace new noexcept " +
266
- "not not_eq operator or or_eq override private protected public " +
267
- "reinterpret_cast requires static_assert static_cast template this " +
268
- "thread_local throw try typeid typename using virtual xor xor_eq";
269
-
270
- var objCKeywords = "bycopy byref in inout oneway out self super atomic nonatomic retain copy " +
271
- "readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd " +
272
- "@interface @implementation @end @protocol @encode @property @synthesize @dynamic @class " +
273
- "@public @package @private @protected @required @optional @try @catch @finally @import " +
274
- "@selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available";
275
-
276
- var objCBuiltins = "FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION " +
277
- " NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER " +
278
- "NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION " +
279
- "NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT";
280
-
281
- // Do not use this. Use the cTypes function below. This is global just to avoid
282
- // excessive calls when cTypes is being called multiple times during a parse.
283
- var basicCTypes = words("int long char short double float unsigned signed " +
284
- "void bool");
285
-
286
- // Do not use this. Use the objCTypes function below. This is global just to avoid
287
- // excessive calls when objCTypes is being called multiple times during a parse.
288
- var basicObjCTypes = words("SEL instancetype id Class Protocol BOOL");
289
-
290
- // Returns true if identifier is a "C" type.
291
- // C type is defined as those that are reserved by the compiler (basicTypes),
292
- // and those that end in _t (Reserved by POSIX for types)
293
- // http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
294
- function cTypes(identifier) {
295
- return contains(basicCTypes, identifier) || /.+_t$/.test(identifier);
296
- }
297
-
298
- // Returns true if identifier is a "Objective C" type.
299
- function objCTypes(identifier) {
300
- return cTypes(identifier) || contains(basicObjCTypes, identifier);
301
- }
302
-
303
- var cBlockKeywords = "case do else for if switch while struct enum union";
304
- var cDefKeywords = "struct enum union";
305
-
306
- function cppHook(stream, state) {
307
- if (!state.startOfLine) return false
308
- for (var ch, next = null; ch = stream.peek();) {
309
- if (ch == "\\" && stream.match(/^.$/)) {
310
- next = cppHook;
311
- break
312
- } else if (ch == "/" && stream.match(/^\/[\/\*]/, false)) {
313
- break
314
- }
315
- stream.next();
316
- }
317
- state.tokenize = next;
318
- return "meta"
319
- }
320
-
321
- function pointerHook(_stream, state) {
322
- if (state.prevToken == "type") return "type";
323
- return false;
324
- }
325
-
326
- // For C and C++ (and ObjC): identifiers starting with __
327
- // or _ followed by a capital letter are reserved for the compiler.
328
- function cIsReservedIdentifier(token) {
329
- if (!token || token.length < 2) return false;
330
- if (token[0] != '_') return false;
331
- return (token[1] == '_') || (token[1] !== token[1].toLowerCase());
332
- }
333
-
334
- function cpp14Literal(stream) {
335
- stream.eatWhile(/[\w\.']/);
336
- return "number";
337
- }
338
-
339
- function cpp11StringHook(stream, state) {
340
- stream.backUp(1);
341
- // Raw strings.
342
- if (stream.match(/^(?:R|u8R|uR|UR|LR)/)) {
343
- var match = stream.match(/^"([^\s\\()]{0,16})\(/);
344
- if (!match) {
345
- return false;
346
- }
347
- state.cpp11RawStringDelim = match[1];
348
- state.tokenize = tokenRawString;
349
- return tokenRawString(stream, state);
350
- }
351
- // Unicode strings/chars.
352
- if (stream.match(/^(?:u8|u|U|L)/)) {
353
- if (stream.match(/^["']/, /* eat */ false)) {
354
- return "string";
355
- }
356
- return false;
357
- }
358
- // Ignore this hook.
359
- stream.next();
360
- return false;
361
- }
362
-
363
- function cppLooksLikeConstructor(word) {
364
- var lastTwo = /(\w+)::~?(\w+)$/.exec(word);
365
- return lastTwo && lastTwo[1] == lastTwo[2];
366
- }
367
-
368
- // C#-style strings where "" escapes a quote.
369
- function tokenAtString(stream, state) {
370
- var next;
371
- while ((next = stream.next()) != null) {
372
- if (next == '"' && !stream.eat('"')) {
373
- state.tokenize = null;
374
- break;
375
- }
376
- }
377
- return "string";
378
- }
379
-
380
- // C++11 raw string literal is <prefix>"<delim>( anything )<delim>", where
381
- // <delim> can be a string up to 16 characters long.
382
- function tokenRawString(stream, state) {
383
- // Escape characters that have special regex meanings.
384
- var delim = state.cpp11RawStringDelim.replace(/[^\w\s]/g, '\\$&');
385
- var match = stream.match(new RegExp(".*?\\)" + delim + '"'));
386
- if (match)
387
- state.tokenize = null;
388
- else
389
- stream.skipToEnd();
390
- return "string";
391
- }
392
-
393
- const c = clike({
394
- name: "c",
395
- keywords: words(cKeywords),
396
- types: cTypes,
397
- blockKeywords: words(cBlockKeywords),
398
- defKeywords: words(cDefKeywords),
399
- typeFirstDefinitions: true,
400
- atoms: words("NULL true false"),
401
- isReservedIdentifier: cIsReservedIdentifier,
402
- hooks: {
403
- "#": cppHook,
404
- "*": pointerHook,
405
- }
406
- });
407
-
408
- const cpp = clike({
409
- name: "cpp",
410
- keywords: words(cKeywords + " " + cppKeywords),
411
- types: cTypes,
412
- blockKeywords: words(cBlockKeywords + " class try catch"),
413
- defKeywords: words(cDefKeywords + " class namespace"),
414
- typeFirstDefinitions: true,
415
- atoms: words("true false NULL nullptr"),
416
- dontIndentStatements: /^template$/,
417
- isIdentifierChar: /[\w\$_~\xa1-\uffff]/,
418
- isReservedIdentifier: cIsReservedIdentifier,
419
- hooks: {
420
- "#": cppHook,
421
- "*": pointerHook,
422
- "u": cpp11StringHook,
423
- "U": cpp11StringHook,
424
- "L": cpp11StringHook,
425
- "R": cpp11StringHook,
426
- "0": cpp14Literal,
427
- "1": cpp14Literal,
428
- "2": cpp14Literal,
429
- "3": cpp14Literal,
430
- "4": cpp14Literal,
431
- "5": cpp14Literal,
432
- "6": cpp14Literal,
433
- "7": cpp14Literal,
434
- "8": cpp14Literal,
435
- "9": cpp14Literal,
436
- token: function(stream, state, style) {
437
- if (style == "variable" && stream.peek() == "(" &&
438
- (state.prevToken == ";" || state.prevToken == null ||
439
- state.prevToken == "}") &&
440
- cppLooksLikeConstructor(stream.current()))
441
- return "def";
442
- }
443
- },
444
- namespaceSeparator: "::"
445
- });
446
-
447
- const java = clike({
448
- name: "java",
449
- keywords: words("abstract assert break case catch class const continue default " +
450
- "do else enum extends final finally for goto if implements import " +
451
- "instanceof interface native new package private protected public " +
452
- "return static strictfp super switch synchronized this throw throws transient " +
453
- "try volatile while @interface"),
454
- types: words("var byte short int long float double boolean char void Boolean Byte Character Double Float " +
455
- "Integer Long Number Object Short String StringBuffer StringBuilder Void"),
456
- blockKeywords: words("catch class do else finally for if switch try while"),
457
- defKeywords: words("class interface enum @interface"),
458
- typeFirstDefinitions: true,
459
- atoms: words("true false null"),
460
- number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
461
- hooks: {
462
- "@": function(stream) {
463
- // Don't match the @interface keyword.
464
- if (stream.match('interface', false)) return false;
465
-
466
- stream.eatWhile(/[\w\$_]/);
467
- return "meta";
468
- },
469
- '"': function(stream, state) {
470
- if (!stream.match(/""$/)) return false;
471
- state.tokenize = tokenTripleString;
472
- return state.tokenize(stream, state);
473
- }
474
- }
475
- });
476
-
477
- const csharp = clike({
478
- name: "csharp",
479
- keywords: words("abstract as async await base break case catch checked class const continue" +
480
- " default delegate do else enum event explicit extern finally fixed for" +
481
- " foreach goto if implicit in init interface internal is lock namespace new" +
482
- " operator out override params private protected public readonly record ref required return sealed" +
483
- " sizeof stackalloc static struct switch this throw try typeof unchecked" +
484
- " unsafe using virtual void volatile while add alias ascending descending dynamic from get" +
485
- " global group into join let orderby partial remove select set value var yield"),
486
- types: words("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func" +
487
- " Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32" +
488
- " UInt64 bool byte char decimal double short int long object" +
489
- " sbyte float string ushort uint ulong"),
490
- blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
491
- defKeywords: words("class interface namespace record struct var"),
492
- typeFirstDefinitions: true,
493
- atoms: words("true false null"),
494
- hooks: {
495
- "@": function(stream, state) {
496
- if (stream.eat('"')) {
497
- state.tokenize = tokenAtString;
498
- return tokenAtString(stream, state);
499
- }
500
- stream.eatWhile(/[\w\$_]/);
501
- return "meta";
502
- }
503
- }
504
- });
505
-
506
- function tokenTripleString(stream, state) {
507
- var escaped = false;
508
- while (!stream.eol()) {
509
- if (!escaped && stream.match('"""')) {
510
- state.tokenize = null;
511
- break;
512
- }
513
- escaped = stream.next() == "\\" && !escaped;
514
- }
515
- return "string";
516
- }
517
-
518
- function tokenNestedComment(depth) {
519
- return function (stream, state) {
520
- var ch;
521
- while (ch = stream.next()) {
522
- if (ch == "*" && stream.eat("/")) {
523
- if (depth == 1) {
524
- state.tokenize = null;
525
- break
526
- } else {
527
- state.tokenize = tokenNestedComment(depth - 1);
528
- return state.tokenize(stream, state)
529
- }
530
- } else if (ch == "/" && stream.eat("*")) {
531
- state.tokenize = tokenNestedComment(depth + 1);
532
- return state.tokenize(stream, state)
533
- }
534
- }
535
- return "comment"
536
- }
537
- }
538
-
539
- const scala = clike({
540
- name: "scala",
541
- keywords: words(
542
- /* scala */
543
- "abstract case catch class def do else extends final finally for forSome if " +
544
- "implicit import lazy match new null object override package private protected return " +
545
- "sealed super this throw trait try type val var while with yield _ " +
546
-
547
- /* package scala */
548
- "assert assume require print println printf readLine readBoolean readByte readShort " +
549
- "readChar readInt readLong readFloat readDouble"
550
- ),
551
- types: words(
552
- "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +
553
- "Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable " +
554
- "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +
555
- "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +
556
- "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector " +
557
-
558
- /* package java.lang */
559
- "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
560
- "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
561
- "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
562
- "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
563
- ),
564
- multiLineStrings: true,
565
- blockKeywords: words("catch class enum do else finally for forSome if match switch try while"),
566
- defKeywords: words("class enum def object package trait type val var"),
567
- atoms: words("true false null"),
568
- indentStatements: false,
569
- indentSwitch: false,
570
- isOperatorChar: /[+\-*&%=<>!?|\/#:@]/,
571
- hooks: {
572
- "@": function(stream) {
573
- stream.eatWhile(/[\w\$_]/);
574
- return "meta";
575
- },
576
- '"': function(stream, state) {
577
- if (!stream.match('""')) return false;
578
- state.tokenize = tokenTripleString;
579
- return state.tokenize(stream, state);
580
- },
581
- "'": function(stream) {
582
- if (stream.match(/^(\\[^'\s]+|[^\\'])'/)) return "character"
583
- stream.eatWhile(/[\w\$_\xa1-\uffff]/);
584
- return "atom";
585
- },
586
- "=": function(stream, state) {
587
- var cx = state.context;
588
- if (cx.type == "}" && cx.align && stream.eat(">")) {
589
- state.context = new Context(cx.indented, cx.column, cx.type, cx.info, null, cx.prev);
590
- return "operator"
591
- } else {
592
- return false
593
- }
594
- },
595
-
596
- "/": function(stream, state) {
597
- if (!stream.eat("*")) return false
598
- state.tokenize = tokenNestedComment(1);
599
- return state.tokenize(stream, state)
600
- }
601
- },
602
- languageData: {
603
- closeBrackets: {brackets: ["(", "[", "{", "'", '"', '"""']}
604
- }
605
- });
606
-
607
- function tokenKotlinString(tripleString){
608
- return function (stream, state) {
609
- var escaped = false, next, end = false;
610
- while (!stream.eol()) {
611
- if (!tripleString && !escaped && stream.match('"') ) {end = true; break;}
612
- if (tripleString && stream.match('"""')) {end = true; break;}
613
- next = stream.next();
614
- if(!escaped && next == "$" && stream.match('{'))
615
- stream.skipTo("}");
616
- escaped = !escaped && next == "\\" && !tripleString;
617
- }
618
- if (end || !tripleString)
619
- state.tokenize = null;
620
- return "string";
621
- }
622
- }
623
-
624
- const kotlin = clike({
625
- name: "kotlin",
626
- keywords: words(
627
- /*keywords*/
628
- "package as typealias class interface this super val operator " +
629
- "var fun for is in This throw return annotation " +
630
- "break continue object if else while do try when !in !is as? " +
631
-
632
- /*soft keywords*/
633
- "file import where by get set abstract enum open inner override private public internal " +
634
- "protected catch finally out final vararg reified dynamic companion constructor init " +
635
- "sealed field property receiver param sparam lateinit data inline noinline tailrec " +
636
- "external annotation crossinline const operator infix suspend actual expect setparam"
637
- ),
638
- types: words(
639
- /* package java.lang */
640
- "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
641
- "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
642
- "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
643
- "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray " +
644
- "ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy " +
645
- "LazyThreadSafetyMode LongArray Nothing ShortArray Unit"
646
- ),
647
- intendSwitch: false,
648
- indentStatements: false,
649
- multiLineStrings: true,
650
- number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
651
- blockKeywords: words("catch class do else finally for if where try while enum"),
652
- defKeywords: words("class val var object interface fun"),
653
- atoms: words("true false null this"),
654
- hooks: {
655
- "@": function(stream) {
656
- stream.eatWhile(/[\w\$_]/);
657
- return "meta";
658
- },
659
- '*': function(_stream, state) {
660
- return state.prevToken == '.' ? 'variable' : 'operator';
661
- },
662
- '"': function(stream, state) {
663
- state.tokenize = tokenKotlinString(stream.match('""'));
664
- return state.tokenize(stream, state);
665
- },
666
- "/": function(stream, state) {
667
- if (!stream.eat("*")) return false;
668
- state.tokenize = tokenNestedComment(1);
669
- return state.tokenize(stream, state)
670
- },
671
- indent: function(state, ctx, textAfter, indentUnit) {
672
- var firstChar = textAfter && textAfter.charAt(0);
673
- if ((state.prevToken == "}" || state.prevToken == ")") && textAfter == "")
674
- return state.indented;
675
- if ((state.prevToken == "operator" && textAfter != "}" && state.context.type != "}") ||
676
- state.prevToken == "variable" && firstChar == "." ||
677
- (state.prevToken == "}" || state.prevToken == ")") && firstChar == ".")
678
- return indentUnit * 2 + ctx.indented;
679
- if (ctx.align && ctx.type == "}")
680
- return ctx.indented + (state.context.type == (textAfter || "").charAt(0) ? 0 : indentUnit);
681
- }
682
- },
683
- languageData: {
684
- closeBrackets: {brackets: ["(", "[", "{", "'", '"', '"""']}
685
- }
686
- });
687
-
688
- const shader = clike({
689
- name: "shader",
690
- keywords: words("sampler1D sampler2D sampler3D samplerCube " +
691
- "sampler1DShadow sampler2DShadow " +
692
- "const attribute uniform varying " +
693
- "break continue discard return " +
694
- "for while do if else struct " +
695
- "in out inout"),
696
- types: words("float int bool void " +
697
- "vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " +
698
- "mat2 mat3 mat4"),
699
- blockKeywords: words("for while do if else struct"),
700
- builtin: words("radians degrees sin cos tan asin acos atan " +
701
- "pow exp log exp2 sqrt inversesqrt " +
702
- "abs sign floor ceil fract mod min max clamp mix step smoothstep " +
703
- "length distance dot cross normalize ftransform faceforward " +
704
- "reflect refract matrixCompMult " +
705
- "lessThan lessThanEqual greaterThan greaterThanEqual " +
706
- "equal notEqual any all not " +
707
- "texture1D texture1DProj texture1DLod texture1DProjLod " +
708
- "texture2D texture2DProj texture2DLod texture2DProjLod " +
709
- "texture3D texture3DProj texture3DLod texture3DProjLod " +
710
- "textureCube textureCubeLod " +
711
- "shadow1D shadow2D shadow1DProj shadow2DProj " +
712
- "shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " +
713
- "dFdx dFdy fwidth " +
714
- "noise1 noise2 noise3 noise4"),
715
- atoms: words("true false " +
716
- "gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " +
717
- "gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " +
718
- "gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " +
719
- "gl_FogCoord gl_PointCoord " +
720
- "gl_Position gl_PointSize gl_ClipVertex " +
721
- "gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " +
722
- "gl_TexCoord gl_FogFragCoord " +
723
- "gl_FragCoord gl_FrontFacing " +
724
- "gl_FragData gl_FragDepth " +
725
- "gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " +
726
- "gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " +
727
- "gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " +
728
- "gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose " +
729
- "gl_ProjectionMatrixInverseTranspose " +
730
- "gl_ModelViewProjectionMatrixInverseTranspose " +
731
- "gl_TextureMatrixInverseTranspose " +
732
- "gl_NormalScale gl_DepthRange gl_ClipPlane " +
733
- "gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " +
734
- "gl_FrontLightModelProduct gl_BackLightModelProduct " +
735
- "gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " +
736
- "gl_FogParameters " +
737
- "gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " +
738
- "gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " +
739
- "gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " +
740
- "gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " +
741
- "gl_MaxDrawBuffers"),
742
- indentSwitch: false,
743
- hooks: {"#": cppHook}
744
- });
745
-
746
- const nesC = clike({
747
- name: "nesc",
748
- keywords: words(cKeywords + " as atomic async call command component components configuration event generic " +
749
- "implementation includes interface module new norace nx_struct nx_union post provides " +
750
- "signal task uses abstract extends"),
751
- types: cTypes,
752
- blockKeywords: words(cBlockKeywords),
753
- atoms: words("null true false"),
754
- hooks: {"#": cppHook}
755
- });
756
-
757
- const objectiveC = clike({
758
- name: "objectivec",
759
- keywords: words(cKeywords + " " + objCKeywords),
760
- types: objCTypes,
761
- builtin: words(objCBuiltins),
762
- blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized"),
763
- defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class"),
764
- dontIndentStatements: /^@.*$/,
765
- typeFirstDefinitions: true,
766
- atoms: words("YES NO NULL Nil nil true false nullptr"),
767
- isReservedIdentifier: cIsReservedIdentifier,
768
- hooks: {
769
- "#": cppHook,
770
- "*": pointerHook,
771
- }
772
- });
773
-
774
- const objectiveCpp = clike({
775
- name: "objectivecpp",
776
- keywords: words(cKeywords + " " + objCKeywords + " " + cppKeywords),
777
- types: objCTypes,
778
- builtin: words(objCBuiltins),
779
- blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),
780
- defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class class namespace"),
781
- dontIndentStatements: /^@.*$|^template$/,
782
- typeFirstDefinitions: true,
783
- atoms: words("YES NO NULL Nil nil true false nullptr"),
784
- isReservedIdentifier: cIsReservedIdentifier,
785
- hooks: {
786
- "#": cppHook,
787
- "*": pointerHook,
788
- "u": cpp11StringHook,
789
- "U": cpp11StringHook,
790
- "L": cpp11StringHook,
791
- "R": cpp11StringHook,
792
- "0": cpp14Literal,
793
- "1": cpp14Literal,
794
- "2": cpp14Literal,
795
- "3": cpp14Literal,
796
- "4": cpp14Literal,
797
- "5": cpp14Literal,
798
- "6": cpp14Literal,
799
- "7": cpp14Literal,
800
- "8": cpp14Literal,
801
- "9": cpp14Literal,
802
- token: function(stream, state, style) {
803
- if (style == "variable" && stream.peek() == "(" &&
804
- (state.prevToken == ";" || state.prevToken == null ||
805
- state.prevToken == "}") &&
806
- cppLooksLikeConstructor(stream.current()))
807
- return "def";
808
- }
809
- },
810
- namespaceSeparator: "::"
811
- });
812
-
813
- const squirrel = clike({
814
- name: "squirrel",
815
- keywords: words("base break clone continue const default delete enum extends function in class" +
816
- " foreach local resume return this throw typeof yield constructor instanceof static"),
817
- types: cTypes,
818
- blockKeywords: words("case catch class else for foreach if switch try while"),
819
- defKeywords: words("function local class"),
820
- typeFirstDefinitions: true,
821
- atoms: words("true false null"),
822
- hooks: {"#": cppHook}
823
- });
824
-
825
- // Ceylon Strings need to deal with interpolation
826
- var stringTokenizer = null;
827
- function tokenCeylonString(type) {
828
- return function(stream, state) {
829
- var escaped = false, next, end = false;
830
- while (!stream.eol()) {
831
- if (!escaped && stream.match('"') &&
832
- (type == "single" || stream.match('""'))) {
833
- end = true;
834
- break;
835
- }
836
- if (!escaped && stream.match('``')) {
837
- stringTokenizer = tokenCeylonString(type);
838
- end = true;
839
- break;
840
- }
841
- next = stream.next();
842
- escaped = type == "single" && !escaped && next == "\\";
843
- }
844
- if (end)
845
- state.tokenize = null;
846
- return "string";
847
- }
848
- }
849
-
850
- const ceylon = clike({
851
- name: "ceylon",
852
- keywords: words("abstracts alias assembly assert assign break case catch class continue dynamic else" +
853
- " exists extends finally for function given if import in interface is let module new" +
854
- " nonempty object of out outer package return satisfies super switch then this throw" +
855
- " try value void while"),
856
- types: function(word) {
857
- // In Ceylon all identifiers that start with an uppercase are types
858
- var first = word.charAt(0);
859
- return (first === first.toUpperCase() && first !== first.toLowerCase());
860
- },
861
- blockKeywords: words("case catch class dynamic else finally for function if interface module new object switch try while"),
862
- defKeywords: words("class dynamic function interface module object package value"),
863
- builtin: words("abstract actual aliased annotation by default deprecated doc final formal late license" +
864
- " native optional sealed see serializable shared suppressWarnings tagged throws variable"),
865
- isPunctuationChar: /[\[\]{}\(\),;\:\.`]/,
866
- isOperatorChar: /[+\-*&%=<>!?|^~:\/]/,
867
- numberStart: /[\d#$]/,
868
- number: /^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,
869
- multiLineStrings: true,
870
- typeFirstDefinitions: true,
871
- atoms: words("true false null larger smaller equal empty finished"),
872
- indentSwitch: false,
873
- styleDefs: false,
874
- hooks: {
875
- "@": function(stream) {
876
- stream.eatWhile(/[\w\$_]/);
877
- return "meta";
878
- },
879
- '"': function(stream, state) {
880
- state.tokenize = tokenCeylonString(stream.match('""') ? "triple" : "single");
881
- return state.tokenize(stream, state);
882
- },
883
- '`': function(stream, state) {
884
- if (!stringTokenizer || !stream.match('`')) return false;
885
- state.tokenize = stringTokenizer;
886
- stringTokenizer = null;
887
- return state.tokenize(stream, state);
888
- },
889
- "'": function(stream) {
890
- if (stream.match(/^(\\[^'\s]+|[^\\'])'/)) return "string.special"
891
- stream.eatWhile(/[\w\$_\xa1-\uffff]/);
892
- return "atom";
893
- },
894
- token: function(_stream, state, style) {
895
- if ((style == "variable" || style == "type") &&
896
- state.prevToken == ".") {
897
- return "variableName.special";
898
- }
899
- }
900
- },
901
- languageData: {
902
- closeBrackets: {brackets: ["(", "[", "{", "'", '"', '"""']}
903
- }
904
- });
905
-
906
- function pushInterpolationStack(state) {
907
- (state.interpolationStack || (state.interpolationStack = [])).push(state.tokenize);
908
- }
909
-
910
- function popInterpolationStack(state) {
911
- return (state.interpolationStack || (state.interpolationStack = [])).pop();
912
- }
913
-
914
- function sizeInterpolationStack(state) {
915
- return state.interpolationStack ? state.interpolationStack.length : 0;
916
- }
917
-
918
- function tokenDartString(quote, stream, state, raw) {
919
- var tripleQuoted = false;
920
- if (stream.eat(quote)) {
921
- if (stream.eat(quote)) tripleQuoted = true;
922
- else return "string"; //empty string
923
- }
924
- function tokenStringHelper(stream, state) {
925
- var escaped = false;
926
- while (!stream.eol()) {
927
- if (!raw && !escaped && stream.peek() == "$") {
928
- pushInterpolationStack(state);
929
- state.tokenize = tokenInterpolation;
930
- return "string";
931
- }
932
- var next = stream.next();
933
- if (next == quote && !escaped && (!tripleQuoted || stream.match(quote + quote))) {
934
- state.tokenize = null;
935
- break;
936
- }
937
- escaped = !raw && !escaped && next == "\\";
938
- }
939
- return "string";
940
- }
941
- state.tokenize = tokenStringHelper;
942
- return tokenStringHelper(stream, state);
943
- }
944
-
945
- function tokenInterpolation(stream, state) {
946
- stream.eat("$");
947
- if (stream.eat("{")) {
948
- // let clike handle the content of ${...},
949
- // we take over again when "}" appears (see hooks).
950
- state.tokenize = null;
951
- } else {
952
- state.tokenize = tokenInterpolationIdentifier;
953
- }
954
- return null;
955
- }
956
-
957
- function tokenInterpolationIdentifier(stream, state) {
958
- stream.eatWhile(/[\w_]/);
959
- state.tokenize = popInterpolationStack(state);
960
- return "variable";
961
- }
962
-
963
- const dart = clike({
964
- name: "dart",
965
- keywords: words("this super static final const abstract class extends external factory " +
966
- "implements mixin get native set typedef with enum throw rethrow assert break case " +
967
- "continue default in return new deferred async await covariant try catch finally " +
968
- "do else for if switch while import library export part of show hide is as extension " +
969
- "on yield late required sealed base interface when inline"),
970
- blockKeywords: words("try catch finally do else for if switch while"),
971
- builtin: words("void bool num int double dynamic var String Null Never"),
972
- atoms: words("true false null"),
973
- hooks: {
974
- "@": function(stream) {
975
- stream.eatWhile(/[\w\$_\.]/);
976
- return "meta";
977
- },
978
-
979
- // custom string handling to deal with triple-quoted strings and string interpolation
980
- "'": function(stream, state) {
981
- return tokenDartString("'", stream, state, false);
982
- },
983
- "\"": function(stream, state) {
984
- return tokenDartString("\"", stream, state, false);
985
- },
986
- "r": function(stream, state) {
987
- var peek = stream.peek();
988
- if (peek == "'" || peek == "\"") {
989
- return tokenDartString(stream.next(), stream, state, true);
990
- }
991
- return false;
992
- },
993
-
994
- "}": function(_stream, state) {
995
- // "}" is end of interpolation, if interpolation stack is non-empty
996
- if (sizeInterpolationStack(state) > 0) {
997
- state.tokenize = popInterpolationStack(state);
998
- return null;
999
- }
1000
- return false;
1001
- },
1002
-
1003
- "/": function(stream, state) {
1004
- if (!stream.eat("*")) return false
1005
- state.tokenize = tokenNestedComment(1);
1006
- return state.tokenize(stream, state)
1007
- },
1008
- token: function(stream, _, style) {
1009
- if (style == "variable") {
1010
- // Assume uppercase symbols are classes
1011
- var isUpper = RegExp('^[_$]*[A-Z][a-zA-Z0-9_$]*$','g');
1012
- if (isUpper.test(stream.current())) {
1013
- return 'type';
1014
- }
1015
- }
1016
- }
1017
- }
1018
- });
1019
-
1020
- exports.c = c;
1021
- exports.ceylon = ceylon;
1022
- exports.clike = clike;
1023
- exports.cpp = cpp;
1024
- exports.csharp = csharp;
1025
- exports.dart = dart;
1026
- exports.java = java;
1027
- exports.kotlin = kotlin;
1028
- exports.nesC = nesC;
1029
- exports.objectiveC = objectiveC;
1030
- exports.objectiveCpp = objectiveCpp;
1031
- exports.scala = scala;
1032
- exports.shader = shader;
1033
- exports.squirrel = squirrel;
1034
- //# sourceMappingURL=clike-ueXlMQy5.js.map