@milkdown/crepe 7.3.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 (241) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/lib/apl-p0IPP13W.js +76 -0
  4. package/lib/asciiarmor-lJsBxlJJ.js +34 -0
  5. package/lib/asn1-Q9v1zIy5.js +102 -0
  6. package/lib/asterisk-foNkeTjy.js +273 -0
  7. package/lib/brainfuck-0XqyXpNS.js +35 -0
  8. package/lib/clike-ak6Z6Yhe.js +639 -0
  9. package/lib/clojure-iYO8U8Sg.js +810 -0
  10. package/lib/clsx-7d8NmkQq.js +21 -0
  11. package/lib/cmake-SVzjkxV_.js +28 -0
  12. package/lib/cobol-APHEnAOX.js +74 -0
  13. package/lib/coffeescript-KqQa0SYG.js +182 -0
  14. package/lib/commonlisp-bwqNqR5V.js +79 -0
  15. package/lib/core/crepe.d.ts +21 -0
  16. package/lib/core/crepe.d.ts.map +1 -0
  17. package/lib/core/index.d.ts +3 -0
  18. package/lib/core/index.d.ts.map +1 -0
  19. package/lib/core/slice.d.ts +12 -0
  20. package/lib/core/slice.d.ts.map +1 -0
  21. package/lib/crystal-BViWuDpA.js +217 -0
  22. package/lib/css-KHXHXfXg.js +1572 -0
  23. package/lib/cypher-XpTt4zQ3.js +69 -0
  24. package/lib/d-fLig6yqY.js +139 -0
  25. package/lib/diff-WoKGLpy6.js +18 -0
  26. package/lib/dockerfile-u6f6Vw2s.js +194 -0
  27. package/lib/dtd-SIJRUW6K.js +91 -0
  28. package/lib/dylan-4HCLhpWP.js +238 -0
  29. package/lib/ebnf-h_0lged5.js +77 -0
  30. package/lib/ecl-Lf4FF0lf.js +133 -0
  31. package/lib/eiffel-qlw8KUyf.js +112 -0
  32. package/lib/elm-QRnB3zXs.js +108 -0
  33. package/lib/erlang-fyVKb7eK.js +488 -0
  34. package/lib/factor-BEeN4upY.js +65 -0
  35. package/lib/fcl-lRek3hEb.js +106 -0
  36. package/lib/feature/block-edit/handle/component.d.ts +9 -0
  37. package/lib/feature/block-edit/handle/component.d.ts.map +1 -0
  38. package/lib/feature/block-edit/handle/index.d.ts +12 -0
  39. package/lib/feature/block-edit/handle/index.d.ts.map +1 -0
  40. package/lib/feature/block-edit/index.d.ts +3 -0
  41. package/lib/feature/block-edit/index.d.ts.map +1 -0
  42. package/lib/feature/block-edit/menu/component.d.ts +14 -0
  43. package/lib/feature/block-edit/menu/component.d.ts.map +1 -0
  44. package/lib/feature/block-edit/menu/config.d.ts +21 -0
  45. package/lib/feature/block-edit/menu/config.d.ts.map +1 -0
  46. package/lib/feature/block-edit/menu/icons.d.ts +14 -0
  47. package/lib/feature/block-edit/menu/icons.d.ts.map +1 -0
  48. package/lib/feature/block-edit/menu/index.d.ts +9 -0
  49. package/lib/feature/block-edit/menu/index.d.ts.map +1 -0
  50. package/lib/feature/code-mirror/index.d.ts +3 -0
  51. package/lib/feature/code-mirror/index.d.ts.map +1 -0
  52. package/lib/feature/gap-cursor/index.d.ts +3 -0
  53. package/lib/feature/gap-cursor/index.d.ts.map +1 -0
  54. package/lib/feature/image-block/index.d.ts +3 -0
  55. package/lib/feature/image-block/index.d.ts.map +1 -0
  56. package/lib/feature/index.d.ts +18 -0
  57. package/lib/feature/index.d.ts.map +1 -0
  58. package/lib/feature/link-tooltip/consts.d.ts +5 -0
  59. package/lib/feature/link-tooltip/consts.d.ts.map +1 -0
  60. package/lib/feature/link-tooltip/index.d.ts +3 -0
  61. package/lib/feature/link-tooltip/index.d.ts.map +1 -0
  62. package/lib/feature/list-item/consts.d.ts +2 -0
  63. package/lib/feature/list-item/consts.d.ts.map +1 -0
  64. package/lib/feature/list-item/index.d.ts +3 -0
  65. package/lib/feature/list-item/index.d.ts.map +1 -0
  66. package/lib/feature/placeholder/index.d.ts +10 -0
  67. package/lib/feature/placeholder/index.d.ts.map +1 -0
  68. package/lib/feature/shared.d.ts +3 -0
  69. package/lib/feature/shared.d.ts.map +1 -0
  70. package/lib/feature/toolbar/component.d.ts +13 -0
  71. package/lib/feature/toolbar/component.d.ts.map +1 -0
  72. package/lib/feature/toolbar/consts.d.ts +5 -0
  73. package/lib/feature/toolbar/consts.d.ts.map +1 -0
  74. package/lib/feature/toolbar/index.d.ts +3 -0
  75. package/lib/feature/toolbar/index.d.ts.map +1 -0
  76. package/lib/forth-ua2bRd8T.js +60 -0
  77. package/lib/fortran-WnF7znuN.js +443 -0
  78. package/lib/gas-wowve1o7.js +183 -0
  79. package/lib/gherkin-m7GIChu3.js +34 -0
  80. package/lib/go-th443Dhb.js +158 -0
  81. package/lib/groovy-tR4RiZnc.js +161 -0
  82. package/lib/haskell-jxVBofv5.js +375 -0
  83. package/lib/haxe-kWPI2tq3.js +390 -0
  84. package/lib/hooks-82sqkbtE.js +21 -0
  85. package/lib/http-3GIFWUlG.js +45 -0
  86. package/lib/icons-HYkfuR-O.js +50 -0
  87. package/lib/idl-PvpMZg-l.js +947 -0
  88. package/lib/index-0RbcZMbq.js +8 -0
  89. package/lib/index-4afXjFMY.js +517 -0
  90. package/lib/index-7MeyepDG.js +78 -0
  91. package/lib/index-7QgQq3x3.js +551 -0
  92. package/lib/index-7pgP6qYs.js +107 -0
  93. package/lib/index-8DvtgRVa.js +19511 -0
  94. package/lib/index-8Gg-jEP4.js +288 -0
  95. package/lib/index-8S8qcncB.js +507 -0
  96. package/lib/index-9A_GmGh4.js +1039 -0
  97. package/lib/index-EJJfYLzA.js +928 -0
  98. package/lib/index-Eg39w5kL.js +984 -0
  99. package/lib/index-FIk_7oPb.js +168 -0
  100. package/lib/index-LlbrXb_n.js +368 -0
  101. package/lib/index-MovKtgMG.js +121 -0
  102. package/lib/index-N9GtIS4X.js +64 -0
  103. package/lib/index-Pwn25-kf.js +8 -0
  104. package/lib/index-SdFSDosa.js +1295 -0
  105. package/lib/index-W5Th22-Z.js +1744 -0
  106. package/lib/index-XiXSFLmI.js +20975 -0
  107. package/lib/index-bknOViGv.js +47 -0
  108. package/lib/index-bkuIUPFS.js +275 -0
  109. package/lib/index-jPA8J9Eo.js +8 -0
  110. package/lib/index-lsG76a9s.js +552 -0
  111. package/lib/index-oTRzPo3B.js +146 -0
  112. package/lib/index-rrf6_6DC.js +317 -0
  113. package/lib/index-vJbZIHYF.js +81 -0
  114. package/lib/index-vPRh55CO.js +137 -0
  115. package/lib/index-vxy63hib.js +323 -0
  116. package/lib/index-wn1_LgCS.js +99 -0
  117. package/lib/index-xHADmDT3.js +12 -0
  118. package/lib/index-yt2EpMtv.js +141 -0
  119. package/lib/index.d.ts +4 -0
  120. package/lib/index.d.ts.map +1 -0
  121. package/lib/index.es.js +7 -0
  122. package/lib/javascript-8ZHqHagw.js +758 -0
  123. package/lib/jinja2-vsOFe0qD.js +154 -0
  124. package/lib/julia-dlp_pbN1.js +241 -0
  125. package/lib/livescript-Gf5R-LT6.js +273 -0
  126. package/lib/lua-c5Y_JsBp.js +221 -0
  127. package/lib/mathematica-iiGTGmUs.js +35 -0
  128. package/lib/mbox-ZJh86H8B.js +78 -0
  129. package/lib/meta-tAGyVRPE.js +511 -0
  130. package/lib/mirc-i0qkCa0y.js +73 -0
  131. package/lib/mllike-Dy551fZW.js +275 -0
  132. package/lib/modelica-n6tGqUT9.js +94 -0
  133. package/lib/mscgen-aKSbB7D9.js +104 -0
  134. package/lib/mumps-lNiKA6sp.js +25 -0
  135. package/lib/nginx--YmuCfDj.js +93 -0
  136. package/lib/nsis-zhS8iA09.js +62 -0
  137. package/lib/ntriples-E3jQl3MC.js +79 -0
  138. package/lib/octave-EQvkGIeG.js +144 -0
  139. package/lib/oz-W2cpqFf6.js +152 -0
  140. package/lib/pascal-lCh6ouNZ.js +79 -0
  141. package/lib/perl-PxEQBX0B.js +915 -0
  142. package/lib/pig-Y_bNcrzS.js +56 -0
  143. package/lib/powershell-GaQP-TZr.js +249 -0
  144. package/lib/properties-mbRyn54L.js +26 -0
  145. package/lib/prosemirror-noTDkx-k.js +4 -0
  146. package/lib/protobuf-8CJideyJ.js +49 -0
  147. package/lib/puppet-ABBaChNZ.js +45 -0
  148. package/lib/python-sKdHg3Ka.js +321 -0
  149. package/lib/q-_1yG40Nm.js +89 -0
  150. package/lib/r-Ziz56bHT.js +108 -0
  151. package/lib/rpm-ORjGOHaQ.js +57 -0
  152. package/lib/ruby-jlbYq0dT.js +233 -0
  153. package/lib/sas-2n7xeUuO.js +107 -0
  154. package/lib/schema-tKk3m1fu.js +62 -0
  155. package/lib/scheme-XCs-NPeU.js +126 -0
  156. package/lib/shell-0_1Um7Dq.js +184 -0
  157. package/lib/sieve-7uyJD1x1.js +73 -0
  158. package/lib/simple-mode--HIzBxba.js +95 -0
  159. package/lib/smalltalk-PEFzrlQ-.js +48 -0
  160. package/lib/solr-BLBaHahN.js +41 -0
  161. package/lib/sparql-4F9ZWf1b.js +204 -0
  162. package/lib/spreadsheet-SGSo6blj.js +49 -0
  163. package/lib/sql-tebLBzN0.js +291 -0
  164. package/lib/stex-SFJcFGOO.js +130 -0
  165. package/lib/stylus-rwwWYWFm.js +256 -0
  166. package/lib/swift-eorJ0tCv.js +238 -0
  167. package/lib/tcl-IwXMB8U4.js +82 -0
  168. package/lib/textile-ok2VyjwC.js +299 -0
  169. package/lib/theme/classic/index.d.ts +3 -0
  170. package/lib/theme/classic/index.d.ts.map +1 -0
  171. package/lib/theme/classic-dark/index.d.ts +3 -0
  172. package/lib/theme/classic-dark/index.d.ts.map +1 -0
  173. package/lib/theme/headless/index.d.ts +3 -0
  174. package/lib/theme/headless/index.d.ts.map +1 -0
  175. package/lib/theme/index.d.ts +8 -0
  176. package/lib/theme/index.d.ts.map +1 -0
  177. package/lib/theme/shared.d.ts +3 -0
  178. package/lib/theme/shared.d.ts.map +1 -0
  179. package/lib/tiddlywiki-DLhz8_pc.js +156 -0
  180. package/lib/tiki-DFAqFElY.js +183 -0
  181. package/lib/tippy.esm-MZ2vxByW.js +1813 -0
  182. package/lib/toml-ryxpTZEV.js +49 -0
  183. package/lib/tooltip-plugin-gcwyQdiT.js +119 -0
  184. package/lib/troff-ZzZyvNct.js +36 -0
  185. package/lib/ttcn-6gvkqqpW.js +136 -0
  186. package/lib/ttcn-cfg-oSu-Dq5C.js +98 -0
  187. package/lib/turtle-10ofr5au.js +87 -0
  188. package/lib/use-css-light-dom-EKWZDmbJ.js +82 -0
  189. package/lib/utils/index.d.ts +4 -0
  190. package/lib/utils/index.d.ts.map +1 -0
  191. package/lib/vb-a6n6fzrD.js +74 -0
  192. package/lib/vbscript-dgvo8jPt.js +324 -0
  193. package/lib/velocity-CBncCrwO.js +97 -0
  194. package/lib/verilog-KlcACt6C.js +271 -0
  195. package/lib/vhdl-NMd7Gf35.js +117 -0
  196. package/lib/webidl-z1UE5DN_.js +160 -0
  197. package/lib/xquery-hDt5jWTp.js +431 -0
  198. package/lib/yacas-ftgh_qwr.js +74 -0
  199. package/lib/yaml-DnNTfjXK.js +53 -0
  200. package/lib/z80-dA1PqWe1.js +62 -0
  201. package/package.json +87 -0
  202. package/src/core/crepe.ts +98 -0
  203. package/src/core/index.ts +4 -0
  204. package/src/core/slice.ts +44 -0
  205. package/src/feature/block-edit/handle/component.ts +68 -0
  206. package/src/feature/block-edit/handle/index.ts +81 -0
  207. package/src/feature/block-edit/index.ts +17 -0
  208. package/src/feature/block-edit/menu/component.ts +210 -0
  209. package/src/feature/block-edit/menu/config.ts +335 -0
  210. package/src/feature/block-edit/menu/icons.ts +171 -0
  211. package/src/feature/block-edit/menu/index.ts +113 -0
  212. package/src/feature/block-edit/style.css +126 -0
  213. package/src/feature/code-mirror/index.ts +60 -0
  214. package/src/feature/code-mirror/style.css +159 -0
  215. package/src/feature/gap-cursor/index.ts +31 -0
  216. package/src/feature/image-block/index.ts +59 -0
  217. package/src/feature/image-block/style.css +215 -0
  218. package/src/feature/index.ts +66 -0
  219. package/src/feature/link-tooltip/consts.ts +47 -0
  220. package/src/feature/link-tooltip/index.ts +22 -0
  221. package/src/feature/link-tooltip/style.css +107 -0
  222. package/src/feature/list-item/consts.ts +15 -0
  223. package/src/feature/list-item/index.ts +30 -0
  224. package/src/feature/list-item/style.css +23 -0
  225. package/src/feature/placeholder/index.ts +87 -0
  226. package/src/feature/placeholder/style.css +9 -0
  227. package/src/feature/shared.ts +4 -0
  228. package/src/feature/toolbar/component.ts +101 -0
  229. package/src/feature/toolbar/consts.ts +26 -0
  230. package/src/feature/toolbar/index.ts +92 -0
  231. package/src/feature/toolbar/style.css +37 -0
  232. package/src/index.ts +5 -0
  233. package/src/theme/classic/index.ts +12 -0
  234. package/src/theme/classic/style.css +192 -0
  235. package/src/theme/classic-dark/index.ts +12 -0
  236. package/src/theme/classic-dark/style.css +197 -0
  237. package/src/theme/headless/index.ts +9 -0
  238. package/src/theme/index.ts +26 -0
  239. package/src/theme/shared.ts +4 -0
  240. package/src/utils/index.ts +12 -0
  241. package/src/vite-env.d.ts +2 -0
@@ -0,0 +1,238 @@
1
+ function p(e, i) {
2
+ for (var n = 0; n < e.length; n++)
3
+ i(e[n], n);
4
+ }
5
+ function x(e, i) {
6
+ for (var n = 0; n < e.length; n++)
7
+ if (i(e[n], n))
8
+ return !0;
9
+ return !1;
10
+ }
11
+ var t = {
12
+ // Words that introduce unnamed definitions like "define interface"
13
+ unnamedDefinition: ["interface"],
14
+ // Words that introduce simple named definitions like "define library"
15
+ namedDefinition: [
16
+ "module",
17
+ "library",
18
+ "macro",
19
+ "C-struct",
20
+ "C-union",
21
+ "C-function",
22
+ "C-callable-wrapper"
23
+ ],
24
+ // Words that introduce type definitions like "define class".
25
+ // These are also parameterized like "define method" and are
26
+ // appended to otherParameterizedDefinitionWords
27
+ typeParameterizedDefinition: ["class", "C-subtype", "C-mapped-subtype"],
28
+ // Words that introduce trickier definitions like "define method".
29
+ // These require special definitions to be added to startExpressions
30
+ otherParameterizedDefinition: [
31
+ "method",
32
+ "function",
33
+ "C-variable",
34
+ "C-address"
35
+ ],
36
+ // Words that introduce module constant definitions.
37
+ // These must also be simple definitions and are
38
+ // appended to otherSimpleDefinitionWords
39
+ constantSimpleDefinition: ["constant"],
40
+ // Words that introduce module variable definitions.
41
+ // These must also be simple definitions and are
42
+ // appended to otherSimpleDefinitionWords
43
+ variableSimpleDefinition: ["variable"],
44
+ // Other words that introduce simple definitions
45
+ // (without implicit bodies).
46
+ otherSimpleDefinition: [
47
+ "generic",
48
+ "domain",
49
+ "C-pointer-type",
50
+ "table"
51
+ ],
52
+ // Words that begin statements with implicit bodies.
53
+ statement: [
54
+ "if",
55
+ "block",
56
+ "begin",
57
+ "method",
58
+ "case",
59
+ "for",
60
+ "select",
61
+ "when",
62
+ "unless",
63
+ "until",
64
+ "while",
65
+ "iterate",
66
+ "profiling",
67
+ "dynamic-bind"
68
+ ],
69
+ // Patterns that act as separators in compound statements.
70
+ // This may include any general pattern that must be indented
71
+ // specially.
72
+ separator: [
73
+ "finally",
74
+ "exception",
75
+ "cleanup",
76
+ "else",
77
+ "elseif",
78
+ "afterwards"
79
+ ],
80
+ // Keywords that do not require special indentation handling,
81
+ // but which should be highlighted
82
+ other: [
83
+ "above",
84
+ "below",
85
+ "by",
86
+ "from",
87
+ "handler",
88
+ "in",
89
+ "instance",
90
+ "let",
91
+ "local",
92
+ "otherwise",
93
+ "slot",
94
+ "subclass",
95
+ "then",
96
+ "to",
97
+ "keyed-by",
98
+ "virtual"
99
+ ],
100
+ // Condition signaling function calls
101
+ signalingCalls: [
102
+ "signal",
103
+ "error",
104
+ "cerror",
105
+ "break",
106
+ "check-type",
107
+ "abort"
108
+ ]
109
+ };
110
+ t.otherDefinition = t.unnamedDefinition.concat(t.namedDefinition).concat(t.otherParameterizedDefinition);
111
+ t.definition = t.typeParameterizedDefinition.concat(t.otherDefinition);
112
+ t.parameterizedDefinition = t.typeParameterizedDefinition.concat(t.otherParameterizedDefinition);
113
+ t.simpleDefinition = t.constantSimpleDefinition.concat(t.variableSimpleDefinition).concat(t.otherSimpleDefinition);
114
+ t.keyword = t.statement.concat(t.separator).concat(t.other);
115
+ var f = "[-_a-zA-Z?!*@<>$%]+", v = new RegExp("^" + f), a = {
116
+ // Symbols with special syntax
117
+ symbolKeyword: f + ":",
118
+ symbolClass: "<" + f + ">",
119
+ symbolGlobal: "\\*" + f + "\\*",
120
+ symbolConstant: "\\$" + f
121
+ }, w = {
122
+ symbolKeyword: "atom",
123
+ symbolClass: "tag",
124
+ symbolGlobal: "variableName.standard",
125
+ symbolConstant: "variableName.constant"
126
+ };
127
+ for (var c in a)
128
+ a.hasOwnProperty(c) && (a[c] = new RegExp("^" + a[c]));
129
+ a.keyword = [/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];
130
+ var u = {};
131
+ u.keyword = "keyword";
132
+ u.definition = "def";
133
+ u.simpleDefinition = "def";
134
+ u.signalingCalls = "builtin";
135
+ var y = {}, k = {};
136
+ p([
137
+ "keyword",
138
+ "definition",
139
+ "simpleDefinition",
140
+ "signalingCalls"
141
+ ], function(e) {
142
+ p(t[e], function(i) {
143
+ y[i] = e, k[i] = u[e];
144
+ });
145
+ });
146
+ function d(e, i, n) {
147
+ return i.tokenize = n, n(e, i);
148
+ }
149
+ function s(e, i) {
150
+ var n = e.peek();
151
+ if (n == "'" || n == '"')
152
+ return e.next(), d(e, i, h(n, "string"));
153
+ if (n == "/") {
154
+ if (e.next(), e.eat("*"))
155
+ return d(e, i, D);
156
+ if (e.eat("/"))
157
+ return e.skipToEnd(), "comment";
158
+ e.backUp(1);
159
+ } else if (/[+\-\d\.]/.test(n)) {
160
+ if (e.match(/^[+-]?[0-9]*\.[0-9]*([esdx][+-]?[0-9]+)?/i) || e.match(/^[+-]?[0-9]+([esdx][+-]?[0-9]+)/i) || e.match(/^[+-]?\d+/))
161
+ return "number";
162
+ } else {
163
+ if (n == "#")
164
+ return e.next(), n = e.peek(), n == '"' ? (e.next(), d(e, i, h('"', "string"))) : n == "b" ? (e.next(), e.eatWhile(/[01]/), "number") : n == "x" ? (e.next(), e.eatWhile(/[\da-f]/i), "number") : n == "o" ? (e.next(), e.eatWhile(/[0-7]/), "number") : n == "#" ? (e.next(), "punctuation") : n == "[" || n == "(" ? (e.next(), "bracket") : e.match(/f|t|all-keys|include|key|next|rest/i) ? "atom" : (e.eatWhile(/[-a-zA-Z]/), "error");
165
+ if (n == "~")
166
+ return e.next(), n = e.peek(), n == "=" ? (e.next(), n = e.peek(), n == "=" && e.next(), "operator") : "operator";
167
+ if (n == ":") {
168
+ if (e.next(), n = e.peek(), n == "=")
169
+ return e.next(), "operator";
170
+ if (n == ":")
171
+ return e.next(), "punctuation";
172
+ } else {
173
+ if ("[](){}".indexOf(n) != -1)
174
+ return e.next(), "bracket";
175
+ if (".,".indexOf(n) != -1)
176
+ return e.next(), "punctuation";
177
+ if (e.match("end"))
178
+ return "keyword";
179
+ }
180
+ }
181
+ for (var l in a)
182
+ if (a.hasOwnProperty(l)) {
183
+ var r = a[l];
184
+ if (r instanceof Array && x(r, function(o) {
185
+ return e.match(o);
186
+ }) || e.match(r))
187
+ return w[l];
188
+ }
189
+ return /[+\-*\/^=<>&|]/.test(n) ? (e.next(), "operator") : e.match("define") ? "def" : (e.eatWhile(/[\w\-]/), y.hasOwnProperty(e.current()) ? k[e.current()] : e.current().match(v) ? "variable" : (e.next(), "variableName.standard"));
190
+ }
191
+ function D(e, i) {
192
+ for (var n = !1, l = !1, r = 0, o; o = e.next(); ) {
193
+ if (o == "/" && n)
194
+ if (r > 0)
195
+ r--;
196
+ else {
197
+ i.tokenize = s;
198
+ break;
199
+ }
200
+ else
201
+ o == "*" && l && r++;
202
+ n = o == "*", l = o == "/";
203
+ }
204
+ return "comment";
205
+ }
206
+ function h(e, i) {
207
+ return function(n, l) {
208
+ for (var r = !1, o, b = !1; (o = n.next()) != null; ) {
209
+ if (o == e && !r) {
210
+ b = !0;
211
+ break;
212
+ }
213
+ r = !r && o == "\\";
214
+ }
215
+ return (b || !r) && (l.tokenize = s), i;
216
+ };
217
+ }
218
+ const g = {
219
+ name: "dylan",
220
+ startState: function() {
221
+ return {
222
+ tokenize: s,
223
+ currentIndent: 0
224
+ };
225
+ },
226
+ token: function(e, i) {
227
+ if (e.eatSpace())
228
+ return null;
229
+ var n = i.tokenize(e, i);
230
+ return n;
231
+ },
232
+ languageData: {
233
+ commentTokens: { block: { open: "/*", close: "*/" } }
234
+ }
235
+ };
236
+ export {
237
+ g as dylan
238
+ };
@@ -0,0 +1,77 @@
1
+ var i = { slash: 0, parenthesis: 1 }, n = { comment: 0, _string: 1, characterClass: 2 };
2
+ const l = {
3
+ name: "ebnf",
4
+ startState: function() {
5
+ return {
6
+ stringType: null,
7
+ commentType: null,
8
+ braced: 0,
9
+ lhs: !0,
10
+ localState: null,
11
+ stack: [],
12
+ inDefinition: !1
13
+ };
14
+ },
15
+ token: function(e, c) {
16
+ if (e) {
17
+ switch (c.stack.length === 0 && (e.peek() == '"' || e.peek() == "'" ? (c.stringType = e.peek(), e.next(), c.stack.unshift(n._string)) : e.match("/*") ? (c.stack.unshift(n.comment), c.commentType = i.slash) : e.match("(*") && (c.stack.unshift(n.comment), c.commentType = i.parenthesis)), c.stack[0]) {
18
+ case n._string:
19
+ for (; c.stack[0] === n._string && !e.eol(); )
20
+ e.peek() === c.stringType ? (e.next(), c.stack.shift()) : e.peek() === "\\" ? (e.next(), e.next()) : e.match(/^.[^\\\"\']*/);
21
+ return c.lhs ? "property" : "string";
22
+ case n.comment:
23
+ for (; c.stack[0] === n.comment && !e.eol(); )
24
+ c.commentType === i.slash && e.match("*/") || c.commentType === i.parenthesis && e.match("*)") ? (c.stack.shift(), c.commentType = null) : e.match(/^.[^\*]*/);
25
+ return "comment";
26
+ case n.characterClass:
27
+ for (; c.stack[0] === n.characterClass && !e.eol(); )
28
+ e.match(/^[^\]\\]+/) || e.match(".") || c.stack.shift();
29
+ return "operator";
30
+ }
31
+ var t = e.peek();
32
+ switch (t) {
33
+ case "[":
34
+ return e.next(), c.stack.unshift(n.characterClass), "bracket";
35
+ case ":":
36
+ case "|":
37
+ case ";":
38
+ return e.next(), "operator";
39
+ case "%":
40
+ if (e.match("%%"))
41
+ return "header";
42
+ if (e.match(/[%][A-Za-z]+/))
43
+ return "keyword";
44
+ if (e.match(/[%][}]/))
45
+ return "bracket";
46
+ break;
47
+ case "/":
48
+ if (e.match(/[\/][A-Za-z]+/))
49
+ return "keyword";
50
+ case "\\":
51
+ if (e.match(/[\][a-z]+/))
52
+ return "string.special";
53
+ case ".":
54
+ if (e.match("."))
55
+ return "atom";
56
+ case "*":
57
+ case "-":
58
+ case "+":
59
+ case "^":
60
+ if (e.match(t))
61
+ return "atom";
62
+ case "$":
63
+ if (e.match("$$"))
64
+ return "builtin";
65
+ if (e.match(/[$][0-9]+/))
66
+ return "variableName.special";
67
+ case "<":
68
+ if (e.match(/<<[a-zA-Z_]+>>/))
69
+ return "builtin";
70
+ }
71
+ return e.match("//") ? (e.skipToEnd(), "comment") : e.match("return") ? "operator" : e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/) ? e.match(/(?=[\(.])/) ? "variable" : e.match(/(?=[\s\n]*[:=])/) ? "def" : "variableName.special" : ["[", "]", "(", ")"].indexOf(e.peek()) != -1 ? (e.next(), "bracket") : (e.eatSpace() || e.next(), null);
72
+ }
73
+ }
74
+ };
75
+ export {
76
+ l as ebnf
77
+ };
@@ -0,0 +1,133 @@
1
+ function l(e) {
2
+ for (var n = {}, t = e.split(" "), r = 0; r < t.length; ++r)
3
+ n[t[r]] = !0;
4
+ return n;
5
+ }
6
+ function b(e, n) {
7
+ return n.startOfLine ? (e.skipToEnd(), "meta") : !1;
8
+ }
9
+ var g = l("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode"), w = l("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"), x = l("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath"), f = l("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"), k = l("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"), s = l("catch class do else finally for if switch try while"), E = l("true false null"), m = { "#": b }, h = /[+\-*&%=<>!?|\/]/, o;
10
+ function p(e, n) {
11
+ var t = e.next();
12
+ if (m[t]) {
13
+ var r = m[t](e, n);
14
+ if (r !== !1)
15
+ return r;
16
+ }
17
+ if (t == '"' || t == "'")
18
+ return n.tokenize = I(t), n.tokenize(e, n);
19
+ if (/[\[\]{}\(\),;\:\.]/.test(t))
20
+ return o = t, null;
21
+ if (/\d/.test(t))
22
+ return e.eatWhile(/[\w\.]/), "number";
23
+ if (t == "/") {
24
+ if (e.eat("*"))
25
+ return n.tokenize = y, y(e, n);
26
+ if (e.eat("/"))
27
+ return e.skipToEnd(), "comment";
28
+ }
29
+ if (h.test(t))
30
+ return e.eatWhile(h), "operator";
31
+ e.eatWhile(/[\w\$_]/);
32
+ var i = e.current().toLowerCase();
33
+ if (g.propertyIsEnumerable(i))
34
+ return s.propertyIsEnumerable(i) && (o = "newstatement"), "keyword";
35
+ if (w.propertyIsEnumerable(i))
36
+ return s.propertyIsEnumerable(i) && (o = "newstatement"), "variable";
37
+ if (x.propertyIsEnumerable(i))
38
+ return s.propertyIsEnumerable(i) && (o = "newstatement"), "modifier";
39
+ if (f.propertyIsEnumerable(i))
40
+ return s.propertyIsEnumerable(i) && (o = "newstatement"), "type";
41
+ if (k.propertyIsEnumerable(i))
42
+ return s.propertyIsEnumerable(i) && (o = "newstatement"), "builtin";
43
+ for (var a = i.length - 1; a >= 0 && (!isNaN(i[a]) || i[a] == "_"); )
44
+ --a;
45
+ if (a > 0) {
46
+ var d = i.substr(0, a + 1);
47
+ if (f.propertyIsEnumerable(d))
48
+ return s.propertyIsEnumerable(d) && (o = "newstatement"), "type";
49
+ }
50
+ return E.propertyIsEnumerable(i) ? "atom" : null;
51
+ }
52
+ function I(e) {
53
+ return function(n, t) {
54
+ for (var r = !1, i, a = !1; (i = n.next()) != null; ) {
55
+ if (i == e && !r) {
56
+ a = !0;
57
+ break;
58
+ }
59
+ r = !r && i == "\\";
60
+ }
61
+ return (a || !r) && (t.tokenize = p), "string";
62
+ };
63
+ }
64
+ function y(e, n) {
65
+ for (var t = !1, r; r = e.next(); ) {
66
+ if (r == "/" && t) {
67
+ n.tokenize = p;
68
+ break;
69
+ }
70
+ t = r == "*";
71
+ }
72
+ return "comment";
73
+ }
74
+ function v(e, n, t, r, i) {
75
+ this.indented = e, this.column = n, this.type = t, this.align = r, this.prev = i;
76
+ }
77
+ function c(e, n, t) {
78
+ return e.context = new v(e.indented, n, t, null, e.context);
79
+ }
80
+ function u(e) {
81
+ var n = e.context.type;
82
+ return (n == ")" || n == "]" || n == "}") && (e.indented = e.context.indented), e.context = e.context.prev;
83
+ }
84
+ const z = {
85
+ name: "ecl",
86
+ startState: function(e) {
87
+ return {
88
+ tokenize: null,
89
+ context: new v(-e, 0, "top", !1),
90
+ indented: 0,
91
+ startOfLine: !0
92
+ };
93
+ },
94
+ token: function(e, n) {
95
+ var t = n.context;
96
+ if (e.sol() && (t.align == null && (t.align = !1), n.indented = e.indentation(), n.startOfLine = !0), e.eatSpace())
97
+ return null;
98
+ o = null;
99
+ var r = (n.tokenize || p)(e, n);
100
+ if (r == "comment" || r == "meta")
101
+ return r;
102
+ if (t.align == null && (t.align = !0), (o == ";" || o == ":") && t.type == "statement")
103
+ u(n);
104
+ else if (o == "{")
105
+ c(n, e.column(), "}");
106
+ else if (o == "[")
107
+ c(n, e.column(), "]");
108
+ else if (o == "(")
109
+ c(n, e.column(), ")");
110
+ else if (o == "}") {
111
+ for (; t.type == "statement"; )
112
+ t = u(n);
113
+ for (t.type == "}" && (t = u(n)); t.type == "statement"; )
114
+ t = u(n);
115
+ } else
116
+ o == t.type ? u(n) : (t.type == "}" || t.type == "top" || t.type == "statement" && o == "newstatement") && c(n, e.column(), "statement");
117
+ return n.startOfLine = !1, r;
118
+ },
119
+ indent: function(e, n, t) {
120
+ if (e.tokenize != p && e.tokenize != null)
121
+ return 0;
122
+ var r = e.context, i = n && n.charAt(0);
123
+ r.type == "statement" && i == "}" && (r = r.prev);
124
+ var a = i == r.type;
125
+ return r.type == "statement" ? r.indented + (i == "{" ? 0 : t.unit) : r.align ? r.column + (a ? 0 : 1) : r.indented + (a ? 0 : t.unit);
126
+ },
127
+ languageData: {
128
+ indentOnInput: /^\s*[{}]$/
129
+ }
130
+ };
131
+ export {
132
+ z as ecl
133
+ };
@@ -0,0 +1,112 @@
1
+ function u(e) {
2
+ for (var r = {}, n = 0, t = e.length; n < t; ++n)
3
+ r[e[n]] = !0;
4
+ return r;
5
+ }
6
+ var l = u([
7
+ "note",
8
+ "across",
9
+ "when",
10
+ "variant",
11
+ "until",
12
+ "unique",
13
+ "undefine",
14
+ "then",
15
+ "strip",
16
+ "select",
17
+ "retry",
18
+ "rescue",
19
+ "require",
20
+ "rename",
21
+ "reference",
22
+ "redefine",
23
+ "prefix",
24
+ "once",
25
+ "old",
26
+ "obsolete",
27
+ "loop",
28
+ "local",
29
+ "like",
30
+ "is",
31
+ "inspect",
32
+ "infix",
33
+ "include",
34
+ "if",
35
+ "frozen",
36
+ "from",
37
+ "external",
38
+ "export",
39
+ "ensure",
40
+ "end",
41
+ "elseif",
42
+ "else",
43
+ "do",
44
+ "creation",
45
+ "create",
46
+ "check",
47
+ "alias",
48
+ "agent",
49
+ "separate",
50
+ "invariant",
51
+ "inherit",
52
+ "indexing",
53
+ "feature",
54
+ "expanded",
55
+ "deferred",
56
+ "class",
57
+ "Void",
58
+ "True",
59
+ "Result",
60
+ "Precursor",
61
+ "False",
62
+ "Current",
63
+ "create",
64
+ "attached",
65
+ "detachable",
66
+ "as",
67
+ "and",
68
+ "implies",
69
+ "not",
70
+ "or"
71
+ ]), c = u([":=", "and then", "and", "or", "<<", ">>"]);
72
+ function f(e, r, n) {
73
+ return n.tokenize.push(e), e(r, n);
74
+ }
75
+ function s(e, r) {
76
+ if (e.eatSpace())
77
+ return null;
78
+ var n = e.next();
79
+ return n == '"' || n == "'" ? f(p(n, "string"), e, r) : n == "-" && e.eat("-") ? (e.skipToEnd(), "comment") : n == ":" && e.eat("=") ? "operator" : /[0-9]/.test(n) ? (e.eatWhile(/[xXbBCc0-9\.]/), e.eat(/[\?\!]/), "variable") : /[a-zA-Z_0-9]/.test(n) ? (e.eatWhile(/[a-zA-Z_0-9]/), e.eat(/[\?\!]/), "variable") : /[=+\-\/*^%<>~]/.test(n) ? (e.eatWhile(/[=+\-\/*^%<>~]/), "operator") : null;
80
+ }
81
+ function p(e, r, n) {
82
+ return function(t, o) {
83
+ for (var a = !1, i; (i = t.next()) != null; ) {
84
+ if (i == e && (n || !a)) {
85
+ o.tokenize.pop();
86
+ break;
87
+ }
88
+ a = !a && i == "%";
89
+ }
90
+ return r;
91
+ };
92
+ }
93
+ const d = {
94
+ name: "eiffel",
95
+ startState: function() {
96
+ return { tokenize: [s] };
97
+ },
98
+ token: function(e, r) {
99
+ var n = r.tokenize[r.tokenize.length - 1](e, r);
100
+ if (n == "variable") {
101
+ var t = e.current();
102
+ n = l.propertyIsEnumerable(e.current()) ? "keyword" : c.propertyIsEnumerable(e.current()) ? "operator" : /^[A-Z][A-Z_0-9]*$/g.test(t) ? "tag" : /^0[bB][0-1]+$/g.test(t) || /^0[cC][0-7]+$/g.test(t) || /^0[xX][a-fA-F0-9]+$/g.test(t) || /^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(t) || /^[0-9]+$/g.test(t) ? "number" : "variable";
103
+ }
104
+ return n;
105
+ },
106
+ languageData: {
107
+ commentTokens: { line: "--" }
108
+ }
109
+ };
110
+ export {
111
+ d as eiffel
112
+ };
@@ -0,0 +1,108 @@
1
+ function a(n, t, i) {
2
+ return t(i), i(n, t);
3
+ }
4
+ var v = /[a-z]/, g = /[A-Z]/, l = /[a-zA-Z0-9_]/, f = /[0-9]/, o = /[0-9A-Fa-f]/, p = /[-&*+.\\/<>=?^|:]/, w = /[(),[\]{}]/, x = /[ \v\f]/;
5
+ function r() {
6
+ return function(n, t) {
7
+ if (n.eatWhile(x))
8
+ return null;
9
+ var i = n.next();
10
+ if (w.test(i))
11
+ return i === "{" && n.eat("-") ? a(n, t, h(1)) : i === "[" && n.match("glsl|") ? a(n, t, u) : "builtin";
12
+ if (i === "'")
13
+ return a(n, t, d);
14
+ if (i === '"')
15
+ return n.eat('"') ? n.eat('"') ? a(n, t, k) : "string" : a(n, t, E);
16
+ if (g.test(i))
17
+ return n.eatWhile(l), "type";
18
+ if (v.test(i)) {
19
+ var e = n.pos === 1;
20
+ return n.eatWhile(l), e ? "def" : "variable";
21
+ }
22
+ if (f.test(i)) {
23
+ if (i === "0") {
24
+ if (n.eat(/[xX]/))
25
+ return n.eatWhile(o), "number";
26
+ } else
27
+ n.eatWhile(f);
28
+ return n.eat(".") && n.eatWhile(f), n.eat(/[eE]/) && (n.eat(/[-+]/), n.eatWhile(f)), "number";
29
+ }
30
+ return p.test(i) ? i === "-" && n.eat("-") ? (n.skipToEnd(), "comment") : (n.eatWhile(p), "keyword") : i === "_" ? "keyword" : "error";
31
+ };
32
+ }
33
+ function h(n) {
34
+ return n == 0 ? r() : function(t, i) {
35
+ for (; !t.eol(); ) {
36
+ var e = t.next();
37
+ if (e == "{" && t.eat("-"))
38
+ ++n;
39
+ else if (e == "-" && t.eat("}") && (--n, n === 0))
40
+ return i(r()), "comment";
41
+ }
42
+ return i(h(n)), "comment";
43
+ };
44
+ }
45
+ function k(n, t) {
46
+ for (; !n.eol(); ) {
47
+ var i = n.next();
48
+ if (i === '"' && n.eat('"') && n.eat('"'))
49
+ return t(r()), "string";
50
+ }
51
+ return "string";
52
+ }
53
+ function E(n, t) {
54
+ for (; n.skipTo('\\"'); )
55
+ n.next(), n.next();
56
+ return n.skipTo('"') ? (n.next(), t(r()), "string") : (n.skipToEnd(), t(r()), "error");
57
+ }
58
+ function d(n, t) {
59
+ for (; n.skipTo("\\'"); )
60
+ n.next(), n.next();
61
+ return n.skipTo("'") ? (n.next(), t(r()), "string") : (n.skipToEnd(), t(r()), "error");
62
+ }
63
+ function u(n, t) {
64
+ for (; !n.eol(); ) {
65
+ var i = n.next();
66
+ if (i === "|" && n.eat("]"))
67
+ return t(r()), "string";
68
+ }
69
+ return "string";
70
+ }
71
+ var y = {
72
+ case: 1,
73
+ of: 1,
74
+ as: 1,
75
+ if: 1,
76
+ then: 1,
77
+ else: 1,
78
+ let: 1,
79
+ in: 1,
80
+ type: 1,
81
+ alias: 1,
82
+ module: 1,
83
+ where: 1,
84
+ import: 1,
85
+ exposing: 1,
86
+ port: 1
87
+ };
88
+ const W = {
89
+ name: "elm",
90
+ startState: function() {
91
+ return { f: r() };
92
+ },
93
+ copyState: function(n) {
94
+ return { f: n.f };
95
+ },
96
+ token: function(n, t) {
97
+ var i = t.f(n, function(m) {
98
+ t.f = m;
99
+ }), e = n.current();
100
+ return y.hasOwnProperty(e) ? "keyword" : i;
101
+ },
102
+ languageData: {
103
+ commentTokens: { line: "--" }
104
+ }
105
+ };
106
+ export {
107
+ W as elm
108
+ };