sun-form-v3 1.0.5 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/abap-DfvySaIJ.js +1404 -0
- package/dist/apex-B__0irD3.js +332 -0
- package/dist/assets/css.worker-OK053IOu.js +84 -0
- package/dist/assets/editor.worker-D9iUZyMP.js +11 -0
- package/dist/assets/html.worker-CL40hqKM.js +458 -0
- package/dist/assets/json.worker-6f9bhSHY.js +42 -0
- package/dist/assets/ts.worker-B6g3wjaE.js +37021 -0
- package/dist/azcli-CDMGhRmx.js +74 -0
- package/dist/bat-0Mk8aqzx.js +106 -0
- package/dist/bicep-BBi_I06Z.js +108 -0
- package/dist/cameligo-D0G_Zm6X.js +180 -0
- package/dist/clojure-o2ZKLeMp.js +767 -0
- package/dist/coffee-DOQff5VC.js +238 -0
- package/dist/cpp-CQGJnWhD.js +395 -0
- package/dist/csharp-C1jLsHl8.js +332 -0
- package/dist/csp-C_ttMQaW.js +59 -0
- package/dist/css-BC202kVV.js +193 -0
- package/dist/cssMode-B1EfCgI8.js +1541 -0
- package/dist/cypher-DwtEH7Fi.js +269 -0
- package/dist/dart-D9XknsP2.js +287 -0
- package/dist/dockerfile-DgsNjqqa.js +136 -0
- package/dist/ecl-BAMCHBl6.js +462 -0
- package/dist/elixir-CegIttP8.js +575 -0
- package/dist/favicon.ico +0 -0
- package/dist/flow9-9608t7UV.js +148 -0
- package/dist/freemarker2-h6KT8ady.js +995 -0
- package/dist/fsharp-CCtt9-1_.js +223 -0
- package/dist/go-CGUIPbct.js +224 -0
- package/dist/graphql-BNRIFFIn.js +157 -0
- package/dist/handlebars-BHZuehiC.js +425 -0
- package/dist/hcl-C__KLIXe.js +189 -0
- package/dist/html-6Ymm1XSw.js +314 -0
- package/dist/htmlMode-CAySWI08.js +1551 -0
- package/dist/index-BFqQeX1r.js +124463 -0
- package/dist/index-DmlyKQU2.js +150 -0
- package/dist/ini-CeKYn_zA.js +77 -0
- package/dist/java-Dm24deQl.js +238 -0
- package/dist/javascript-C6XEOgkR.js +76 -0
- package/dist/jsonMode-D68tkk9K.js +1957 -0
- package/dist/julia-BImNW7VE.js +517 -0
- package/dist/kotlin-BfE79GEb.js +259 -0
- package/dist/less-DglNOcaC.js +168 -0
- package/dist/lexon-BA0dRz9Q.js +163 -0
- package/dist/liquid-CU5E8KbZ.js +246 -0
- package/dist/lua-DMkWzJcm.js +168 -0
- package/dist/m3-sA-5shO8.js +216 -0
- package/dist/markdown-OYRB1igA.js +235 -0
- package/dist/mdx-BpgDRrDC.js +171 -0
- package/dist/mips-rRzkJ_7G.js +204 -0
- package/dist/msdax-DoVJdUhd.js +381 -0
- package/dist/mysql-Ty44IHXo.js +884 -0
- package/dist/objective-c-VUfyhYrA.js +189 -0
- package/dist/pascal-DkASiYyw.js +257 -0
- package/dist/pascaligo-p-ELPlVO.js +170 -0
- package/dist/perl-Cjl1FxLZ.js +632 -0
- package/dist/pgsql-DjVenF7s.js +857 -0
- package/dist/php-CwvGzZOO.js +506 -0
- package/dist/pla-Br1iaBIV.js +143 -0
- package/dist/postiats-BaeP8zZY.js +913 -0
- package/dist/powerquery-CLCshuo8.js +896 -0
- package/dist/powershell-CZV50w5N.js +245 -0
- package/dist/protobuf-MV3XTewJ.js +426 -0
- package/dist/pug-DkDg4c4l.js +408 -0
- package/dist/python-DtsYOFU9.js +282 -0
- package/dist/qsharp-BAtiKA97.js +291 -0
- package/dist/r-8ocrd-h-.js +249 -0
- package/dist/razor-74xZSF1p.js +556 -0
- package/dist/redis-9sZiddxc.js +308 -0
- package/dist/redshift-DQfTOGC0.js +815 -0
- package/dist/restructuredtext-DXU-vkgr.js +180 -0
- package/dist/ruby-DotfqwMf.js +517 -0
- package/dist/rust-BIauJ5KN.js +349 -0
- package/dist/sb-CmWMvDEV.js +121 -0
- package/dist/scala-C81brEbk.js +376 -0
- package/dist/scheme-D0pcFz2x.js +114 -0
- package/dist/scss-BOdN2fGG.js +268 -0
- package/dist/shell-6E09eAkU.js +227 -0
- package/dist/solidity-CWStzA1K.js +1373 -0
- package/dist/sophia-76Sb6CWe.js +205 -0
- package/dist/sparql-BmZTkOWT.js +207 -0
- package/dist/sql-Cs9TBAW5.js +859 -0
- package/dist/st-B-rqE1Bu.js +422 -0
- package/dist/style.css +1 -1
- package/dist/sun-form-v3.es.js +2 -39
- package/dist/sun-form-v3.umd.js +1909 -1
- package/dist/swift-Btsj6YxQ.js +318 -0
- package/dist/systemverilog-B3RHBRa2.js +582 -0
- package/dist/tcl-Dpj776pn.js +238 -0
- package/dist/tsMode-CEJACLKl.js +886 -0
- package/dist/twig-Bb9JmBsE.js +398 -0
- package/dist/typescript-IVLrzKMv.js +349 -0
- package/dist/typespec-CDWeg3SU.js +123 -0
- package/dist/vb-DEXnYwEI.js +378 -0
- package/dist/wgsl-D602c1lx.js +445 -0
- package/dist/xml-BZDLqqLQ.js +101 -0
- package/dist/yaml-Icb94D4j.js +212 -0
- package/package.json +15 -5
@@ -0,0 +1,332 @@
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
* Version: 0.49.0(383fdf3fc0e1e1a024068b8d0fd4f3dcbae74d04)
|
4
|
+
* Released under the MIT license
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
6
|
+
*-----------------------------------------------------------------------------*/
|
7
|
+
var e = {
|
8
|
+
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
9
|
+
comments: {
|
10
|
+
lineComment: "//",
|
11
|
+
blockComment: ["/*", "*/"]
|
12
|
+
},
|
13
|
+
brackets: [
|
14
|
+
["{", "}"],
|
15
|
+
["[", "]"],
|
16
|
+
["(", ")"]
|
17
|
+
],
|
18
|
+
autoClosingPairs: [
|
19
|
+
{ open: "{", close: "}" },
|
20
|
+
{ open: "[", close: "]" },
|
21
|
+
{ open: "(", close: ")" },
|
22
|
+
{ open: "'", close: "'", notIn: ["string", "comment"] },
|
23
|
+
{ open: '"', close: '"', notIn: ["string", "comment"] }
|
24
|
+
],
|
25
|
+
surroundingPairs: [
|
26
|
+
{ open: "{", close: "}" },
|
27
|
+
{ open: "[", close: "]" },
|
28
|
+
{ open: "(", close: ")" },
|
29
|
+
{ open: "<", close: ">" },
|
30
|
+
{ open: "'", close: "'" },
|
31
|
+
{ open: '"', close: '"' }
|
32
|
+
],
|
33
|
+
folding: {
|
34
|
+
markers: {
|
35
|
+
start: new RegExp("^\\s*#region\\b"),
|
36
|
+
end: new RegExp("^\\s*#endregion\\b")
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}, t = {
|
40
|
+
defaultToken: "",
|
41
|
+
tokenPostfix: ".cs",
|
42
|
+
brackets: [
|
43
|
+
{ open: "{", close: "}", token: "delimiter.curly" },
|
44
|
+
{ open: "[", close: "]", token: "delimiter.square" },
|
45
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" },
|
46
|
+
{ open: "<", close: ">", token: "delimiter.angle" }
|
47
|
+
],
|
48
|
+
keywords: [
|
49
|
+
"extern",
|
50
|
+
"alias",
|
51
|
+
"using",
|
52
|
+
"bool",
|
53
|
+
"decimal",
|
54
|
+
"sbyte",
|
55
|
+
"byte",
|
56
|
+
"short",
|
57
|
+
"ushort",
|
58
|
+
"int",
|
59
|
+
"uint",
|
60
|
+
"long",
|
61
|
+
"ulong",
|
62
|
+
"char",
|
63
|
+
"float",
|
64
|
+
"double",
|
65
|
+
"object",
|
66
|
+
"dynamic",
|
67
|
+
"string",
|
68
|
+
"assembly",
|
69
|
+
"is",
|
70
|
+
"as",
|
71
|
+
"ref",
|
72
|
+
"out",
|
73
|
+
"this",
|
74
|
+
"base",
|
75
|
+
"new",
|
76
|
+
"typeof",
|
77
|
+
"void",
|
78
|
+
"checked",
|
79
|
+
"unchecked",
|
80
|
+
"default",
|
81
|
+
"delegate",
|
82
|
+
"var",
|
83
|
+
"const",
|
84
|
+
"if",
|
85
|
+
"else",
|
86
|
+
"switch",
|
87
|
+
"case",
|
88
|
+
"while",
|
89
|
+
"do",
|
90
|
+
"for",
|
91
|
+
"foreach",
|
92
|
+
"in",
|
93
|
+
"break",
|
94
|
+
"continue",
|
95
|
+
"goto",
|
96
|
+
"return",
|
97
|
+
"throw",
|
98
|
+
"try",
|
99
|
+
"catch",
|
100
|
+
"finally",
|
101
|
+
"lock",
|
102
|
+
"yield",
|
103
|
+
"from",
|
104
|
+
"let",
|
105
|
+
"where",
|
106
|
+
"join",
|
107
|
+
"on",
|
108
|
+
"equals",
|
109
|
+
"into",
|
110
|
+
"orderby",
|
111
|
+
"ascending",
|
112
|
+
"descending",
|
113
|
+
"select",
|
114
|
+
"group",
|
115
|
+
"by",
|
116
|
+
"namespace",
|
117
|
+
"partial",
|
118
|
+
"class",
|
119
|
+
"field",
|
120
|
+
"event",
|
121
|
+
"method",
|
122
|
+
"param",
|
123
|
+
"public",
|
124
|
+
"protected",
|
125
|
+
"internal",
|
126
|
+
"private",
|
127
|
+
"abstract",
|
128
|
+
"sealed",
|
129
|
+
"static",
|
130
|
+
"struct",
|
131
|
+
"readonly",
|
132
|
+
"volatile",
|
133
|
+
"virtual",
|
134
|
+
"override",
|
135
|
+
"params",
|
136
|
+
"get",
|
137
|
+
"set",
|
138
|
+
"add",
|
139
|
+
"remove",
|
140
|
+
"operator",
|
141
|
+
"true",
|
142
|
+
"false",
|
143
|
+
"implicit",
|
144
|
+
"explicit",
|
145
|
+
"interface",
|
146
|
+
"enum",
|
147
|
+
"null",
|
148
|
+
"async",
|
149
|
+
"await",
|
150
|
+
"fixed",
|
151
|
+
"sizeof",
|
152
|
+
"stackalloc",
|
153
|
+
"unsafe",
|
154
|
+
"nameof",
|
155
|
+
"when"
|
156
|
+
],
|
157
|
+
namespaceFollows: ["namespace", "using"],
|
158
|
+
parenFollows: ["if", "for", "while", "switch", "foreach", "using", "catch", "when"],
|
159
|
+
operators: [
|
160
|
+
"=",
|
161
|
+
"??",
|
162
|
+
"||",
|
163
|
+
"&&",
|
164
|
+
"|",
|
165
|
+
"^",
|
166
|
+
"&",
|
167
|
+
"==",
|
168
|
+
"!=",
|
169
|
+
"<=",
|
170
|
+
">=",
|
171
|
+
"<<",
|
172
|
+
"+",
|
173
|
+
"-",
|
174
|
+
"*",
|
175
|
+
"/",
|
176
|
+
"%",
|
177
|
+
"!",
|
178
|
+
"~",
|
179
|
+
"++",
|
180
|
+
"--",
|
181
|
+
"+=",
|
182
|
+
"-=",
|
183
|
+
"*=",
|
184
|
+
"/=",
|
185
|
+
"%=",
|
186
|
+
"&=",
|
187
|
+
"|=",
|
188
|
+
"^=",
|
189
|
+
"<<=",
|
190
|
+
">>=",
|
191
|
+
">>",
|
192
|
+
"=>"
|
193
|
+
],
|
194
|
+
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
195
|
+
// escape sequences
|
196
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
197
|
+
// The main tokenizer for our languages
|
198
|
+
tokenizer: {
|
199
|
+
root: [
|
200
|
+
// identifiers and keywords
|
201
|
+
[
|
202
|
+
/\@?[a-zA-Z_]\w*/,
|
203
|
+
{
|
204
|
+
cases: {
|
205
|
+
"@namespaceFollows": {
|
206
|
+
token: "keyword.$0",
|
207
|
+
next: "@namespace"
|
208
|
+
},
|
209
|
+
"@keywords": {
|
210
|
+
token: "keyword.$0",
|
211
|
+
next: "@qualified"
|
212
|
+
},
|
213
|
+
"@default": { token: "identifier", next: "@qualified" }
|
214
|
+
}
|
215
|
+
}
|
216
|
+
],
|
217
|
+
// whitespace
|
218
|
+
{ include: "@whitespace" },
|
219
|
+
// delimiters and operators
|
220
|
+
[
|
221
|
+
/}/,
|
222
|
+
{
|
223
|
+
cases: {
|
224
|
+
"$S2==interpolatedstring": {
|
225
|
+
token: "string.quote",
|
226
|
+
next: "@pop"
|
227
|
+
},
|
228
|
+
"$S2==litinterpstring": {
|
229
|
+
token: "string.quote",
|
230
|
+
next: "@pop"
|
231
|
+
},
|
232
|
+
"@default": "@brackets"
|
233
|
+
}
|
234
|
+
}
|
235
|
+
],
|
236
|
+
[/[{}()\[\]]/, "@brackets"],
|
237
|
+
[/[<>](?!@symbols)/, "@brackets"],
|
238
|
+
[
|
239
|
+
/@symbols/,
|
240
|
+
{
|
241
|
+
cases: {
|
242
|
+
"@operators": "delimiter",
|
243
|
+
"@default": ""
|
244
|
+
}
|
245
|
+
}
|
246
|
+
],
|
247
|
+
// numbers
|
248
|
+
[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/, "number.float"],
|
249
|
+
[/0[xX][0-9a-fA-F_]+/, "number.hex"],
|
250
|
+
[/0[bB][01_]+/, "number.hex"],
|
251
|
+
// binary: use same theme style as hex
|
252
|
+
[/[0-9_]+/, "number"],
|
253
|
+
// delimiter: after number because of .\d floats
|
254
|
+
[/[;,.]/, "delimiter"],
|
255
|
+
// strings
|
256
|
+
[/"([^"\\]|\\.)*$/, "string.invalid"],
|
257
|
+
// non-teminated string
|
258
|
+
[/"/, { token: "string.quote", next: "@string" }],
|
259
|
+
[/\$\@"/, { token: "string.quote", next: "@litinterpstring" }],
|
260
|
+
[/\@"/, { token: "string.quote", next: "@litstring" }],
|
261
|
+
[/\$"/, { token: "string.quote", next: "@interpolatedstring" }],
|
262
|
+
// characters
|
263
|
+
[/'[^\\']'/, "string"],
|
264
|
+
[/(')(@escapes)(')/, ["string", "string.escape", "string"]],
|
265
|
+
[/'/, "string.invalid"]
|
266
|
+
],
|
267
|
+
qualified: [
|
268
|
+
[
|
269
|
+
/[a-zA-Z_][\w]*/,
|
270
|
+
{
|
271
|
+
cases: {
|
272
|
+
"@keywords": { token: "keyword.$0" },
|
273
|
+
"@default": "identifier"
|
274
|
+
}
|
275
|
+
}
|
276
|
+
],
|
277
|
+
[/\./, "delimiter"],
|
278
|
+
["", "", "@pop"]
|
279
|
+
],
|
280
|
+
namespace: [
|
281
|
+
{ include: "@whitespace" },
|
282
|
+
[/[A-Z]\w*/, "namespace"],
|
283
|
+
[/[\.=]/, "delimiter"],
|
284
|
+
["", "", "@pop"]
|
285
|
+
],
|
286
|
+
comment: [
|
287
|
+
[/[^\/*]+/, "comment"],
|
288
|
+
// [/\/\*/, 'comment', '@push' ], // no nested comments :-(
|
289
|
+
["\\*/", "comment", "@pop"],
|
290
|
+
[/[\/*]/, "comment"]
|
291
|
+
],
|
292
|
+
string: [
|
293
|
+
[/[^\\"]+/, "string"],
|
294
|
+
[/@escapes/, "string.escape"],
|
295
|
+
[/\\./, "string.escape.invalid"],
|
296
|
+
[/"/, { token: "string.quote", next: "@pop" }]
|
297
|
+
],
|
298
|
+
litstring: [
|
299
|
+
[/[^"]+/, "string"],
|
300
|
+
[/""/, "string.escape"],
|
301
|
+
[/"/, { token: "string.quote", next: "@pop" }]
|
302
|
+
],
|
303
|
+
litinterpstring: [
|
304
|
+
[/[^"{]+/, "string"],
|
305
|
+
[/""/, "string.escape"],
|
306
|
+
[/{{/, "string.escape"],
|
307
|
+
[/}}/, "string.escape"],
|
308
|
+
[/{/, { token: "string.quote", next: "root.litinterpstring" }],
|
309
|
+
[/"/, { token: "string.quote", next: "@pop" }]
|
310
|
+
],
|
311
|
+
interpolatedstring: [
|
312
|
+
[/[^\\"{]+/, "string"],
|
313
|
+
[/@escapes/, "string.escape"],
|
314
|
+
[/\\./, "string.escape.invalid"],
|
315
|
+
[/{{/, "string.escape"],
|
316
|
+
[/}}/, "string.escape"],
|
317
|
+
[/{/, { token: "string.quote", next: "root.interpolatedstring" }],
|
318
|
+
[/"/, { token: "string.quote", next: "@pop" }]
|
319
|
+
],
|
320
|
+
whitespace: [
|
321
|
+
[/^[ \t\v\f]*#((r)|(load))(?=\s)/, "directive.csx"],
|
322
|
+
[/^[ \t\v\f]*#\w.*$/, "namespace.cpp"],
|
323
|
+
[/[ \t\v\f\r\n]+/, ""],
|
324
|
+
[/\/\*/, "comment", "@comment"],
|
325
|
+
[/\/\/.*$/, "comment"]
|
326
|
+
]
|
327
|
+
}
|
328
|
+
};
|
329
|
+
export {
|
330
|
+
e as conf,
|
331
|
+
t as language
|
332
|
+
};
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
* Version: 0.49.0(383fdf3fc0e1e1a024068b8d0fd4f3dcbae74d04)
|
4
|
+
* Released under the MIT license
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
6
|
+
*-----------------------------------------------------------------------------*/
|
7
|
+
var t = {
|
8
|
+
brackets: [],
|
9
|
+
autoClosingPairs: [],
|
10
|
+
surroundingPairs: []
|
11
|
+
}, r = {
|
12
|
+
// Set defaultToken to invalid to see what you do not tokenize yet
|
13
|
+
// defaultToken: 'invalid',
|
14
|
+
keywords: [],
|
15
|
+
typeKeywords: [],
|
16
|
+
tokenPostfix: ".csp",
|
17
|
+
operators: [],
|
18
|
+
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
19
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
20
|
+
tokenizer: {
|
21
|
+
root: [
|
22
|
+
[/child-src/, "string.quote"],
|
23
|
+
[/connect-src/, "string.quote"],
|
24
|
+
[/default-src/, "string.quote"],
|
25
|
+
[/font-src/, "string.quote"],
|
26
|
+
[/frame-src/, "string.quote"],
|
27
|
+
[/img-src/, "string.quote"],
|
28
|
+
[/manifest-src/, "string.quote"],
|
29
|
+
[/media-src/, "string.quote"],
|
30
|
+
[/object-src/, "string.quote"],
|
31
|
+
[/script-src/, "string.quote"],
|
32
|
+
[/style-src/, "string.quote"],
|
33
|
+
[/worker-src/, "string.quote"],
|
34
|
+
[/base-uri/, "string.quote"],
|
35
|
+
[/plugin-types/, "string.quote"],
|
36
|
+
[/sandbox/, "string.quote"],
|
37
|
+
[/disown-opener/, "string.quote"],
|
38
|
+
[/form-action/, "string.quote"],
|
39
|
+
[/frame-ancestors/, "string.quote"],
|
40
|
+
[/report-uri/, "string.quote"],
|
41
|
+
[/report-to/, "string.quote"],
|
42
|
+
[/upgrade-insecure-requests/, "string.quote"],
|
43
|
+
[/block-all-mixed-content/, "string.quote"],
|
44
|
+
[/require-sri-for/, "string.quote"],
|
45
|
+
[/reflected-xss/, "string.quote"],
|
46
|
+
[/referrer/, "string.quote"],
|
47
|
+
[/policy-uri/, "string.quote"],
|
48
|
+
[/'self'/, "string.quote"],
|
49
|
+
[/'unsafe-inline'/, "string.quote"],
|
50
|
+
[/'unsafe-eval'/, "string.quote"],
|
51
|
+
[/'strict-dynamic'/, "string.quote"],
|
52
|
+
[/'unsafe-hashed-attributes'/, "string.quote"]
|
53
|
+
]
|
54
|
+
}
|
55
|
+
};
|
56
|
+
export {
|
57
|
+
t as conf,
|
58
|
+
r as language
|
59
|
+
};
|
@@ -0,0 +1,193 @@
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
* Version: 0.49.0(383fdf3fc0e1e1a024068b8d0fd4f3dcbae74d04)
|
4
|
+
* Released under the MIT license
|
5
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
6
|
+
*-----------------------------------------------------------------------------*/
|
7
|
+
var e = {
|
8
|
+
wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,
|
9
|
+
comments: {
|
10
|
+
blockComment: ["/*", "*/"]
|
11
|
+
},
|
12
|
+
brackets: [
|
13
|
+
["{", "}"],
|
14
|
+
["[", "]"],
|
15
|
+
["(", ")"]
|
16
|
+
],
|
17
|
+
autoClosingPairs: [
|
18
|
+
{ open: "{", close: "}", notIn: ["string", "comment"] },
|
19
|
+
{ open: "[", close: "]", notIn: ["string", "comment"] },
|
20
|
+
{ open: "(", close: ")", notIn: ["string", "comment"] },
|
21
|
+
{ open: '"', close: '"', notIn: ["string", "comment"] },
|
22
|
+
{ open: "'", close: "'", notIn: ["string", "comment"] }
|
23
|
+
],
|
24
|
+
surroundingPairs: [
|
25
|
+
{ open: "{", close: "}" },
|
26
|
+
{ open: "[", close: "]" },
|
27
|
+
{ open: "(", close: ")" },
|
28
|
+
{ open: '"', close: '"' },
|
29
|
+
{ open: "'", close: "'" }
|
30
|
+
],
|
31
|
+
folding: {
|
32
|
+
markers: {
|
33
|
+
start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
|
34
|
+
end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}, t = {
|
38
|
+
defaultToken: "",
|
39
|
+
tokenPostfix: ".css",
|
40
|
+
ws: `[
|
41
|
+
\r\f]*`,
|
42
|
+
// whitespaces (referenced in several rules)
|
43
|
+
identifier: "-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",
|
44
|
+
brackets: [
|
45
|
+
{ open: "{", close: "}", token: "delimiter.bracket" },
|
46
|
+
{ open: "[", close: "]", token: "delimiter.bracket" },
|
47
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" },
|
48
|
+
{ open: "<", close: ">", token: "delimiter.angle" }
|
49
|
+
],
|
50
|
+
tokenizer: {
|
51
|
+
root: [{ include: "@selector" }],
|
52
|
+
selector: [
|
53
|
+
{ include: "@comments" },
|
54
|
+
{ include: "@import" },
|
55
|
+
{ include: "@strings" },
|
56
|
+
[
|
57
|
+
"[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",
|
58
|
+
{ token: "keyword", next: "@keyframedeclaration" }
|
59
|
+
],
|
60
|
+
["[@](page|content|font-face|-moz-document)", { token: "keyword" }],
|
61
|
+
["[@](charset|namespace)", { token: "keyword", next: "@declarationbody" }],
|
62
|
+
[
|
63
|
+
"(url-prefix)(\\()",
|
64
|
+
["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
|
65
|
+
],
|
66
|
+
[
|
67
|
+
"(url)(\\()",
|
68
|
+
["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
|
69
|
+
],
|
70
|
+
{ include: "@selectorname" },
|
71
|
+
["[\\*]", "tag"],
|
72
|
+
// selector symbols
|
73
|
+
["[>\\+,]", "delimiter"],
|
74
|
+
// selector operators
|
75
|
+
["\\[", { token: "delimiter.bracket", next: "@selectorattribute" }],
|
76
|
+
["{", { token: "delimiter.bracket", next: "@selectorbody" }]
|
77
|
+
],
|
78
|
+
selectorbody: [
|
79
|
+
{ include: "@comments" },
|
80
|
+
["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))", "attribute.name", "@rulevalue"],
|
81
|
+
// rule definition: to distinguish from a nested selector check for whitespace, number or a semicolon
|
82
|
+
["}", { token: "delimiter.bracket", next: "@pop" }]
|
83
|
+
],
|
84
|
+
selectorname: [
|
85
|
+
["(\\.|#(?=[^{])|%|(@identifier)|:)+", "tag"]
|
86
|
+
// selector (.foo, div, ...)
|
87
|
+
],
|
88
|
+
selectorattribute: [{ include: "@term" }, ["]", { token: "delimiter.bracket", next: "@pop" }]],
|
89
|
+
term: [
|
90
|
+
{ include: "@comments" },
|
91
|
+
[
|
92
|
+
"(url-prefix)(\\()",
|
93
|
+
["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
|
94
|
+
],
|
95
|
+
[
|
96
|
+
"(url)(\\()",
|
97
|
+
["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
|
98
|
+
],
|
99
|
+
{ include: "@functioninvocation" },
|
100
|
+
{ include: "@numbers" },
|
101
|
+
{ include: "@name" },
|
102
|
+
{ include: "@strings" },
|
103
|
+
["([<>=\\+\\-\\*\\/\\^\\|\\~,])", "delimiter"],
|
104
|
+
[",", "delimiter"]
|
105
|
+
],
|
106
|
+
rulevalue: [
|
107
|
+
{ include: "@comments" },
|
108
|
+
{ include: "@strings" },
|
109
|
+
{ include: "@term" },
|
110
|
+
["!important", "keyword"],
|
111
|
+
[";", "delimiter", "@pop"],
|
112
|
+
["(?=})", { token: "", next: "@pop" }]
|
113
|
+
// missing semicolon
|
114
|
+
],
|
115
|
+
warndebug: [["[@](warn|debug)", { token: "keyword", next: "@declarationbody" }]],
|
116
|
+
import: [["[@](import)", { token: "keyword", next: "@declarationbody" }]],
|
117
|
+
urldeclaration: [
|
118
|
+
{ include: "@strings" },
|
119
|
+
[`[^)\r
|
120
|
+
]+`, "string"],
|
121
|
+
["\\)", { token: "delimiter.parenthesis", next: "@pop" }]
|
122
|
+
],
|
123
|
+
parenthizedterm: [
|
124
|
+
{ include: "@term" },
|
125
|
+
["\\)", { token: "delimiter.parenthesis", next: "@pop" }]
|
126
|
+
],
|
127
|
+
declarationbody: [
|
128
|
+
{ include: "@term" },
|
129
|
+
[";", "delimiter", "@pop"],
|
130
|
+
["(?=})", { token: "", next: "@pop" }]
|
131
|
+
// missing semicolon
|
132
|
+
],
|
133
|
+
comments: [
|
134
|
+
["\\/\\*", "comment", "@comment"],
|
135
|
+
["\\/\\/+.*", "comment"]
|
136
|
+
],
|
137
|
+
comment: [
|
138
|
+
["\\*\\/", "comment", "@pop"],
|
139
|
+
[/[^*/]+/, "comment"],
|
140
|
+
[/./, "comment"]
|
141
|
+
],
|
142
|
+
name: [["@identifier", "attribute.value"]],
|
143
|
+
numbers: [
|
144
|
+
["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?", { token: "attribute.value.number", next: "@units" }],
|
145
|
+
["#[0-9a-fA-F_]+(?!\\w)", "attribute.value.hex"]
|
146
|
+
],
|
147
|
+
units: [
|
148
|
+
[
|
149
|
+
"(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?",
|
150
|
+
"attribute.value.unit",
|
151
|
+
"@pop"
|
152
|
+
]
|
153
|
+
],
|
154
|
+
keyframedeclaration: [
|
155
|
+
["@identifier", "attribute.value"],
|
156
|
+
["{", { token: "delimiter.bracket", switchTo: "@keyframebody" }]
|
157
|
+
],
|
158
|
+
keyframebody: [
|
159
|
+
{ include: "@term" },
|
160
|
+
["{", { token: "delimiter.bracket", next: "@selectorbody" }],
|
161
|
+
["}", { token: "delimiter.bracket", next: "@pop" }]
|
162
|
+
],
|
163
|
+
functioninvocation: [
|
164
|
+
["@identifier\\(", { token: "attribute.value", next: "@functionarguments" }]
|
165
|
+
],
|
166
|
+
functionarguments: [
|
167
|
+
["\\$@identifier@ws:", "attribute.name"],
|
168
|
+
["[,]", "delimiter"],
|
169
|
+
{ include: "@term" },
|
170
|
+
["\\)", { token: "attribute.value", next: "@pop" }]
|
171
|
+
],
|
172
|
+
strings: [
|
173
|
+
['~?"', { token: "string", next: "@stringenddoublequote" }],
|
174
|
+
["~?'", { token: "string", next: "@stringendquote" }]
|
175
|
+
],
|
176
|
+
stringenddoublequote: [
|
177
|
+
["\\\\.", "string"],
|
178
|
+
['"', { token: "string", next: "@pop" }],
|
179
|
+
[/[^\\"]+/, "string"],
|
180
|
+
[".", "string"]
|
181
|
+
],
|
182
|
+
stringendquote: [
|
183
|
+
["\\\\.", "string"],
|
184
|
+
["'", { token: "string", next: "@pop" }],
|
185
|
+
[/[^\\']+/, "string"],
|
186
|
+
[".", "string"]
|
187
|
+
]
|
188
|
+
}
|
189
|
+
};
|
190
|
+
export {
|
191
|
+
e as conf,
|
192
|
+
t as language
|
193
|
+
};
|