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,632 @@
|
|
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
|
+
comments: {
|
9
|
+
lineComment: "#"
|
10
|
+
},
|
11
|
+
brackets: [
|
12
|
+
["{", "}"],
|
13
|
+
["[", "]"],
|
14
|
+
["(", ")"]
|
15
|
+
],
|
16
|
+
autoClosingPairs: [
|
17
|
+
{ open: "{", close: "}" },
|
18
|
+
{ open: "[", close: "]" },
|
19
|
+
{ open: "(", close: ")" },
|
20
|
+
{ open: '"', close: '"' },
|
21
|
+
{ open: "'", close: "'" },
|
22
|
+
{ open: "`", close: "`" }
|
23
|
+
],
|
24
|
+
surroundingPairs: [
|
25
|
+
{ open: "{", close: "}" },
|
26
|
+
{ open: "[", close: "]" },
|
27
|
+
{ open: "(", close: ")" },
|
28
|
+
{ open: '"', close: '"' },
|
29
|
+
{ open: "'", close: "'" },
|
30
|
+
{ open: "`", close: "`" }
|
31
|
+
]
|
32
|
+
}, t = {
|
33
|
+
defaultToken: "",
|
34
|
+
tokenPostfix: ".perl",
|
35
|
+
brackets: [
|
36
|
+
{ token: "delimiter.bracket", open: "{", close: "}" },
|
37
|
+
{ token: "delimiter.parenthesis", open: "(", close: ")" },
|
38
|
+
{ token: "delimiter.square", open: "[", close: "]" }
|
39
|
+
],
|
40
|
+
// https://learn.perl.org/docs/keywords.html
|
41
|
+
// Perl syntax
|
42
|
+
keywords: [
|
43
|
+
"__DATA__",
|
44
|
+
"else",
|
45
|
+
"lock",
|
46
|
+
"__END__",
|
47
|
+
"elsif",
|
48
|
+
"lt",
|
49
|
+
"__FILE__",
|
50
|
+
"eq",
|
51
|
+
"__LINE__",
|
52
|
+
"exp",
|
53
|
+
"ne",
|
54
|
+
"sub",
|
55
|
+
"__PACKAGE__",
|
56
|
+
"for",
|
57
|
+
"no",
|
58
|
+
"and",
|
59
|
+
"foreach",
|
60
|
+
"or",
|
61
|
+
"unless",
|
62
|
+
"cmp",
|
63
|
+
"ge",
|
64
|
+
"package",
|
65
|
+
"until",
|
66
|
+
"continue",
|
67
|
+
"gt",
|
68
|
+
"while",
|
69
|
+
"CORE",
|
70
|
+
"if",
|
71
|
+
"xor",
|
72
|
+
"do",
|
73
|
+
"le",
|
74
|
+
"__DIE__",
|
75
|
+
"__WARN__"
|
76
|
+
],
|
77
|
+
// Perl functions
|
78
|
+
builtinFunctions: [
|
79
|
+
"-A",
|
80
|
+
"END",
|
81
|
+
"length",
|
82
|
+
"setpgrp",
|
83
|
+
"-B",
|
84
|
+
"endgrent",
|
85
|
+
"link",
|
86
|
+
"setpriority",
|
87
|
+
"-b",
|
88
|
+
"endhostent",
|
89
|
+
"listen",
|
90
|
+
"setprotoent",
|
91
|
+
"-C",
|
92
|
+
"endnetent",
|
93
|
+
"local",
|
94
|
+
"setpwent",
|
95
|
+
"-c",
|
96
|
+
"endprotoent",
|
97
|
+
"localtime",
|
98
|
+
"setservent",
|
99
|
+
"-d",
|
100
|
+
"endpwent",
|
101
|
+
"log",
|
102
|
+
"setsockopt",
|
103
|
+
"-e",
|
104
|
+
"endservent",
|
105
|
+
"lstat",
|
106
|
+
"shift",
|
107
|
+
"-f",
|
108
|
+
"eof",
|
109
|
+
"map",
|
110
|
+
"shmctl",
|
111
|
+
"-g",
|
112
|
+
"eval",
|
113
|
+
"mkdir",
|
114
|
+
"shmget",
|
115
|
+
"-k",
|
116
|
+
"exec",
|
117
|
+
"msgctl",
|
118
|
+
"shmread",
|
119
|
+
"-l",
|
120
|
+
"exists",
|
121
|
+
"msgget",
|
122
|
+
"shmwrite",
|
123
|
+
"-M",
|
124
|
+
"exit",
|
125
|
+
"msgrcv",
|
126
|
+
"shutdown",
|
127
|
+
"-O",
|
128
|
+
"fcntl",
|
129
|
+
"msgsnd",
|
130
|
+
"sin",
|
131
|
+
"-o",
|
132
|
+
"fileno",
|
133
|
+
"my",
|
134
|
+
"sleep",
|
135
|
+
"-p",
|
136
|
+
"flock",
|
137
|
+
"next",
|
138
|
+
"socket",
|
139
|
+
"-r",
|
140
|
+
"fork",
|
141
|
+
"not",
|
142
|
+
"socketpair",
|
143
|
+
"-R",
|
144
|
+
"format",
|
145
|
+
"oct",
|
146
|
+
"sort",
|
147
|
+
"-S",
|
148
|
+
"formline",
|
149
|
+
"open",
|
150
|
+
"splice",
|
151
|
+
"-s",
|
152
|
+
"getc",
|
153
|
+
"opendir",
|
154
|
+
"split",
|
155
|
+
"-T",
|
156
|
+
"getgrent",
|
157
|
+
"ord",
|
158
|
+
"sprintf",
|
159
|
+
"-t",
|
160
|
+
"getgrgid",
|
161
|
+
"our",
|
162
|
+
"sqrt",
|
163
|
+
"-u",
|
164
|
+
"getgrnam",
|
165
|
+
"pack",
|
166
|
+
"srand",
|
167
|
+
"-w",
|
168
|
+
"gethostbyaddr",
|
169
|
+
"pipe",
|
170
|
+
"stat",
|
171
|
+
"-W",
|
172
|
+
"gethostbyname",
|
173
|
+
"pop",
|
174
|
+
"state",
|
175
|
+
"-X",
|
176
|
+
"gethostent",
|
177
|
+
"pos",
|
178
|
+
"study",
|
179
|
+
"-x",
|
180
|
+
"getlogin",
|
181
|
+
"print",
|
182
|
+
"substr",
|
183
|
+
"-z",
|
184
|
+
"getnetbyaddr",
|
185
|
+
"printf",
|
186
|
+
"symlink",
|
187
|
+
"abs",
|
188
|
+
"getnetbyname",
|
189
|
+
"prototype",
|
190
|
+
"syscall",
|
191
|
+
"accept",
|
192
|
+
"getnetent",
|
193
|
+
"push",
|
194
|
+
"sysopen",
|
195
|
+
"alarm",
|
196
|
+
"getpeername",
|
197
|
+
"quotemeta",
|
198
|
+
"sysread",
|
199
|
+
"atan2",
|
200
|
+
"getpgrp",
|
201
|
+
"rand",
|
202
|
+
"sysseek",
|
203
|
+
"AUTOLOAD",
|
204
|
+
"getppid",
|
205
|
+
"read",
|
206
|
+
"system",
|
207
|
+
"BEGIN",
|
208
|
+
"getpriority",
|
209
|
+
"readdir",
|
210
|
+
"syswrite",
|
211
|
+
"bind",
|
212
|
+
"getprotobyname",
|
213
|
+
"readline",
|
214
|
+
"tell",
|
215
|
+
"binmode",
|
216
|
+
"getprotobynumber",
|
217
|
+
"readlink",
|
218
|
+
"telldir",
|
219
|
+
"bless",
|
220
|
+
"getprotoent",
|
221
|
+
"readpipe",
|
222
|
+
"tie",
|
223
|
+
"break",
|
224
|
+
"getpwent",
|
225
|
+
"recv",
|
226
|
+
"tied",
|
227
|
+
"caller",
|
228
|
+
"getpwnam",
|
229
|
+
"redo",
|
230
|
+
"time",
|
231
|
+
"chdir",
|
232
|
+
"getpwuid",
|
233
|
+
"ref",
|
234
|
+
"times",
|
235
|
+
"CHECK",
|
236
|
+
"getservbyname",
|
237
|
+
"rename",
|
238
|
+
"truncate",
|
239
|
+
"chmod",
|
240
|
+
"getservbyport",
|
241
|
+
"require",
|
242
|
+
"uc",
|
243
|
+
"chomp",
|
244
|
+
"getservent",
|
245
|
+
"reset",
|
246
|
+
"ucfirst",
|
247
|
+
"chop",
|
248
|
+
"getsockname",
|
249
|
+
"return",
|
250
|
+
"umask",
|
251
|
+
"chown",
|
252
|
+
"getsockopt",
|
253
|
+
"reverse",
|
254
|
+
"undef",
|
255
|
+
"chr",
|
256
|
+
"glob",
|
257
|
+
"rewinddir",
|
258
|
+
"UNITCHECK",
|
259
|
+
"chroot",
|
260
|
+
"gmtime",
|
261
|
+
"rindex",
|
262
|
+
"unlink",
|
263
|
+
"close",
|
264
|
+
"goto",
|
265
|
+
"rmdir",
|
266
|
+
"unpack",
|
267
|
+
"closedir",
|
268
|
+
"grep",
|
269
|
+
"say",
|
270
|
+
"unshift",
|
271
|
+
"connect",
|
272
|
+
"hex",
|
273
|
+
"scalar",
|
274
|
+
"untie",
|
275
|
+
"cos",
|
276
|
+
"index",
|
277
|
+
"seek",
|
278
|
+
"use",
|
279
|
+
"crypt",
|
280
|
+
"INIT",
|
281
|
+
"seekdir",
|
282
|
+
"utime",
|
283
|
+
"dbmclose",
|
284
|
+
"int",
|
285
|
+
"select",
|
286
|
+
"values",
|
287
|
+
"dbmopen",
|
288
|
+
"ioctl",
|
289
|
+
"semctl",
|
290
|
+
"vec",
|
291
|
+
"defined",
|
292
|
+
"join",
|
293
|
+
"semget",
|
294
|
+
"wait",
|
295
|
+
"delete",
|
296
|
+
"keys",
|
297
|
+
"semop",
|
298
|
+
"waitpid",
|
299
|
+
"DESTROY",
|
300
|
+
"kill",
|
301
|
+
"send",
|
302
|
+
"wantarray",
|
303
|
+
"die",
|
304
|
+
"last",
|
305
|
+
"setgrent",
|
306
|
+
"warn",
|
307
|
+
"dump",
|
308
|
+
"lc",
|
309
|
+
"sethostent",
|
310
|
+
"write",
|
311
|
+
"each",
|
312
|
+
"lcfirst",
|
313
|
+
"setnetent"
|
314
|
+
],
|
315
|
+
// File handlers
|
316
|
+
builtinFileHandlers: ["ARGV", "STDERR", "STDOUT", "ARGVOUT", "STDIN", "ENV"],
|
317
|
+
// Perl variables
|
318
|
+
builtinVariables: [
|
319
|
+
"$!",
|
320
|
+
"$^RE_TRIE_MAXBUF",
|
321
|
+
"$LAST_REGEXP_CODE_RESULT",
|
322
|
+
'$"',
|
323
|
+
"$^S",
|
324
|
+
"$LIST_SEPARATOR",
|
325
|
+
"$#",
|
326
|
+
"$^T",
|
327
|
+
"$MATCH",
|
328
|
+
"$$",
|
329
|
+
"$^TAINT",
|
330
|
+
"$MULTILINE_MATCHING",
|
331
|
+
"$%",
|
332
|
+
"$^UNICODE",
|
333
|
+
"$NR",
|
334
|
+
"$&",
|
335
|
+
"$^UTF8LOCALE",
|
336
|
+
"$OFMT",
|
337
|
+
"$'",
|
338
|
+
"$^V",
|
339
|
+
"$OFS",
|
340
|
+
"$(",
|
341
|
+
"$^W",
|
342
|
+
"$ORS",
|
343
|
+
"$)",
|
344
|
+
"$^WARNING_BITS",
|
345
|
+
"$OS_ERROR",
|
346
|
+
"$*",
|
347
|
+
"$^WIDE_SYSTEM_CALLS",
|
348
|
+
"$OSNAME",
|
349
|
+
"$+",
|
350
|
+
"$^X",
|
351
|
+
"$OUTPUT_AUTO_FLUSH",
|
352
|
+
"$,",
|
353
|
+
"$_",
|
354
|
+
"$OUTPUT_FIELD_SEPARATOR",
|
355
|
+
"$-",
|
356
|
+
"$`",
|
357
|
+
"$OUTPUT_RECORD_SEPARATOR",
|
358
|
+
"$.",
|
359
|
+
"$a",
|
360
|
+
"$PERL_VERSION",
|
361
|
+
"$/",
|
362
|
+
"$ACCUMULATOR",
|
363
|
+
"$PERLDB",
|
364
|
+
"$0",
|
365
|
+
"$ARG",
|
366
|
+
"$PID",
|
367
|
+
"$:",
|
368
|
+
"$ARGV",
|
369
|
+
"$POSTMATCH",
|
370
|
+
"$;",
|
371
|
+
"$b",
|
372
|
+
"$PREMATCH",
|
373
|
+
"$<",
|
374
|
+
"$BASETIME",
|
375
|
+
"$PROCESS_ID",
|
376
|
+
"$=",
|
377
|
+
"$CHILD_ERROR",
|
378
|
+
"$PROGRAM_NAME",
|
379
|
+
"$>",
|
380
|
+
"$COMPILING",
|
381
|
+
"$REAL_GROUP_ID",
|
382
|
+
"$?",
|
383
|
+
"$DEBUGGING",
|
384
|
+
"$REAL_USER_ID",
|
385
|
+
"$@",
|
386
|
+
"$EFFECTIVE_GROUP_ID",
|
387
|
+
"$RS",
|
388
|
+
"$[",
|
389
|
+
"$EFFECTIVE_USER_ID",
|
390
|
+
"$SUBSCRIPT_SEPARATOR",
|
391
|
+
"$\\",
|
392
|
+
"$EGID",
|
393
|
+
"$SUBSEP",
|
394
|
+
"$]",
|
395
|
+
"$ERRNO",
|
396
|
+
"$SYSTEM_FD_MAX",
|
397
|
+
"$^",
|
398
|
+
"$EUID",
|
399
|
+
"$UID",
|
400
|
+
"$^A",
|
401
|
+
"$EVAL_ERROR",
|
402
|
+
"$WARNING",
|
403
|
+
"$^C",
|
404
|
+
"$EXCEPTIONS_BEING_CAUGHT",
|
405
|
+
"$|",
|
406
|
+
"$^CHILD_ERROR_NATIVE",
|
407
|
+
"$EXECUTABLE_NAME",
|
408
|
+
"$~",
|
409
|
+
"$^D",
|
410
|
+
"$EXTENDED_OS_ERROR",
|
411
|
+
"%!",
|
412
|
+
"$^E",
|
413
|
+
"$FORMAT_FORMFEED",
|
414
|
+
"%^H",
|
415
|
+
"$^ENCODING",
|
416
|
+
"$FORMAT_LINE_BREAK_CHARACTERS",
|
417
|
+
"%ENV",
|
418
|
+
"$^F",
|
419
|
+
"$FORMAT_LINES_LEFT",
|
420
|
+
"%INC",
|
421
|
+
"$^H",
|
422
|
+
"$FORMAT_LINES_PER_PAGE",
|
423
|
+
"%OVERLOAD",
|
424
|
+
"$^I",
|
425
|
+
"$FORMAT_NAME",
|
426
|
+
"%SIG",
|
427
|
+
"$^L",
|
428
|
+
"$FORMAT_PAGE_NUMBER",
|
429
|
+
"@+",
|
430
|
+
"$^M",
|
431
|
+
"$FORMAT_TOP_NAME",
|
432
|
+
"@-",
|
433
|
+
"$^N",
|
434
|
+
"$GID",
|
435
|
+
"@_",
|
436
|
+
"$^O",
|
437
|
+
"$INPLACE_EDIT",
|
438
|
+
"@ARGV",
|
439
|
+
"$^OPEN",
|
440
|
+
"$INPUT_LINE_NUMBER",
|
441
|
+
"@INC",
|
442
|
+
"$^P",
|
443
|
+
"$INPUT_RECORD_SEPARATOR",
|
444
|
+
"@LAST_MATCH_START",
|
445
|
+
"$^R",
|
446
|
+
"$LAST_MATCH_END",
|
447
|
+
"$^RE_DEBUG_FLAGS",
|
448
|
+
"$LAST_PAREN_MATCH"
|
449
|
+
],
|
450
|
+
// operators
|
451
|
+
symbols: /[:+\-\^*$&%@=<>!?|\/~\.]/,
|
452
|
+
quoteLikeOps: ["qr", "m", "s", "q", "qq", "qx", "qw", "tr", "y"],
|
453
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
454
|
+
// The main tokenizer for our languages
|
455
|
+
tokenizer: {
|
456
|
+
root: [
|
457
|
+
{ include: "@whitespace" },
|
458
|
+
[
|
459
|
+
/[a-zA-Z\-_][\w\-_]*/,
|
460
|
+
{
|
461
|
+
cases: {
|
462
|
+
"@keywords": "keyword",
|
463
|
+
"@builtinFunctions": "type.identifier",
|
464
|
+
"@builtinFileHandlers": "variable.predefined",
|
465
|
+
"@quoteLikeOps": {
|
466
|
+
token: "@rematch",
|
467
|
+
next: "quotedConstructs"
|
468
|
+
},
|
469
|
+
"@default": ""
|
470
|
+
}
|
471
|
+
}
|
472
|
+
],
|
473
|
+
// Perl variables
|
474
|
+
[
|
475
|
+
/[\$@%][*@#?\+\-\$!\w\\\^><~:;\.]+/,
|
476
|
+
{
|
477
|
+
cases: {
|
478
|
+
"@builtinVariables": "variable.predefined",
|
479
|
+
"@default": "variable"
|
480
|
+
}
|
481
|
+
}
|
482
|
+
],
|
483
|
+
{ include: "@strings" },
|
484
|
+
{ include: "@dblStrings" },
|
485
|
+
// Perl Doc
|
486
|
+
{ include: "@perldoc" },
|
487
|
+
// Here Doc
|
488
|
+
{ include: "@heredoc" },
|
489
|
+
[/[{}\[\]()]/, "@brackets"],
|
490
|
+
// RegExp
|
491
|
+
[/[\/](?:(?:\[(?:\\]|[^\]])+\])|(?:\\\/|[^\]\/]))*[\/]\w*\s*(?=[).,;]|$)/, "regexp"],
|
492
|
+
[/@symbols/, "operators"],
|
493
|
+
{ include: "@numbers" },
|
494
|
+
[/[,;]/, "delimiter"]
|
495
|
+
],
|
496
|
+
whitespace: [
|
497
|
+
[/\s+/, "white"],
|
498
|
+
[/(^#!.*$)/, "metatag"],
|
499
|
+
[/(^#.*$)/, "comment"]
|
500
|
+
],
|
501
|
+
numbers: [
|
502
|
+
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
|
503
|
+
[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, "number.hex"],
|
504
|
+
[/\d+/, "number"]
|
505
|
+
],
|
506
|
+
// Single quote string
|
507
|
+
strings: [[/'/, "string", "@stringBody"]],
|
508
|
+
stringBody: [
|
509
|
+
[/'/, "string", "@popall"],
|
510
|
+
[/\\'/, "string.escape"],
|
511
|
+
[/./, "string"]
|
512
|
+
],
|
513
|
+
// Double quote string
|
514
|
+
dblStrings: [[/"/, "string", "@dblStringBody"]],
|
515
|
+
dblStringBody: [
|
516
|
+
[/"/, "string", "@popall"],
|
517
|
+
[/@escapes/, "string.escape"],
|
518
|
+
[/\\./, "string.escape.invalid"],
|
519
|
+
{ include: "@variables" },
|
520
|
+
[/./, "string"]
|
521
|
+
],
|
522
|
+
// Quoted constructs
|
523
|
+
// Percent strings in Ruby are similar to quote-like operators in Perl.
|
524
|
+
// This is adapted from pstrings in ../ruby/ruby.ts.
|
525
|
+
quotedConstructs: [
|
526
|
+
[/(q|qw|tr|y)\s*\(/, { token: "string.delim", switchTo: "@qstring.(.)" }],
|
527
|
+
[/(q|qw|tr|y)\s*\[/, { token: "string.delim", switchTo: "@qstring.[.]" }],
|
528
|
+
[/(q|qw|tr|y)\s*\{/, { token: "string.delim", switchTo: "@qstring.{.}" }],
|
529
|
+
[/(q|qw|tr|y)\s*</, { token: "string.delim", switchTo: "@qstring.<.>" }],
|
530
|
+
[/(q|qw|tr|y)#/, { token: "string.delim", switchTo: "@qstring.#.#" }],
|
531
|
+
[/(q|qw|tr|y)\s*([^A-Za-z0-9#\s])/, { token: "string.delim", switchTo: "@qstring.$2.$2" }],
|
532
|
+
[/(q|qw|tr|y)\s+(\w)/, { token: "string.delim", switchTo: "@qstring.$2.$2" }],
|
533
|
+
[/(qr|m|s)\s*\(/, { token: "regexp.delim", switchTo: "@qregexp.(.)" }],
|
534
|
+
[/(qr|m|s)\s*\[/, { token: "regexp.delim", switchTo: "@qregexp.[.]" }],
|
535
|
+
[/(qr|m|s)\s*\{/, { token: "regexp.delim", switchTo: "@qregexp.{.}" }],
|
536
|
+
[/(qr|m|s)\s*</, { token: "regexp.delim", switchTo: "@qregexp.<.>" }],
|
537
|
+
[/(qr|m|s)#/, { token: "regexp.delim", switchTo: "@qregexp.#.#" }],
|
538
|
+
[/(qr|m|s)\s*([^A-Za-z0-9_#\s])/, { token: "regexp.delim", switchTo: "@qregexp.$2.$2" }],
|
539
|
+
[/(qr|m|s)\s+(\w)/, { token: "regexp.delim", switchTo: "@qregexp.$2.$2" }],
|
540
|
+
[/(qq|qx)\s*\(/, { token: "string.delim", switchTo: "@qqstring.(.)" }],
|
541
|
+
[/(qq|qx)\s*\[/, { token: "string.delim", switchTo: "@qqstring.[.]" }],
|
542
|
+
[/(qq|qx)\s*\{/, { token: "string.delim", switchTo: "@qqstring.{.}" }],
|
543
|
+
[/(qq|qx)\s*</, { token: "string.delim", switchTo: "@qqstring.<.>" }],
|
544
|
+
[/(qq|qx)#/, { token: "string.delim", switchTo: "@qqstring.#.#" }],
|
545
|
+
[/(qq|qx)\s*([^A-Za-z0-9#\s])/, { token: "string.delim", switchTo: "@qqstring.$2.$2" }],
|
546
|
+
[/(qq|qx)\s+(\w)/, { token: "string.delim", switchTo: "@qqstring.$2.$2" }]
|
547
|
+
],
|
548
|
+
// Non-expanded quoted string
|
549
|
+
// qstring<open>.<close>
|
550
|
+
// open = open delimiter
|
551
|
+
// close = close delimiter
|
552
|
+
qstring: [
|
553
|
+
[/\\./, "string.escape"],
|
554
|
+
[
|
555
|
+
/./,
|
556
|
+
{
|
557
|
+
cases: {
|
558
|
+
"$#==$S3": { token: "string.delim", next: "@pop" },
|
559
|
+
"$#==$S2": { token: "string.delim", next: "@push" },
|
560
|
+
// nested delimiters
|
561
|
+
"@default": "string"
|
562
|
+
}
|
563
|
+
}
|
564
|
+
]
|
565
|
+
],
|
566
|
+
// Quoted regexp
|
567
|
+
// qregexp.<open>.<close>
|
568
|
+
// open = open delimiter
|
569
|
+
// close = close delimiter
|
570
|
+
qregexp: [
|
571
|
+
{ include: "@variables" },
|
572
|
+
[/\\./, "regexp.escape"],
|
573
|
+
[
|
574
|
+
/./,
|
575
|
+
{
|
576
|
+
cases: {
|
577
|
+
"$#==$S3": {
|
578
|
+
token: "regexp.delim",
|
579
|
+
next: "@regexpModifiers"
|
580
|
+
},
|
581
|
+
"$#==$S2": { token: "regexp.delim", next: "@push" },
|
582
|
+
// nested delimiters
|
583
|
+
"@default": "regexp"
|
584
|
+
}
|
585
|
+
}
|
586
|
+
]
|
587
|
+
],
|
588
|
+
regexpModifiers: [[/[msixpodualngcer]+/, { token: "regexp.modifier", next: "@popall" }]],
|
589
|
+
// Expanded quoted string
|
590
|
+
// qqstring.<open>.<close>
|
591
|
+
// open = open delimiter
|
592
|
+
// close = close delimiter
|
593
|
+
qqstring: [{ include: "@variables" }, { include: "@qstring" }],
|
594
|
+
heredoc: [
|
595
|
+
[/<<\s*['"`]?([\w\-]+)['"`]?/, { token: "string.heredoc.delimiter", next: "@heredocBody.$1" }]
|
596
|
+
],
|
597
|
+
heredocBody: [
|
598
|
+
[
|
599
|
+
/^([\w\-]+)$/,
|
600
|
+
{
|
601
|
+
cases: {
|
602
|
+
"$1==$S2": [
|
603
|
+
{
|
604
|
+
token: "string.heredoc.delimiter",
|
605
|
+
next: "@popall"
|
606
|
+
}
|
607
|
+
],
|
608
|
+
"@default": "string.heredoc"
|
609
|
+
}
|
610
|
+
}
|
611
|
+
],
|
612
|
+
[/./, "string.heredoc"]
|
613
|
+
],
|
614
|
+
perldoc: [[/^=\w/, "comment.doc", "@perldocBody"]],
|
615
|
+
perldocBody: [
|
616
|
+
[/^=cut\b/, "type.identifier", "@popall"],
|
617
|
+
[/./, "comment.doc"]
|
618
|
+
],
|
619
|
+
variables: [
|
620
|
+
[/\$\w+/, "variable"],
|
621
|
+
// scalar
|
622
|
+
[/@\w+/, "variable"],
|
623
|
+
// array
|
624
|
+
[/%\w+/, "variable"]
|
625
|
+
// key/value
|
626
|
+
]
|
627
|
+
}
|
628
|
+
};
|
629
|
+
export {
|
630
|
+
e as conf,
|
631
|
+
t as language
|
632
|
+
};
|