monacozen 0.0.1 → 0.2.0
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/README.md +219 -0
- package/assets/antimono-ClsI0fxy.js +5 -0
- package/assets/antimono-zBXMptjq.css +1 -0
- package/assets/bat-T2vjbQzY.js +125 -0
- package/assets/bicep-B6UDBWZN.js +220 -0
- package/assets/clojure-BvXzD8Uz.js +148 -0
- package/assets/coffee-D_yet6sT.js +262 -0
- package/assets/cpp-CsfEADPM.js +232 -0
- package/assets/csharp-jw3fFksF.js +262 -0
- package/assets/css-FsiUe-xI.js +286 -0
- package/assets/css.worker-BIsSvM_Q.js +96 -0
- package/assets/css.worker-BSHdDU9y.js +6 -0
- package/assets/cssMode-7U-ime2d.js +65 -0
- package/assets/cypher-B8DgU2PH.js +214 -0
- package/assets/dart-D1x60wEn.js +238 -0
- package/assets/dist-Bx9hOuoB.js +624 -0
- package/assets/dockerfile-DSHxsy4G.js +193 -0
- package/assets/editor.api-ZYFspLPt.js +85776 -0
- package/assets/editorWebWorkerMain-BioN9fGU.js +33 -0
- package/assets/editorWebWorkerMain-DXr8-Jst.js +6 -0
- package/assets/elixir-Cr7BtjRU.js +525 -0
- package/assets/fsharp-CeVKIr0d.js +149 -0
- package/assets/go-BL4_0srD.js +167 -0
- package/assets/graphql-mhWekwK0.js +176 -0
- package/assets/handlebars-rQdtgZoQ.js +412 -0
- package/assets/hcl-CfyDj6z_.js +221 -0
- package/assets/html-DIDrd2Z7.js +333 -0
- package/assets/html.worker-BrBx6eB3.js +6 -0
- package/assets/html.worker-CEvqvEpu.js +509 -0
- package/assets/htmlMode-i6u-9r7u.js +74 -0
- package/assets/ini-DhiXkl_g.js +96 -0
- package/assets/java-Ct9YHm5L.js +175 -0
- package/assets/javascript-By915NHa.js +20 -0
- package/assets/json.worker-B0PzJ5jL.js +6 -0
- package/assets/json.worker-CAiVr-gV.js +65 -0
- package/assets/jsonMode-DAP8CNa2.js +450 -0
- package/assets/julia-BAYXm_pL.js +416 -0
- package/assets/kotlin-JEujETri.js +184 -0
- package/assets/less-oHZXXDVD.js +244 -0
- package/assets/liquid-Cvs1eMgo.js +199 -0
- package/assets/lspLanguageFeatures-D6P77uh_.js +1455 -0
- package/assets/lua-B3ViXcD8.js +202 -0
- package/assets/main-16cPxgwS.js +107 -0
- package/assets/main-CB71Lf5W.js +129 -0
- package/assets/main-HEYSEiwe.js +66 -0
- package/assets/markdown-Ggb6Rgvc.js +264 -0
- package/assets/mdx-Ce7sXDA4.js +329 -0
- package/assets/mips-cYdfQChM.js +130 -0
- package/assets/monaco-d37b1a8f.css +3 -0
- package/assets/monaco-o5F6wkXp.js +40865 -0
- package/assets/mysql-nklBC2QL.js +170 -0
- package/assets/objective-c-x5BzCYEv.js +146 -0
- package/assets/pascal-DWL5ya_C.js +178 -0
- package/assets/perl-CbRoLks6.js +318 -0
- package/assets/pgsql-CVS-AsDB.js +160 -0
- package/assets/php-6gZIubF1.js +473 -0
- package/assets/powershell-DKgJI7BG.js +213 -0
- package/assets/protobuf-N0VyW3k9.js +661 -0
- package/assets/pug-BIMEUctf.js +302 -0
- package/assets/python-BKt2Winm.js +254 -0
- package/assets/r-Cb2uCcX6.js +191 -0
- package/assets/redis-D1CRAuQ1.js +125 -0
- package/assets/ruby-BzpgsYNr.js +529 -0
- package/assets/rust-CkIXqWDr.js +180 -0
- package/assets/scala-CnJ7htCu.js +553 -0
- package/assets/scss-xP2eAFyY.js +419 -0
- package/assets/shell-JSjWPSrk.js +225 -0
- package/assets/solidity-C8AFhoIi.js +149 -0
- package/assets/sql-DqW-LmZI.js +173 -0
- package/assets/swift-BcHKQY-M.js +215 -0
- package/assets/systemverilog-Dmu-Ht4V.js +300 -0
- package/assets/ts.worker-BAchZA3W.js +6 -0
- package/assets/ts.worker-DZhhT1EO.js +67741 -0
- package/assets/tsMode-C_Fsqh0j.js +566 -0
- package/assets/twig-Bj4rwioa.js +390 -0
- package/assets/typescript-Djsb1cC9.js +257 -0
- package/assets/typespec-xwJ6QpRP.js +236 -0
- package/assets/vb-CMxAjmFH.js +262 -0
- package/assets/wgsl-CTYGQRo2.js +147 -0
- package/assets/xml-D7cJD5hW.js +130 -0
- package/assets/yaml-B8A0QdVf.js +223 -0
- package/assets/yaml.worker-Crtsysk5.js +474 -0
- package/assets/yaml.worker-DZ36155v.js +6 -0
- package/lib.d.ts +8403 -0
- package/lib.js +2 -0
- package/package.json +1 -1
- package/src/main.js +29 -0
- package/index.d.ts +0 -6
- package/index.js +0 -1
- package/readme.md +0 -1
- /package/{license.txt → LICENSE} +0 -0
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
//#region node_modules/.bun/monaco-editor@0.57.0/node_modules/monaco-editor/esm/vs/languages/definitions/ruby/ruby.js
|
|
2
|
+
var e = {
|
|
3
|
+
comments: {
|
|
4
|
+
lineComment: "#",
|
|
5
|
+
blockComment: ["=begin", "=end"]
|
|
6
|
+
},
|
|
7
|
+
brackets: [
|
|
8
|
+
["(", ")"],
|
|
9
|
+
["{", "}"],
|
|
10
|
+
["[", "]"]
|
|
11
|
+
],
|
|
12
|
+
autoClosingPairs: [
|
|
13
|
+
{
|
|
14
|
+
open: "{",
|
|
15
|
+
close: "}"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
open: "[",
|
|
19
|
+
close: "]"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
open: "(",
|
|
23
|
+
close: ")"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
open: "\"",
|
|
27
|
+
close: "\""
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
open: "'",
|
|
31
|
+
close: "'"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
surroundingPairs: [
|
|
35
|
+
{
|
|
36
|
+
open: "{",
|
|
37
|
+
close: "}"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
open: "[",
|
|
41
|
+
close: "]"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
open: "(",
|
|
45
|
+
close: ")"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
open: "\"",
|
|
49
|
+
close: "\""
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
open: "'",
|
|
53
|
+
close: "'"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
indentationRules: {
|
|
57
|
+
increaseIndentPattern: /* @__PURE__ */ RegExp("^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|(\"|'|/).*\\4)*(#.*)?$"),
|
|
58
|
+
decreaseIndentPattern: /* @__PURE__ */ RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")
|
|
59
|
+
}
|
|
60
|
+
}, t = {
|
|
61
|
+
tokenPostfix: ".ruby",
|
|
62
|
+
keywords: /* @__PURE__ */ "__LINE__.__ENCODING__.__FILE__.BEGIN.END.alias.and.begin.break.case.class.def.defined?.do.else.elsif.end.ensure.for.false.if.in.module.next.nil.not.or.redo.rescue.retry.return.self.super.then.true.undef.unless.until.when.while.yield".split("."),
|
|
63
|
+
keywordops: [
|
|
64
|
+
"::",
|
|
65
|
+
"..",
|
|
66
|
+
"...",
|
|
67
|
+
"?",
|
|
68
|
+
":",
|
|
69
|
+
"=>"
|
|
70
|
+
],
|
|
71
|
+
builtins: [
|
|
72
|
+
"require",
|
|
73
|
+
"public",
|
|
74
|
+
"private",
|
|
75
|
+
"include",
|
|
76
|
+
"extend",
|
|
77
|
+
"attr_reader",
|
|
78
|
+
"protected",
|
|
79
|
+
"private_class_method",
|
|
80
|
+
"protected_class_method",
|
|
81
|
+
"new"
|
|
82
|
+
],
|
|
83
|
+
declarations: [
|
|
84
|
+
"module",
|
|
85
|
+
"class",
|
|
86
|
+
"def",
|
|
87
|
+
"case",
|
|
88
|
+
"do",
|
|
89
|
+
"begin",
|
|
90
|
+
"for",
|
|
91
|
+
"if",
|
|
92
|
+
"while",
|
|
93
|
+
"until",
|
|
94
|
+
"unless"
|
|
95
|
+
],
|
|
96
|
+
linedecls: [
|
|
97
|
+
"def",
|
|
98
|
+
"case",
|
|
99
|
+
"do",
|
|
100
|
+
"begin",
|
|
101
|
+
"for",
|
|
102
|
+
"if",
|
|
103
|
+
"while",
|
|
104
|
+
"until",
|
|
105
|
+
"unless"
|
|
106
|
+
],
|
|
107
|
+
operators: /* @__PURE__ */ "^.&.|.<=>.==.===.!~.=~.>.>=.<.<=.<<.>>.+.-.*./.%.**.~.+@.-@.[].[]=.`.+=.-=.*=.**=./=.^=.%=.<<=.>>=.&=.&&=.||=.|=".split("."),
|
|
108
|
+
brackets: [
|
|
109
|
+
{
|
|
110
|
+
open: "(",
|
|
111
|
+
close: ")",
|
|
112
|
+
token: "delimiter.parenthesis"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
open: "{",
|
|
116
|
+
close: "}",
|
|
117
|
+
token: "delimiter.curly"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
open: "[",
|
|
121
|
+
close: "]",
|
|
122
|
+
token: "delimiter.square"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
symbols: /[=><!~?:&|+\-*\/\^%\.]+/,
|
|
126
|
+
escape: /(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,
|
|
127
|
+
escapes: /\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,
|
|
128
|
+
decpart: /\d(_?\d)*/,
|
|
129
|
+
decimal: /0|@decpart/,
|
|
130
|
+
delim: /[^a-zA-Z0-9\s\n\r]/,
|
|
131
|
+
heredelim: /(?:\w+|'[^']*'|"[^"]*"|`[^`]*`)/,
|
|
132
|
+
regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
|
|
133
|
+
regexpesc: /\\(?:[AzZbBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})?/,
|
|
134
|
+
tokenizer: {
|
|
135
|
+
root: [
|
|
136
|
+
[/^(\s*)([a-z_]\w*[!?=]?)/, ["white", { cases: {
|
|
137
|
+
"for|until|while": {
|
|
138
|
+
token: "keyword.$2",
|
|
139
|
+
next: "@dodecl.$2"
|
|
140
|
+
},
|
|
141
|
+
"@declarations": {
|
|
142
|
+
token: "keyword.$2",
|
|
143
|
+
next: "@root.$2"
|
|
144
|
+
},
|
|
145
|
+
end: {
|
|
146
|
+
token: "keyword.$S2",
|
|
147
|
+
next: "@pop"
|
|
148
|
+
},
|
|
149
|
+
"@keywords": "keyword",
|
|
150
|
+
"@builtins": "predefined",
|
|
151
|
+
"@default": "identifier"
|
|
152
|
+
} }]],
|
|
153
|
+
[/[a-z_]\w*[!?=]?/, { cases: {
|
|
154
|
+
"if|unless|while|until": {
|
|
155
|
+
token: "keyword.$0x",
|
|
156
|
+
next: "@modifier.$0x"
|
|
157
|
+
},
|
|
158
|
+
for: {
|
|
159
|
+
token: "keyword.$2",
|
|
160
|
+
next: "@dodecl.$2"
|
|
161
|
+
},
|
|
162
|
+
"@linedecls": {
|
|
163
|
+
token: "keyword.$0",
|
|
164
|
+
next: "@root.$0"
|
|
165
|
+
},
|
|
166
|
+
end: {
|
|
167
|
+
token: "keyword.$S2",
|
|
168
|
+
next: "@pop"
|
|
169
|
+
},
|
|
170
|
+
"@keywords": "keyword",
|
|
171
|
+
"@builtins": "predefined",
|
|
172
|
+
"@default": "identifier"
|
|
173
|
+
} }],
|
|
174
|
+
[/[A-Z][\w]*[!?=]?/, "constructor.identifier"],
|
|
175
|
+
[/\$[\w]*/, "global.constant"],
|
|
176
|
+
[/@[\w]*/, "namespace.instance.identifier"],
|
|
177
|
+
[/@@@[\w]*/, "namespace.class.identifier"],
|
|
178
|
+
[/<<[-~](@heredelim).*/, {
|
|
179
|
+
token: "string.heredoc.delimiter",
|
|
180
|
+
next: "@heredoc.$1"
|
|
181
|
+
}],
|
|
182
|
+
[/[ \t\r\n]+<<(@heredelim).*/, {
|
|
183
|
+
token: "string.heredoc.delimiter",
|
|
184
|
+
next: "@heredoc.$1"
|
|
185
|
+
}],
|
|
186
|
+
[/^<<(@heredelim).*/, {
|
|
187
|
+
token: "string.heredoc.delimiter",
|
|
188
|
+
next: "@heredoc.$1"
|
|
189
|
+
}],
|
|
190
|
+
{ include: "@whitespace" },
|
|
191
|
+
[/"/, {
|
|
192
|
+
token: "string.d.delim",
|
|
193
|
+
next: "@dstring.d.\""
|
|
194
|
+
}],
|
|
195
|
+
[/'/, {
|
|
196
|
+
token: "string.sq.delim",
|
|
197
|
+
next: "@sstring.sq"
|
|
198
|
+
}],
|
|
199
|
+
[/%([rsqxwW]|Q?)/, {
|
|
200
|
+
token: "@rematch",
|
|
201
|
+
next: "pstring"
|
|
202
|
+
}],
|
|
203
|
+
[/`/, {
|
|
204
|
+
token: "string.x.delim",
|
|
205
|
+
next: "@dstring.x.`"
|
|
206
|
+
}],
|
|
207
|
+
[/:(\w|[$@])\w*[!?=]?/, "string.s"],
|
|
208
|
+
[/:"/, {
|
|
209
|
+
token: "string.s.delim",
|
|
210
|
+
next: "@dstring.s.\""
|
|
211
|
+
}],
|
|
212
|
+
[/:'/, {
|
|
213
|
+
token: "string.s.delim",
|
|
214
|
+
next: "@sstring.s"
|
|
215
|
+
}],
|
|
216
|
+
[/\/(?=(\\\/|[^\/\n])+\/)/, {
|
|
217
|
+
token: "regexp.delim",
|
|
218
|
+
next: "@regexp"
|
|
219
|
+
}],
|
|
220
|
+
[/[{}()\[\]]/, "@brackets"],
|
|
221
|
+
[/@symbols/, { cases: {
|
|
222
|
+
"@keywordops": "keyword",
|
|
223
|
+
"@operators": "operator",
|
|
224
|
+
"@default": ""
|
|
225
|
+
} }],
|
|
226
|
+
[/[;,]/, "delimiter"],
|
|
227
|
+
[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/, "number.hex"],
|
|
228
|
+
[/0[_oO][0-7](_?[0-7])*/, "number.octal"],
|
|
229
|
+
[/0[bB][01](_?[01])*/, "number.binary"],
|
|
230
|
+
[/0[dD]@decpart/, "number"],
|
|
231
|
+
[/@decimal((\.@decpart)?([eE][\-+]?@decpart)?)/, { cases: {
|
|
232
|
+
$1: "number.float",
|
|
233
|
+
"@default": "number"
|
|
234
|
+
} }]
|
|
235
|
+
],
|
|
236
|
+
dodecl: [
|
|
237
|
+
[/^/, {
|
|
238
|
+
token: "",
|
|
239
|
+
switchTo: "@root.$S2"
|
|
240
|
+
}],
|
|
241
|
+
[/[a-z_]\w*[!?=]?/, { cases: {
|
|
242
|
+
end: {
|
|
243
|
+
token: "keyword.$S2",
|
|
244
|
+
next: "@pop"
|
|
245
|
+
},
|
|
246
|
+
do: {
|
|
247
|
+
token: "keyword",
|
|
248
|
+
switchTo: "@root.$S2"
|
|
249
|
+
},
|
|
250
|
+
"@linedecls": {
|
|
251
|
+
token: "@rematch",
|
|
252
|
+
switchTo: "@root.$S2"
|
|
253
|
+
},
|
|
254
|
+
"@keywords": "keyword",
|
|
255
|
+
"@builtins": "predefined",
|
|
256
|
+
"@default": "identifier"
|
|
257
|
+
} }],
|
|
258
|
+
{ include: "@root" }
|
|
259
|
+
],
|
|
260
|
+
modifier: [
|
|
261
|
+
[
|
|
262
|
+
/^/,
|
|
263
|
+
"",
|
|
264
|
+
"@pop"
|
|
265
|
+
],
|
|
266
|
+
[/[a-z_]\w*[!?=]?/, { cases: {
|
|
267
|
+
end: {
|
|
268
|
+
token: "keyword.$S2",
|
|
269
|
+
next: "@pop"
|
|
270
|
+
},
|
|
271
|
+
"then|else|elsif|do": {
|
|
272
|
+
token: "keyword",
|
|
273
|
+
switchTo: "@root.$S2"
|
|
274
|
+
},
|
|
275
|
+
"@linedecls": {
|
|
276
|
+
token: "@rematch",
|
|
277
|
+
switchTo: "@root.$S2"
|
|
278
|
+
},
|
|
279
|
+
"@keywords": "keyword",
|
|
280
|
+
"@builtins": "predefined",
|
|
281
|
+
"@default": "identifier"
|
|
282
|
+
} }],
|
|
283
|
+
{ include: "@root" }
|
|
284
|
+
],
|
|
285
|
+
sstring: [
|
|
286
|
+
[/[^\\']+/, "string.$S2"],
|
|
287
|
+
[/\\\\|\\'|\\$/, "string.$S2.escape"],
|
|
288
|
+
[/\\./, "string.$S2.invalid"],
|
|
289
|
+
[/'/, {
|
|
290
|
+
token: "string.$S2.delim",
|
|
291
|
+
next: "@pop"
|
|
292
|
+
}]
|
|
293
|
+
],
|
|
294
|
+
dstring: [
|
|
295
|
+
[/[^\\`"#]+/, "string.$S2"],
|
|
296
|
+
[
|
|
297
|
+
/#/,
|
|
298
|
+
"string.$S2.escape",
|
|
299
|
+
"@interpolated"
|
|
300
|
+
],
|
|
301
|
+
[/\\$/, "string.$S2.escape"],
|
|
302
|
+
[/@escapes/, "string.$S2.escape"],
|
|
303
|
+
[/\\./, "string.$S2.escape.invalid"],
|
|
304
|
+
[/[`"]/, { cases: {
|
|
305
|
+
"$#==$S3": {
|
|
306
|
+
token: "string.$S2.delim",
|
|
307
|
+
next: "@pop"
|
|
308
|
+
},
|
|
309
|
+
"@default": "string.$S2"
|
|
310
|
+
} }]
|
|
311
|
+
],
|
|
312
|
+
heredoc: [[/^(\s*)(@heredelim)$/, { cases: {
|
|
313
|
+
"$2==$S2": ["string.heredoc", {
|
|
314
|
+
token: "string.heredoc.delimiter",
|
|
315
|
+
next: "@pop"
|
|
316
|
+
}],
|
|
317
|
+
"@default": ["string.heredoc", "string.heredoc"]
|
|
318
|
+
} }], [/.*/, "string.heredoc"]],
|
|
319
|
+
interpolated: [
|
|
320
|
+
[
|
|
321
|
+
/\$\w*/,
|
|
322
|
+
"global.constant",
|
|
323
|
+
"@pop"
|
|
324
|
+
],
|
|
325
|
+
[
|
|
326
|
+
/@\w*/,
|
|
327
|
+
"namespace.class.identifier",
|
|
328
|
+
"@pop"
|
|
329
|
+
],
|
|
330
|
+
[
|
|
331
|
+
/@@@\w*/,
|
|
332
|
+
"namespace.instance.identifier",
|
|
333
|
+
"@pop"
|
|
334
|
+
],
|
|
335
|
+
[/[{]/, {
|
|
336
|
+
token: "string.escape.curly",
|
|
337
|
+
switchTo: "@interpolated_compound"
|
|
338
|
+
}],
|
|
339
|
+
[
|
|
340
|
+
"",
|
|
341
|
+
"",
|
|
342
|
+
"@pop"
|
|
343
|
+
]
|
|
344
|
+
],
|
|
345
|
+
interpolated_compound: [[/[}]/, {
|
|
346
|
+
token: "string.escape.curly",
|
|
347
|
+
next: "@pop"
|
|
348
|
+
}], { include: "@root" }],
|
|
349
|
+
pregexp: [
|
|
350
|
+
{ include: "@whitespace" },
|
|
351
|
+
[/[^\(\{\[\\]/, { cases: {
|
|
352
|
+
"$#==$S3": {
|
|
353
|
+
token: "regexp.delim",
|
|
354
|
+
next: "@pop"
|
|
355
|
+
},
|
|
356
|
+
"$#==$S2": {
|
|
357
|
+
token: "regexp.delim",
|
|
358
|
+
next: "@push"
|
|
359
|
+
},
|
|
360
|
+
"~[)}\\]]": "@brackets.regexp.escape.control",
|
|
361
|
+
"~@regexpctl": "regexp.escape.control",
|
|
362
|
+
"@default": "regexp"
|
|
363
|
+
} }],
|
|
364
|
+
{ include: "@regexcontrol" }
|
|
365
|
+
],
|
|
366
|
+
regexp: [
|
|
367
|
+
{ include: "@regexcontrol" },
|
|
368
|
+
[/[^\\\/]/, "regexp"],
|
|
369
|
+
[
|
|
370
|
+
"/[ixmp]*",
|
|
371
|
+
{ token: "regexp.delim" },
|
|
372
|
+
"@pop"
|
|
373
|
+
]
|
|
374
|
+
],
|
|
375
|
+
regexcontrol: [
|
|
376
|
+
[/(\{)(\d+(?:,\d*)?)(\})/, [
|
|
377
|
+
"@brackets.regexp.escape.control",
|
|
378
|
+
"regexp.escape.control",
|
|
379
|
+
"@brackets.regexp.escape.control"
|
|
380
|
+
]],
|
|
381
|
+
[/(\[)(\^?)/, ["@brackets.regexp.escape.control", {
|
|
382
|
+
token: "regexp.escape.control",
|
|
383
|
+
next: "@regexrange"
|
|
384
|
+
}]],
|
|
385
|
+
[/(\()(\?[:=!])/, ["@brackets.regexp.escape.control", "regexp.escape.control"]],
|
|
386
|
+
[/\(\?#/, {
|
|
387
|
+
token: "regexp.escape.control",
|
|
388
|
+
next: "@regexpcomment"
|
|
389
|
+
}],
|
|
390
|
+
[/[()]/, "@brackets.regexp.escape.control"],
|
|
391
|
+
[/@regexpctl/, "regexp.escape.control"],
|
|
392
|
+
[/\\$/, "regexp.escape"],
|
|
393
|
+
[/@regexpesc/, "regexp.escape"],
|
|
394
|
+
[/\\\./, "regexp.invalid"],
|
|
395
|
+
[
|
|
396
|
+
/#/,
|
|
397
|
+
"regexp.escape",
|
|
398
|
+
"@interpolated"
|
|
399
|
+
]
|
|
400
|
+
],
|
|
401
|
+
regexrange: [
|
|
402
|
+
[/-/, "regexp.escape.control"],
|
|
403
|
+
[/\^/, "regexp.invalid"],
|
|
404
|
+
[/\\$/, "regexp.escape"],
|
|
405
|
+
[/@regexpesc/, "regexp.escape"],
|
|
406
|
+
[/[^\]]/, "regexp"],
|
|
407
|
+
[
|
|
408
|
+
/\]/,
|
|
409
|
+
"@brackets.regexp.escape.control",
|
|
410
|
+
"@pop"
|
|
411
|
+
]
|
|
412
|
+
],
|
|
413
|
+
regexpcomment: [[/[^)]+/, "comment"], [/\)/, {
|
|
414
|
+
token: "regexp.escape.control",
|
|
415
|
+
next: "@pop"
|
|
416
|
+
}]],
|
|
417
|
+
pstring: [
|
|
418
|
+
[/%([qws])\(/, {
|
|
419
|
+
token: "string.$1.delim",
|
|
420
|
+
switchTo: "@qstring.$1.(.)"
|
|
421
|
+
}],
|
|
422
|
+
[/%([qws])\[/, {
|
|
423
|
+
token: "string.$1.delim",
|
|
424
|
+
switchTo: "@qstring.$1.[.]"
|
|
425
|
+
}],
|
|
426
|
+
[/%([qws])\{/, {
|
|
427
|
+
token: "string.$1.delim",
|
|
428
|
+
switchTo: "@qstring.$1.{.}"
|
|
429
|
+
}],
|
|
430
|
+
[/%([qws])</, {
|
|
431
|
+
token: "string.$1.delim",
|
|
432
|
+
switchTo: "@qstring.$1.<.>"
|
|
433
|
+
}],
|
|
434
|
+
[/%([qws])(@delim)/, {
|
|
435
|
+
token: "string.$1.delim",
|
|
436
|
+
switchTo: "@qstring.$1.$2.$2"
|
|
437
|
+
}],
|
|
438
|
+
[/%r\(/, {
|
|
439
|
+
token: "regexp.delim",
|
|
440
|
+
switchTo: "@pregexp.(.)"
|
|
441
|
+
}],
|
|
442
|
+
[/%r\[/, {
|
|
443
|
+
token: "regexp.delim",
|
|
444
|
+
switchTo: "@pregexp.[.]"
|
|
445
|
+
}],
|
|
446
|
+
[/%r\{/, {
|
|
447
|
+
token: "regexp.delim",
|
|
448
|
+
switchTo: "@pregexp.{.}"
|
|
449
|
+
}],
|
|
450
|
+
[/%r</, {
|
|
451
|
+
token: "regexp.delim",
|
|
452
|
+
switchTo: "@pregexp.<.>"
|
|
453
|
+
}],
|
|
454
|
+
[/%r(@delim)/, {
|
|
455
|
+
token: "regexp.delim",
|
|
456
|
+
switchTo: "@pregexp.$1.$1"
|
|
457
|
+
}],
|
|
458
|
+
[/%(x|W|Q?)\(/, {
|
|
459
|
+
token: "string.$1.delim",
|
|
460
|
+
switchTo: "@qqstring.$1.(.)"
|
|
461
|
+
}],
|
|
462
|
+
[/%(x|W|Q?)\[/, {
|
|
463
|
+
token: "string.$1.delim",
|
|
464
|
+
switchTo: "@qqstring.$1.[.]"
|
|
465
|
+
}],
|
|
466
|
+
[/%(x|W|Q?)\{/, {
|
|
467
|
+
token: "string.$1.delim",
|
|
468
|
+
switchTo: "@qqstring.$1.{.}"
|
|
469
|
+
}],
|
|
470
|
+
[/%(x|W|Q?)</, {
|
|
471
|
+
token: "string.$1.delim",
|
|
472
|
+
switchTo: "@qqstring.$1.<.>"
|
|
473
|
+
}],
|
|
474
|
+
[/%(x|W|Q?)(@delim)/, {
|
|
475
|
+
token: "string.$1.delim",
|
|
476
|
+
switchTo: "@qqstring.$1.$2.$2"
|
|
477
|
+
}],
|
|
478
|
+
[/%([rqwsxW]|Q?)./, {
|
|
479
|
+
token: "invalid",
|
|
480
|
+
next: "@pop"
|
|
481
|
+
}],
|
|
482
|
+
[/./, {
|
|
483
|
+
token: "invalid",
|
|
484
|
+
next: "@pop"
|
|
485
|
+
}]
|
|
486
|
+
],
|
|
487
|
+
qstring: [
|
|
488
|
+
[/\\$/, "string.$S2.escape"],
|
|
489
|
+
[/\\./, "string.$S2.escape"],
|
|
490
|
+
[/./, { cases: {
|
|
491
|
+
"$#==$S4": {
|
|
492
|
+
token: "string.$S2.delim",
|
|
493
|
+
next: "@pop"
|
|
494
|
+
},
|
|
495
|
+
"$#==$S3": {
|
|
496
|
+
token: "string.$S2.delim",
|
|
497
|
+
next: "@push"
|
|
498
|
+
},
|
|
499
|
+
"@default": "string.$S2"
|
|
500
|
+
} }]
|
|
501
|
+
],
|
|
502
|
+
qqstring: [[
|
|
503
|
+
/#/,
|
|
504
|
+
"string.$S2.escape",
|
|
505
|
+
"@interpolated"
|
|
506
|
+
], { include: "@qstring" }],
|
|
507
|
+
whitespace: [
|
|
508
|
+
[/[ \t\r\n]+/, ""],
|
|
509
|
+
[
|
|
510
|
+
/^\s*=begin\b/,
|
|
511
|
+
"comment",
|
|
512
|
+
"@comment"
|
|
513
|
+
],
|
|
514
|
+
[/#.*$/, "comment"]
|
|
515
|
+
],
|
|
516
|
+
comment: [
|
|
517
|
+
[/[^=]+/, "comment"],
|
|
518
|
+
[/^\s*=begin\b/, "comment.invalid"],
|
|
519
|
+
[
|
|
520
|
+
/^\s*=end\b.*/,
|
|
521
|
+
"comment",
|
|
522
|
+
"@pop"
|
|
523
|
+
],
|
|
524
|
+
[/[=]/, "comment"]
|
|
525
|
+
]
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
//#endregion
|
|
529
|
+
export { e as conf, t as language };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
//#region node_modules/.bun/monaco-editor@0.57.0/node_modules/monaco-editor/esm/vs/languages/definitions/rust/rust.js
|
|
2
|
+
var e = {
|
|
3
|
+
comments: {
|
|
4
|
+
lineComment: "//",
|
|
5
|
+
blockComment: ["/*", "*/"]
|
|
6
|
+
},
|
|
7
|
+
brackets: [
|
|
8
|
+
["{", "}"],
|
|
9
|
+
["[", "]"],
|
|
10
|
+
["(", ")"]
|
|
11
|
+
],
|
|
12
|
+
autoClosingPairs: [
|
|
13
|
+
{
|
|
14
|
+
open: "[",
|
|
15
|
+
close: "]"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
open: "{",
|
|
19
|
+
close: "}"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
open: "(",
|
|
23
|
+
close: ")"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
open: "\"",
|
|
27
|
+
close: "\"",
|
|
28
|
+
notIn: ["string"]
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
surroundingPairs: [
|
|
32
|
+
{
|
|
33
|
+
open: "{",
|
|
34
|
+
close: "}"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
open: "[",
|
|
38
|
+
close: "]"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
open: "(",
|
|
42
|
+
close: ")"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
open: "\"",
|
|
46
|
+
close: "\""
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
open: "'",
|
|
50
|
+
close: "'"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
folding: { markers: {
|
|
54
|
+
start: /* @__PURE__ */ RegExp("^\\s*#pragma\\s+region\\b"),
|
|
55
|
+
end: /* @__PURE__ */ RegExp("^\\s*#pragma\\s+endregion\\b")
|
|
56
|
+
} }
|
|
57
|
+
}, t = {
|
|
58
|
+
tokenPostfix: ".rust",
|
|
59
|
+
defaultToken: "invalid",
|
|
60
|
+
keywords: /* @__PURE__ */ "as.async.await.box.break.const.continue.crate.dyn.else.enum.extern.false.fn.for.if.impl.in.let.loop.match.mod.move.mut.pub.ref.return.self.static.struct.super.trait.true.try.type.unsafe.use.where.while.catch.default.union.static.abstract.alignof.become.do.final.macro.offsetof.override.priv.proc.pure.sizeof.typeof.unsized.virtual.yield".split("."),
|
|
61
|
+
typeKeywords: /* @__PURE__ */ "Self.m32.m64.m128.f80.f16.f128.int.uint.float.char.bool.u8.u16.u32.u64.f32.f64.i8.i16.i32.i64.str.Option.Either.c_float.c_double.c_void.FILE.fpos_t.DIR.dirent.c_char.c_schar.c_uchar.c_short.c_ushort.c_int.c_uint.c_long.c_ulong.size_t.ptrdiff_t.clock_t.time_t.c_longlong.c_ulonglong.intptr_t.uintptr_t.off_t.dev_t.ino_t.pid_t.mode_t.ssize_t".split("."),
|
|
62
|
+
constants: [
|
|
63
|
+
"true",
|
|
64
|
+
"false",
|
|
65
|
+
"Some",
|
|
66
|
+
"None",
|
|
67
|
+
"Left",
|
|
68
|
+
"Right",
|
|
69
|
+
"Ok",
|
|
70
|
+
"Err"
|
|
71
|
+
],
|
|
72
|
+
supportConstants: /* @__PURE__ */ "EXIT_FAILURE.EXIT_SUCCESS.RAND_MAX.EOF.SEEK_SET.SEEK_CUR.SEEK_END._IOFBF._IONBF._IOLBF.BUFSIZ.FOPEN_MAX.FILENAME_MAX.L_tmpnam.TMP_MAX.O_RDONLY.O_WRONLY.O_RDWR.O_APPEND.O_CREAT.O_EXCL.O_TRUNC.S_IFIFO.S_IFCHR.S_IFBLK.S_IFDIR.S_IFREG.S_IFMT.S_IEXEC.S_IWRITE.S_IREAD.S_IRWXU.S_IXUSR.S_IWUSR.S_IRUSR.F_OK.R_OK.W_OK.X_OK.STDIN_FILENO.STDOUT_FILENO.STDERR_FILENO".split("."),
|
|
73
|
+
supportMacros: [
|
|
74
|
+
"format!",
|
|
75
|
+
"print!",
|
|
76
|
+
"println!",
|
|
77
|
+
"panic!",
|
|
78
|
+
"format_args!",
|
|
79
|
+
"unreachable!",
|
|
80
|
+
"write!",
|
|
81
|
+
"writeln!"
|
|
82
|
+
],
|
|
83
|
+
operators: /* @__PURE__ */ "!,!=,%,%=,&,&=,&&,*,*=,+,+=,-,-=,->,.,..,...,/,/=,:,;,<<,<<=,<,<=,=,==,=>,>,>=,>>,>>=,@,^,^=,|,|=,||,_,?,#".split(","),
|
|
84
|
+
escapes: /\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,
|
|
85
|
+
delimiters: /[,]/,
|
|
86
|
+
symbols: /[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,
|
|
87
|
+
intSuffixes: /[iu](8|16|32|64|128|size)/,
|
|
88
|
+
floatSuffixes: /f(32|64)/,
|
|
89
|
+
tokenizer: {
|
|
90
|
+
root: [
|
|
91
|
+
[/r(#*)"/, {
|
|
92
|
+
token: "string.quote",
|
|
93
|
+
bracket: "@open",
|
|
94
|
+
next: "@stringraw.$1"
|
|
95
|
+
}],
|
|
96
|
+
[/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/, { cases: {
|
|
97
|
+
"@typeKeywords": "keyword.type",
|
|
98
|
+
"@keywords": "keyword",
|
|
99
|
+
"@supportConstants": "keyword",
|
|
100
|
+
"@supportMacros": "keyword",
|
|
101
|
+
"@constants": "keyword",
|
|
102
|
+
"@default": "identifier"
|
|
103
|
+
} }],
|
|
104
|
+
[/\$/, "identifier"],
|
|
105
|
+
[/'[a-zA-Z_][a-zA-Z0-9_]*(?=[^\'])/, "identifier"],
|
|
106
|
+
[/'(\S|@escapes)'/, "string.byteliteral"],
|
|
107
|
+
[/"/, {
|
|
108
|
+
token: "string.quote",
|
|
109
|
+
bracket: "@open",
|
|
110
|
+
next: "@string"
|
|
111
|
+
}],
|
|
112
|
+
{ include: "@numbers" },
|
|
113
|
+
{ include: "@whitespace" },
|
|
114
|
+
[/@delimiters/, { cases: {
|
|
115
|
+
"@keywords": "keyword",
|
|
116
|
+
"@default": "delimiter"
|
|
117
|
+
} }],
|
|
118
|
+
[/[{}()\[\]<>]/, "@brackets"],
|
|
119
|
+
[/@symbols/, { cases: {
|
|
120
|
+
"@operators": "operator",
|
|
121
|
+
"@default": ""
|
|
122
|
+
} }]
|
|
123
|
+
],
|
|
124
|
+
whitespace: [
|
|
125
|
+
[/[ \t\r\n]+/, "white"],
|
|
126
|
+
[
|
|
127
|
+
/\/\*/,
|
|
128
|
+
"comment",
|
|
129
|
+
"@comment"
|
|
130
|
+
],
|
|
131
|
+
[/\/\/.*$/, "comment"]
|
|
132
|
+
],
|
|
133
|
+
comment: [
|
|
134
|
+
[/[^\/*]+/, "comment"],
|
|
135
|
+
[
|
|
136
|
+
/\/\*/,
|
|
137
|
+
"comment",
|
|
138
|
+
"@push"
|
|
139
|
+
],
|
|
140
|
+
[
|
|
141
|
+
"\\*/",
|
|
142
|
+
"comment",
|
|
143
|
+
"@pop"
|
|
144
|
+
],
|
|
145
|
+
[/[\/*]/, "comment"]
|
|
146
|
+
],
|
|
147
|
+
string: [
|
|
148
|
+
[/[^\\"]+/, "string"],
|
|
149
|
+
[/@escapes/, "string.escape"],
|
|
150
|
+
[/\\./, "string.escape.invalid"],
|
|
151
|
+
[/"/, {
|
|
152
|
+
token: "string.quote",
|
|
153
|
+
bracket: "@close",
|
|
154
|
+
next: "@pop"
|
|
155
|
+
}]
|
|
156
|
+
],
|
|
157
|
+
stringraw: [
|
|
158
|
+
[/[^"#]+/, { token: "string" }],
|
|
159
|
+
[/"(#*)/, { cases: {
|
|
160
|
+
"$1==$S2": {
|
|
161
|
+
token: "string.quote",
|
|
162
|
+
bracket: "@close",
|
|
163
|
+
next: "@pop"
|
|
164
|
+
},
|
|
165
|
+
"@default": { token: "string" }
|
|
166
|
+
} }],
|
|
167
|
+
[/["#]/, { token: "string" }]
|
|
168
|
+
],
|
|
169
|
+
numbers: [
|
|
170
|
+
[/(0o[0-7_]+)(@intSuffixes)?/, { token: "number" }],
|
|
171
|
+
[/(0b[0-1_]+)(@intSuffixes)?/, { token: "number" }],
|
|
172
|
+
[/[\d][\d_]*(\.[\d][\d_]*)?[eE][+-][\d_]+(@floatSuffixes)?/, { token: "number" }],
|
|
173
|
+
[/\b(\d\.?[\d_]*)(@floatSuffixes)?\b/, { token: "number" }],
|
|
174
|
+
[/(0x[\da-fA-F]+)_?(@intSuffixes)?/, { token: "number" }],
|
|
175
|
+
[/[\d][\d_]*(@intSuffixes?)?/, { token: "number" }]
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
//#endregion
|
|
180
|
+
export { e as conf, t as language };
|