@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.
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/lib/apl-p0IPP13W.js +76 -0
- package/lib/asciiarmor-lJsBxlJJ.js +34 -0
- package/lib/asn1-Q9v1zIy5.js +102 -0
- package/lib/asterisk-foNkeTjy.js +273 -0
- package/lib/brainfuck-0XqyXpNS.js +35 -0
- package/lib/clike-ak6Z6Yhe.js +639 -0
- package/lib/clojure-iYO8U8Sg.js +810 -0
- package/lib/clsx-7d8NmkQq.js +21 -0
- package/lib/cmake-SVzjkxV_.js +28 -0
- package/lib/cobol-APHEnAOX.js +74 -0
- package/lib/coffeescript-KqQa0SYG.js +182 -0
- package/lib/commonlisp-bwqNqR5V.js +79 -0
- package/lib/core/crepe.d.ts +21 -0
- package/lib/core/crepe.d.ts.map +1 -0
- package/lib/core/index.d.ts +3 -0
- package/lib/core/index.d.ts.map +1 -0
- package/lib/core/slice.d.ts +12 -0
- package/lib/core/slice.d.ts.map +1 -0
- package/lib/crystal-BViWuDpA.js +217 -0
- package/lib/css-KHXHXfXg.js +1572 -0
- package/lib/cypher-XpTt4zQ3.js +69 -0
- package/lib/d-fLig6yqY.js +139 -0
- package/lib/diff-WoKGLpy6.js +18 -0
- package/lib/dockerfile-u6f6Vw2s.js +194 -0
- package/lib/dtd-SIJRUW6K.js +91 -0
- package/lib/dylan-4HCLhpWP.js +238 -0
- package/lib/ebnf-h_0lged5.js +77 -0
- package/lib/ecl-Lf4FF0lf.js +133 -0
- package/lib/eiffel-qlw8KUyf.js +112 -0
- package/lib/elm-QRnB3zXs.js +108 -0
- package/lib/erlang-fyVKb7eK.js +488 -0
- package/lib/factor-BEeN4upY.js +65 -0
- package/lib/fcl-lRek3hEb.js +106 -0
- package/lib/feature/block-edit/handle/component.d.ts +9 -0
- package/lib/feature/block-edit/handle/component.d.ts.map +1 -0
- package/lib/feature/block-edit/handle/index.d.ts +12 -0
- package/lib/feature/block-edit/handle/index.d.ts.map +1 -0
- package/lib/feature/block-edit/index.d.ts +3 -0
- package/lib/feature/block-edit/index.d.ts.map +1 -0
- package/lib/feature/block-edit/menu/component.d.ts +14 -0
- package/lib/feature/block-edit/menu/component.d.ts.map +1 -0
- package/lib/feature/block-edit/menu/config.d.ts +21 -0
- package/lib/feature/block-edit/menu/config.d.ts.map +1 -0
- package/lib/feature/block-edit/menu/icons.d.ts +14 -0
- package/lib/feature/block-edit/menu/icons.d.ts.map +1 -0
- package/lib/feature/block-edit/menu/index.d.ts +9 -0
- package/lib/feature/block-edit/menu/index.d.ts.map +1 -0
- package/lib/feature/code-mirror/index.d.ts +3 -0
- package/lib/feature/code-mirror/index.d.ts.map +1 -0
- package/lib/feature/gap-cursor/index.d.ts +3 -0
- package/lib/feature/gap-cursor/index.d.ts.map +1 -0
- package/lib/feature/image-block/index.d.ts +3 -0
- package/lib/feature/image-block/index.d.ts.map +1 -0
- package/lib/feature/index.d.ts +18 -0
- package/lib/feature/index.d.ts.map +1 -0
- package/lib/feature/link-tooltip/consts.d.ts +5 -0
- package/lib/feature/link-tooltip/consts.d.ts.map +1 -0
- package/lib/feature/link-tooltip/index.d.ts +3 -0
- package/lib/feature/link-tooltip/index.d.ts.map +1 -0
- package/lib/feature/list-item/consts.d.ts +2 -0
- package/lib/feature/list-item/consts.d.ts.map +1 -0
- package/lib/feature/list-item/index.d.ts +3 -0
- package/lib/feature/list-item/index.d.ts.map +1 -0
- package/lib/feature/placeholder/index.d.ts +10 -0
- package/lib/feature/placeholder/index.d.ts.map +1 -0
- package/lib/feature/shared.d.ts +3 -0
- package/lib/feature/shared.d.ts.map +1 -0
- package/lib/feature/toolbar/component.d.ts +13 -0
- package/lib/feature/toolbar/component.d.ts.map +1 -0
- package/lib/feature/toolbar/consts.d.ts +5 -0
- package/lib/feature/toolbar/consts.d.ts.map +1 -0
- package/lib/feature/toolbar/index.d.ts +3 -0
- package/lib/feature/toolbar/index.d.ts.map +1 -0
- package/lib/forth-ua2bRd8T.js +60 -0
- package/lib/fortran-WnF7znuN.js +443 -0
- package/lib/gas-wowve1o7.js +183 -0
- package/lib/gherkin-m7GIChu3.js +34 -0
- package/lib/go-th443Dhb.js +158 -0
- package/lib/groovy-tR4RiZnc.js +161 -0
- package/lib/haskell-jxVBofv5.js +375 -0
- package/lib/haxe-kWPI2tq3.js +390 -0
- package/lib/hooks-82sqkbtE.js +21 -0
- package/lib/http-3GIFWUlG.js +45 -0
- package/lib/icons-HYkfuR-O.js +50 -0
- package/lib/idl-PvpMZg-l.js +947 -0
- package/lib/index-0RbcZMbq.js +8 -0
- package/lib/index-4afXjFMY.js +517 -0
- package/lib/index-7MeyepDG.js +78 -0
- package/lib/index-7QgQq3x3.js +551 -0
- package/lib/index-7pgP6qYs.js +107 -0
- package/lib/index-8DvtgRVa.js +19511 -0
- package/lib/index-8Gg-jEP4.js +288 -0
- package/lib/index-8S8qcncB.js +507 -0
- package/lib/index-9A_GmGh4.js +1039 -0
- package/lib/index-EJJfYLzA.js +928 -0
- package/lib/index-Eg39w5kL.js +984 -0
- package/lib/index-FIk_7oPb.js +168 -0
- package/lib/index-LlbrXb_n.js +368 -0
- package/lib/index-MovKtgMG.js +121 -0
- package/lib/index-N9GtIS4X.js +64 -0
- package/lib/index-Pwn25-kf.js +8 -0
- package/lib/index-SdFSDosa.js +1295 -0
- package/lib/index-W5Th22-Z.js +1744 -0
- package/lib/index-XiXSFLmI.js +20975 -0
- package/lib/index-bknOViGv.js +47 -0
- package/lib/index-bkuIUPFS.js +275 -0
- package/lib/index-jPA8J9Eo.js +8 -0
- package/lib/index-lsG76a9s.js +552 -0
- package/lib/index-oTRzPo3B.js +146 -0
- package/lib/index-rrf6_6DC.js +317 -0
- package/lib/index-vJbZIHYF.js +81 -0
- package/lib/index-vPRh55CO.js +137 -0
- package/lib/index-vxy63hib.js +323 -0
- package/lib/index-wn1_LgCS.js +99 -0
- package/lib/index-xHADmDT3.js +12 -0
- package/lib/index-yt2EpMtv.js +141 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.es.js +7 -0
- package/lib/javascript-8ZHqHagw.js +758 -0
- package/lib/jinja2-vsOFe0qD.js +154 -0
- package/lib/julia-dlp_pbN1.js +241 -0
- package/lib/livescript-Gf5R-LT6.js +273 -0
- package/lib/lua-c5Y_JsBp.js +221 -0
- package/lib/mathematica-iiGTGmUs.js +35 -0
- package/lib/mbox-ZJh86H8B.js +78 -0
- package/lib/meta-tAGyVRPE.js +511 -0
- package/lib/mirc-i0qkCa0y.js +73 -0
- package/lib/mllike-Dy551fZW.js +275 -0
- package/lib/modelica-n6tGqUT9.js +94 -0
- package/lib/mscgen-aKSbB7D9.js +104 -0
- package/lib/mumps-lNiKA6sp.js +25 -0
- package/lib/nginx--YmuCfDj.js +93 -0
- package/lib/nsis-zhS8iA09.js +62 -0
- package/lib/ntriples-E3jQl3MC.js +79 -0
- package/lib/octave-EQvkGIeG.js +144 -0
- package/lib/oz-W2cpqFf6.js +152 -0
- package/lib/pascal-lCh6ouNZ.js +79 -0
- package/lib/perl-PxEQBX0B.js +915 -0
- package/lib/pig-Y_bNcrzS.js +56 -0
- package/lib/powershell-GaQP-TZr.js +249 -0
- package/lib/properties-mbRyn54L.js +26 -0
- package/lib/prosemirror-noTDkx-k.js +4 -0
- package/lib/protobuf-8CJideyJ.js +49 -0
- package/lib/puppet-ABBaChNZ.js +45 -0
- package/lib/python-sKdHg3Ka.js +321 -0
- package/lib/q-_1yG40Nm.js +89 -0
- package/lib/r-Ziz56bHT.js +108 -0
- package/lib/rpm-ORjGOHaQ.js +57 -0
- package/lib/ruby-jlbYq0dT.js +233 -0
- package/lib/sas-2n7xeUuO.js +107 -0
- package/lib/schema-tKk3m1fu.js +62 -0
- package/lib/scheme-XCs-NPeU.js +126 -0
- package/lib/shell-0_1Um7Dq.js +184 -0
- package/lib/sieve-7uyJD1x1.js +73 -0
- package/lib/simple-mode--HIzBxba.js +95 -0
- package/lib/smalltalk-PEFzrlQ-.js +48 -0
- package/lib/solr-BLBaHahN.js +41 -0
- package/lib/sparql-4F9ZWf1b.js +204 -0
- package/lib/spreadsheet-SGSo6blj.js +49 -0
- package/lib/sql-tebLBzN0.js +291 -0
- package/lib/stex-SFJcFGOO.js +130 -0
- package/lib/stylus-rwwWYWFm.js +256 -0
- package/lib/swift-eorJ0tCv.js +238 -0
- package/lib/tcl-IwXMB8U4.js +82 -0
- package/lib/textile-ok2VyjwC.js +299 -0
- package/lib/theme/classic/index.d.ts +3 -0
- package/lib/theme/classic/index.d.ts.map +1 -0
- package/lib/theme/classic-dark/index.d.ts +3 -0
- package/lib/theme/classic-dark/index.d.ts.map +1 -0
- package/lib/theme/headless/index.d.ts +3 -0
- package/lib/theme/headless/index.d.ts.map +1 -0
- package/lib/theme/index.d.ts +8 -0
- package/lib/theme/index.d.ts.map +1 -0
- package/lib/theme/shared.d.ts +3 -0
- package/lib/theme/shared.d.ts.map +1 -0
- package/lib/tiddlywiki-DLhz8_pc.js +156 -0
- package/lib/tiki-DFAqFElY.js +183 -0
- package/lib/tippy.esm-MZ2vxByW.js +1813 -0
- package/lib/toml-ryxpTZEV.js +49 -0
- package/lib/tooltip-plugin-gcwyQdiT.js +119 -0
- package/lib/troff-ZzZyvNct.js +36 -0
- package/lib/ttcn-6gvkqqpW.js +136 -0
- package/lib/ttcn-cfg-oSu-Dq5C.js +98 -0
- package/lib/turtle-10ofr5au.js +87 -0
- package/lib/use-css-light-dom-EKWZDmbJ.js +82 -0
- package/lib/utils/index.d.ts +4 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/vb-a6n6fzrD.js +74 -0
- package/lib/vbscript-dgvo8jPt.js +324 -0
- package/lib/velocity-CBncCrwO.js +97 -0
- package/lib/verilog-KlcACt6C.js +271 -0
- package/lib/vhdl-NMd7Gf35.js +117 -0
- package/lib/webidl-z1UE5DN_.js +160 -0
- package/lib/xquery-hDt5jWTp.js +431 -0
- package/lib/yacas-ftgh_qwr.js +74 -0
- package/lib/yaml-DnNTfjXK.js +53 -0
- package/lib/z80-dA1PqWe1.js +62 -0
- package/package.json +87 -0
- package/src/core/crepe.ts +98 -0
- package/src/core/index.ts +4 -0
- package/src/core/slice.ts +44 -0
- package/src/feature/block-edit/handle/component.ts +68 -0
- package/src/feature/block-edit/handle/index.ts +81 -0
- package/src/feature/block-edit/index.ts +17 -0
- package/src/feature/block-edit/menu/component.ts +210 -0
- package/src/feature/block-edit/menu/config.ts +335 -0
- package/src/feature/block-edit/menu/icons.ts +171 -0
- package/src/feature/block-edit/menu/index.ts +113 -0
- package/src/feature/block-edit/style.css +126 -0
- package/src/feature/code-mirror/index.ts +60 -0
- package/src/feature/code-mirror/style.css +159 -0
- package/src/feature/gap-cursor/index.ts +31 -0
- package/src/feature/image-block/index.ts +59 -0
- package/src/feature/image-block/style.css +215 -0
- package/src/feature/index.ts +66 -0
- package/src/feature/link-tooltip/consts.ts +47 -0
- package/src/feature/link-tooltip/index.ts +22 -0
- package/src/feature/link-tooltip/style.css +107 -0
- package/src/feature/list-item/consts.ts +15 -0
- package/src/feature/list-item/index.ts +30 -0
- package/src/feature/list-item/style.css +23 -0
- package/src/feature/placeholder/index.ts +87 -0
- package/src/feature/placeholder/style.css +9 -0
- package/src/feature/shared.ts +4 -0
- package/src/feature/toolbar/component.ts +101 -0
- package/src/feature/toolbar/consts.ts +26 -0
- package/src/feature/toolbar/index.ts +92 -0
- package/src/feature/toolbar/style.css +37 -0
- package/src/index.ts +5 -0
- package/src/theme/classic/index.ts +12 -0
- package/src/theme/classic/style.css +192 -0
- package/src/theme/classic-dark/index.ts +12 -0
- package/src/theme/classic-dark/style.css +197 -0
- package/src/theme/headless/index.ts +9 -0
- package/src/theme/index.ts +26 -0
- package/src/theme/shared.ts +4 -0
- package/src/utils/index.ts +12 -0
- package/src/vite-env.d.ts +2 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
function c(e) {
|
|
2
|
+
return new RegExp("^(?:" + e.join("|") + ")", "i");
|
|
3
|
+
}
|
|
4
|
+
function o(e) {
|
|
5
|
+
return new RegExp("^(?:" + e.join("|") + ")$", "i");
|
|
6
|
+
}
|
|
7
|
+
var d = o([
|
|
8
|
+
"_G",
|
|
9
|
+
"_VERSION",
|
|
10
|
+
"assert",
|
|
11
|
+
"collectgarbage",
|
|
12
|
+
"dofile",
|
|
13
|
+
"error",
|
|
14
|
+
"getfenv",
|
|
15
|
+
"getmetatable",
|
|
16
|
+
"ipairs",
|
|
17
|
+
"load",
|
|
18
|
+
"loadfile",
|
|
19
|
+
"loadstring",
|
|
20
|
+
"module",
|
|
21
|
+
"next",
|
|
22
|
+
"pairs",
|
|
23
|
+
"pcall",
|
|
24
|
+
"print",
|
|
25
|
+
"rawequal",
|
|
26
|
+
"rawget",
|
|
27
|
+
"rawset",
|
|
28
|
+
"require",
|
|
29
|
+
"select",
|
|
30
|
+
"setfenv",
|
|
31
|
+
"setmetatable",
|
|
32
|
+
"tonumber",
|
|
33
|
+
"tostring",
|
|
34
|
+
"type",
|
|
35
|
+
"unpack",
|
|
36
|
+
"xpcall",
|
|
37
|
+
"coroutine.create",
|
|
38
|
+
"coroutine.resume",
|
|
39
|
+
"coroutine.running",
|
|
40
|
+
"coroutine.status",
|
|
41
|
+
"coroutine.wrap",
|
|
42
|
+
"coroutine.yield",
|
|
43
|
+
"debug.debug",
|
|
44
|
+
"debug.getfenv",
|
|
45
|
+
"debug.gethook",
|
|
46
|
+
"debug.getinfo",
|
|
47
|
+
"debug.getlocal",
|
|
48
|
+
"debug.getmetatable",
|
|
49
|
+
"debug.getregistry",
|
|
50
|
+
"debug.getupvalue",
|
|
51
|
+
"debug.setfenv",
|
|
52
|
+
"debug.sethook",
|
|
53
|
+
"debug.setlocal",
|
|
54
|
+
"debug.setmetatable",
|
|
55
|
+
"debug.setupvalue",
|
|
56
|
+
"debug.traceback",
|
|
57
|
+
"close",
|
|
58
|
+
"flush",
|
|
59
|
+
"lines",
|
|
60
|
+
"read",
|
|
61
|
+
"seek",
|
|
62
|
+
"setvbuf",
|
|
63
|
+
"write",
|
|
64
|
+
"io.close",
|
|
65
|
+
"io.flush",
|
|
66
|
+
"io.input",
|
|
67
|
+
"io.lines",
|
|
68
|
+
"io.open",
|
|
69
|
+
"io.output",
|
|
70
|
+
"io.popen",
|
|
71
|
+
"io.read",
|
|
72
|
+
"io.stderr",
|
|
73
|
+
"io.stdin",
|
|
74
|
+
"io.stdout",
|
|
75
|
+
"io.tmpfile",
|
|
76
|
+
"io.type",
|
|
77
|
+
"io.write",
|
|
78
|
+
"math.abs",
|
|
79
|
+
"math.acos",
|
|
80
|
+
"math.asin",
|
|
81
|
+
"math.atan",
|
|
82
|
+
"math.atan2",
|
|
83
|
+
"math.ceil",
|
|
84
|
+
"math.cos",
|
|
85
|
+
"math.cosh",
|
|
86
|
+
"math.deg",
|
|
87
|
+
"math.exp",
|
|
88
|
+
"math.floor",
|
|
89
|
+
"math.fmod",
|
|
90
|
+
"math.frexp",
|
|
91
|
+
"math.huge",
|
|
92
|
+
"math.ldexp",
|
|
93
|
+
"math.log",
|
|
94
|
+
"math.log10",
|
|
95
|
+
"math.max",
|
|
96
|
+
"math.min",
|
|
97
|
+
"math.modf",
|
|
98
|
+
"math.pi",
|
|
99
|
+
"math.pow",
|
|
100
|
+
"math.rad",
|
|
101
|
+
"math.random",
|
|
102
|
+
"math.randomseed",
|
|
103
|
+
"math.sin",
|
|
104
|
+
"math.sinh",
|
|
105
|
+
"math.sqrt",
|
|
106
|
+
"math.tan",
|
|
107
|
+
"math.tanh",
|
|
108
|
+
"os.clock",
|
|
109
|
+
"os.date",
|
|
110
|
+
"os.difftime",
|
|
111
|
+
"os.execute",
|
|
112
|
+
"os.exit",
|
|
113
|
+
"os.getenv",
|
|
114
|
+
"os.remove",
|
|
115
|
+
"os.rename",
|
|
116
|
+
"os.setlocale",
|
|
117
|
+
"os.time",
|
|
118
|
+
"os.tmpname",
|
|
119
|
+
"package.cpath",
|
|
120
|
+
"package.loaded",
|
|
121
|
+
"package.loaders",
|
|
122
|
+
"package.loadlib",
|
|
123
|
+
"package.path",
|
|
124
|
+
"package.preload",
|
|
125
|
+
"package.seeall",
|
|
126
|
+
"string.byte",
|
|
127
|
+
"string.char",
|
|
128
|
+
"string.dump",
|
|
129
|
+
"string.find",
|
|
130
|
+
"string.format",
|
|
131
|
+
"string.gmatch",
|
|
132
|
+
"string.gsub",
|
|
133
|
+
"string.len",
|
|
134
|
+
"string.lower",
|
|
135
|
+
"string.match",
|
|
136
|
+
"string.rep",
|
|
137
|
+
"string.reverse",
|
|
138
|
+
"string.sub",
|
|
139
|
+
"string.upper",
|
|
140
|
+
"table.concat",
|
|
141
|
+
"table.insert",
|
|
142
|
+
"table.maxn",
|
|
143
|
+
"table.remove",
|
|
144
|
+
"table.sort"
|
|
145
|
+
]), g = o([
|
|
146
|
+
"and",
|
|
147
|
+
"break",
|
|
148
|
+
"elseif",
|
|
149
|
+
"false",
|
|
150
|
+
"nil",
|
|
151
|
+
"not",
|
|
152
|
+
"or",
|
|
153
|
+
"return",
|
|
154
|
+
"true",
|
|
155
|
+
"function",
|
|
156
|
+
"end",
|
|
157
|
+
"if",
|
|
158
|
+
"then",
|
|
159
|
+
"else",
|
|
160
|
+
"do",
|
|
161
|
+
"while",
|
|
162
|
+
"repeat",
|
|
163
|
+
"until",
|
|
164
|
+
"for",
|
|
165
|
+
"in",
|
|
166
|
+
"local"
|
|
167
|
+
]), f = o(["function", "if", "repeat", "do", "\\(", "{"]), h = o(["end", "until", "\\)", "}"]), p = c(["end", "until", "\\)", "}", "else", "elseif"]);
|
|
168
|
+
function u(e) {
|
|
169
|
+
for (var t = 0; e.eat("="); )
|
|
170
|
+
++t;
|
|
171
|
+
return e.eat("["), t;
|
|
172
|
+
}
|
|
173
|
+
function l(e, t) {
|
|
174
|
+
var n = e.next();
|
|
175
|
+
return n == "-" && e.eat("-") ? e.eat("[") && e.eat("[") ? (t.cur = s(u(e), "comment"))(e, t) : (e.skipToEnd(), "comment") : n == '"' || n == "'" ? (t.cur = m(n))(e, t) : n == "[" && /[\[=]/.test(e.peek()) ? (t.cur = s(u(e), "string"))(e, t) : /\d/.test(n) ? (e.eatWhile(/[\w.%]/), "number") : /[\w_]/.test(n) ? (e.eatWhile(/[\w\\\-_.]/), "variable") : null;
|
|
176
|
+
}
|
|
177
|
+
function s(e, t) {
|
|
178
|
+
return function(n, i) {
|
|
179
|
+
for (var a = null, r; (r = n.next()) != null; )
|
|
180
|
+
if (a == null)
|
|
181
|
+
r == "]" && (a = 0);
|
|
182
|
+
else if (r == "=")
|
|
183
|
+
++a;
|
|
184
|
+
else if (r == "]" && a == e) {
|
|
185
|
+
i.cur = l;
|
|
186
|
+
break;
|
|
187
|
+
} else
|
|
188
|
+
a = null;
|
|
189
|
+
return t;
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function m(e) {
|
|
193
|
+
return function(t, n) {
|
|
194
|
+
for (var i = !1, a; (a = t.next()) != null && !(a == e && !i); )
|
|
195
|
+
i = !i && a == "\\";
|
|
196
|
+
return i || (n.cur = l), "string";
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
const b = {
|
|
200
|
+
name: "lua",
|
|
201
|
+
startState: function() {
|
|
202
|
+
return { basecol: 0, indentDepth: 0, cur: l };
|
|
203
|
+
},
|
|
204
|
+
token: function(e, t) {
|
|
205
|
+
if (e.eatSpace())
|
|
206
|
+
return null;
|
|
207
|
+
var n = t.cur(e, t), i = e.current();
|
|
208
|
+
return n == "variable" && (g.test(i) ? n = "keyword" : d.test(i) && (n = "builtin")), n != "comment" && n != "string" && (f.test(i) ? ++t.indentDepth : h.test(i) && --t.indentDepth), n;
|
|
209
|
+
},
|
|
210
|
+
indent: function(e, t, n) {
|
|
211
|
+
var i = p.test(t);
|
|
212
|
+
return e.basecol + n.unit * (e.indentDepth - (i ? 1 : 0));
|
|
213
|
+
},
|
|
214
|
+
languageData: {
|
|
215
|
+
indentOnInput: /^\s*(?:end|until|else|\)|\})$/,
|
|
216
|
+
commentTokens: { line: "--", block: { open: "--[[", close: "]]--" } }
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
export {
|
|
220
|
+
b as lua
|
|
221
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var u = "[a-zA-Z\\$][a-zA-Z0-9\\$]*", f = "(?:\\d+)", c = "(?:\\.\\d+|\\d+\\.\\d*|\\d+)", o = "(?:\\.\\w+|\\w+\\.\\w*|\\w+)", l = "(?:`(?:`?" + c + ")?)", z = new RegExp("(?:" + f + "(?:\\^\\^" + o + l + "?(?:\\*\\^[+-]?\\d+)?))"), m = new RegExp("(?:" + c + l + "?(?:\\*\\^[+-]?\\d+)?)"), A = new RegExp("(?:`?)(?:" + u + ")(?:`(?:" + u + "))*(?:`?)");
|
|
2
|
+
function i(e, a) {
|
|
3
|
+
var n;
|
|
4
|
+
return n = e.next(), n === '"' ? (a.tokenize = Z, a.tokenize(e, a)) : n === "(" && e.eat("*") ? (a.commentLevel++, a.tokenize = $, a.tokenize(e, a)) : (e.backUp(1), e.match(z, !0, !1) || e.match(m, !0, !1) ? "number" : e.match(/(?:In|Out)\[[0-9]*\]/, !0, !1) ? "atom" : e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::usage)/, !0, !1) ? "meta" : e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/, !0, !1) ? "string.special" : e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/, !0, !1) || e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/, !0, !1) || e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/, !0, !1) || e.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/, !0, !1) ? "variableName.special" : e.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/, !0, !1) ? "character" : e.match(/(?:\[|\]|{|}|\(|\))/, !0, !1) ? "bracket" : e.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/, !0, !1) ? "variableName.constant" : e.match(A, !0, !1) ? "keyword" : e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/, !0, !1) ? "operator" : (e.next(), "error"));
|
|
5
|
+
}
|
|
6
|
+
function Z(e, a) {
|
|
7
|
+
for (var n, r = !1, t = !1; (n = e.next()) != null; ) {
|
|
8
|
+
if (n === '"' && !t) {
|
|
9
|
+
r = !0;
|
|
10
|
+
break;
|
|
11
|
+
}
|
|
12
|
+
t = !t && n === "\\";
|
|
13
|
+
}
|
|
14
|
+
return r && !t && (a.tokenize = i), "string";
|
|
15
|
+
}
|
|
16
|
+
function $(e, a) {
|
|
17
|
+
for (var n, r; a.commentLevel > 0 && (r = e.next()) != null; )
|
|
18
|
+
n === "(" && r === "*" && a.commentLevel++, n === "*" && r === ")" && a.commentLevel--, n = r;
|
|
19
|
+
return a.commentLevel <= 0 && (a.tokenize = i), "comment";
|
|
20
|
+
}
|
|
21
|
+
const v = {
|
|
22
|
+
name: "mathematica",
|
|
23
|
+
startState: function() {
|
|
24
|
+
return { tokenize: i, commentLevel: 0 };
|
|
25
|
+
},
|
|
26
|
+
token: function(e, a) {
|
|
27
|
+
return e.eatSpace() ? null : a.tokenize(e, a);
|
|
28
|
+
},
|
|
29
|
+
languageData: {
|
|
30
|
+
commentTokens: { block: { open: "(*", close: "*)" } }
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
v as mathematica
|
|
35
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
var o = [
|
|
2
|
+
"From",
|
|
3
|
+
"Sender",
|
|
4
|
+
"Reply-To",
|
|
5
|
+
"To",
|
|
6
|
+
"Cc",
|
|
7
|
+
"Bcc",
|
|
8
|
+
"Message-ID",
|
|
9
|
+
"In-Reply-To",
|
|
10
|
+
"References",
|
|
11
|
+
"Resent-From",
|
|
12
|
+
"Resent-Sender",
|
|
13
|
+
"Resent-To",
|
|
14
|
+
"Resent-Cc",
|
|
15
|
+
"Resent-Bcc",
|
|
16
|
+
"Resent-Message-ID",
|
|
17
|
+
"Return-Path",
|
|
18
|
+
"Received"
|
|
19
|
+
], l = [
|
|
20
|
+
"Date",
|
|
21
|
+
"Subject",
|
|
22
|
+
"Comments",
|
|
23
|
+
"Keywords",
|
|
24
|
+
"Resent-Date"
|
|
25
|
+
], u = /^[ \t]/, d = /^From /, f = new RegExp("^(" + o.join("|") + "): "), c = new RegExp("^(" + l.join("|") + "): "), t = /^[^:]+:/, m = /^[^ ]+@[^ ]+/, p = /^.*?(?=[^ ]+?@[^ ]+)/, H = /^<.*?>/, v = /^.*?(?=<.*>)/;
|
|
26
|
+
function h(e) {
|
|
27
|
+
return e === "Subject" ? "header" : "string";
|
|
28
|
+
}
|
|
29
|
+
function R(e, r) {
|
|
30
|
+
if (e.sol()) {
|
|
31
|
+
if (r.inSeparator = !1, r.inHeader && e.match(u))
|
|
32
|
+
return null;
|
|
33
|
+
if (r.inHeader = !1, r.header = null, e.match(d))
|
|
34
|
+
return r.inHeaders = !0, r.inSeparator = !0, "atom";
|
|
35
|
+
var n, i = !1;
|
|
36
|
+
return (n = e.match(c)) || (i = !0) && (n = e.match(f)) ? (r.inHeaders = !0, r.inHeader = !0, r.emailPermitted = i, r.header = n[1], "atom") : r.inHeaders && (n = e.match(t)) ? (r.inHeader = !0, r.emailPermitted = !0, r.header = n[1], "atom") : (r.inHeaders = !1, e.skipToEnd(), null);
|
|
37
|
+
}
|
|
38
|
+
if (r.inSeparator)
|
|
39
|
+
return e.match(m) ? "link" : (e.match(p) || e.skipToEnd(), "atom");
|
|
40
|
+
if (r.inHeader) {
|
|
41
|
+
var a = h(r.header);
|
|
42
|
+
if (r.emailPermitted) {
|
|
43
|
+
if (e.match(H))
|
|
44
|
+
return a + " link";
|
|
45
|
+
if (e.match(v))
|
|
46
|
+
return a;
|
|
47
|
+
}
|
|
48
|
+
return e.skipToEnd(), a;
|
|
49
|
+
}
|
|
50
|
+
return e.skipToEnd(), null;
|
|
51
|
+
}
|
|
52
|
+
const k = {
|
|
53
|
+
name: "mbox",
|
|
54
|
+
startState: function() {
|
|
55
|
+
return {
|
|
56
|
+
// Is in a mbox separator
|
|
57
|
+
inSeparator: !1,
|
|
58
|
+
// Is in a mail header
|
|
59
|
+
inHeader: !1,
|
|
60
|
+
// If bracketed email is permitted. Only applicable when inHeader
|
|
61
|
+
emailPermitted: !1,
|
|
62
|
+
// Name of current header
|
|
63
|
+
header: null,
|
|
64
|
+
// Is in a region of mail headers
|
|
65
|
+
inHeaders: !1
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
token: R,
|
|
69
|
+
blankLine: function(e) {
|
|
70
|
+
e.inHeaders = e.inSeparator = e.inHeader = !1;
|
|
71
|
+
},
|
|
72
|
+
languageData: {
|
|
73
|
+
autocomplete: o.concat(l)
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
k as mbox
|
|
78
|
+
};
|