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