@codingame/monaco-vscode-standalone-languages 23.2.1 → 23.2.2

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 (165) hide show
  1. package/_.contribution.js +48 -0
  2. package/abap/abap.contribution.js +8 -0
  3. package/abap/abap.js +1397 -0
  4. package/apex/apex.contribution.js +9 -0
  5. package/apex/apex.js +329 -0
  6. package/azcli/azcli.contribution.js +8 -0
  7. package/azcli/azcli.js +67 -0
  8. package/bat/bat.contribution.js +8 -0
  9. package/bat/bat.js +99 -0
  10. package/bicep/bicep.contribution.js +8 -0
  11. package/bicep/bicep.js +108 -0
  12. package/cameligo/cameligo.contribution.js +8 -0
  13. package/cameligo/cameligo.js +173 -0
  14. package/clojure/clojure.contribution.js +8 -0
  15. package/clojure/clojure.js +760 -0
  16. package/coffee/coffee.contribution.js +9 -0
  17. package/coffee/coffee.js +231 -0
  18. package/cpp/cpp.contribution.js +14 -0
  19. package/cpp/cpp.js +388 -0
  20. package/csharp/csharp.contribution.js +8 -0
  21. package/csharp/csharp.js +325 -0
  22. package/csp/csp.contribution.js +8 -0
  23. package/csp/csp.js +52 -0
  24. package/css/css.contribution.js +9 -0
  25. package/css/css.js +184 -0
  26. package/cypher/cypher.contribution.js +8 -0
  27. package/cypher/cypher.js +262 -0
  28. package/dart/dart.contribution.js +9 -0
  29. package/dart/dart.js +280 -0
  30. package/dockerfile/dockerfile.contribution.js +9 -0
  31. package/dockerfile/dockerfile.js +129 -0
  32. package/ecl/ecl.contribution.js +8 -0
  33. package/ecl/ecl.js +455 -0
  34. package/elixir/elixir.contribution.js +8 -0
  35. package/elixir/elixir.js +568 -0
  36. package/flow9/flow9.contribution.js +8 -0
  37. package/flow9/flow9.js +141 -0
  38. package/freemarker2/freemarker2.contribution.js +52 -0
  39. package/freemarker2/freemarker2.js +990 -0
  40. package/fsharp/fsharp.contribution.js +8 -0
  41. package/fsharp/fsharp.js +216 -0
  42. package/go/go.contribution.js +8 -0
  43. package/go/go.js +217 -0
  44. package/graphql/graphql.contribution.js +9 -0
  45. package/graphql/graphql.js +150 -0
  46. package/handlebars/handlebars.contribution.js +9 -0
  47. package/handlebars/handlebars.js +413 -0
  48. package/hcl/hcl.contribution.js +8 -0
  49. package/hcl/hcl.js +182 -0
  50. package/html/html.contribution.js +9 -0
  51. package/html/html.js +302 -0
  52. package/index.js +81 -48
  53. package/ini/ini.contribution.js +9 -0
  54. package/ini/ini.js +70 -0
  55. package/java/java.contribution.js +9 -0
  56. package/java/java.js +231 -0
  57. package/javascript/javascript.contribution.js +11 -0
  58. package/javascript/javascript.js +70 -0
  59. package/julia/julia.contribution.js +8 -0
  60. package/julia/julia.js +510 -0
  61. package/kotlin/kotlin.contribution.js +9 -0
  62. package/kotlin/kotlin.js +251 -0
  63. package/less/less.contribution.js +9 -0
  64. package/less/less.js +160 -0
  65. package/lexon/lexon.contribution.js +8 -0
  66. package/lexon/lexon.js +156 -0
  67. package/liquid/liquid.contribution.js +9 -0
  68. package/liquid/liquid.js +234 -0
  69. package/lua/lua.contribution.js +8 -0
  70. package/lua/lua.js +161 -0
  71. package/m3/m3.contribution.js +8 -0
  72. package/m3/m3.js +209 -0
  73. package/markdown/markdown.contribution.js +8 -0
  74. package/markdown/markdown.js +228 -0
  75. package/mdx/mdx.contribution.js +8 -0
  76. package/mdx/mdx.js +158 -0
  77. package/mips/mips.contribution.js +9 -0
  78. package/mips/mips.js +197 -0
  79. package/msdax/msdax.contribution.js +8 -0
  80. package/msdax/msdax.js +374 -0
  81. package/mysql/mysql.contribution.js +8 -0
  82. package/mysql/mysql.js +877 -0
  83. package/objective-c/objective-c.contribution.js +8 -0
  84. package/objective-c/objective-c.js +182 -0
  85. package/package.json +2 -2
  86. package/pascal/pascal.contribution.js +9 -0
  87. package/pascal/pascal.js +250 -0
  88. package/pascaligo/pascaligo.contribution.js +8 -0
  89. package/pascaligo/pascaligo.js +163 -0
  90. package/perl/perl.contribution.js +8 -0
  91. package/perl/perl.js +625 -0
  92. package/pgsql/pgsql.contribution.js +8 -0
  93. package/pgsql/pgsql.js +850 -0
  94. package/php/php.contribution.js +9 -0
  95. package/php/php.js +499 -0
  96. package/pla/pla.contribution.js +7 -0
  97. package/pla/pla.js +136 -0
  98. package/postiats/postiats.contribution.js +8 -0
  99. package/postiats/postiats.js +906 -0
  100. package/powerquery/powerquery.contribution.js +8 -0
  101. package/powerquery/powerquery.js +889 -0
  102. package/powershell/powershell.contribution.js +8 -0
  103. package/powershell/powershell.js +238 -0
  104. package/protobuf/protobuf.contribution.js +8 -0
  105. package/protobuf/protobuf.js +419 -0
  106. package/pug/pug.contribution.js +8 -0
  107. package/pug/pug.js +401 -0
  108. package/python/python.contribution.js +9 -0
  109. package/python/python.js +294 -0
  110. package/qsharp/qsharp.contribution.js +8 -0
  111. package/qsharp/qsharp.js +300 -0
  112. package/r/r.contribution.js +8 -0
  113. package/r/r.js +242 -0
  114. package/razor/razor.contribution.js +9 -0
  115. package/razor/razor.js +544 -0
  116. package/redis/redis.contribution.js +8 -0
  117. package/redis/redis.js +301 -0
  118. package/redshift/redshift.contribution.js +8 -0
  119. package/redshift/redshift.js +808 -0
  120. package/restructuredtext/restructuredtext.contribution.js +8 -0
  121. package/restructuredtext/restructuredtext.js +173 -0
  122. package/ruby/ruby.contribution.js +9 -0
  123. package/ruby/ruby.js +510 -0
  124. package/rust/rust.contribution.js +8 -0
  125. package/rust/rust.js +342 -0
  126. package/sb/sb.contribution.js +8 -0
  127. package/sb/sb.js +114 -0
  128. package/scala/scala.contribution.js +9 -0
  129. package/scala/scala.js +369 -0
  130. package/scheme/scheme.contribution.js +8 -0
  131. package/scheme/scheme.js +107 -0
  132. package/scss/scss.contribution.js +9 -0
  133. package/scss/scss.js +259 -0
  134. package/shell/shell.contribution.js +8 -0
  135. package/shell/shell.js +220 -0
  136. package/solidity/solidity.contribution.js +8 -0
  137. package/solidity/solidity.js +1366 -0
  138. package/sophia/sophia.contribution.js +8 -0
  139. package/sophia/sophia.js +198 -0
  140. package/sparql/sparql.contribution.js +8 -0
  141. package/sparql/sparql.js +200 -0
  142. package/sql/sql.contribution.js +8 -0
  143. package/sql/sql.js +852 -0
  144. package/st/st.contribution.js +8 -0
  145. package/st/st.js +415 -0
  146. package/swift/swift.contribution.js +9 -0
  147. package/swift/swift.js +311 -0
  148. package/systemverilog/systemverilog.contribution.js +14 -0
  149. package/systemverilog/systemverilog.js +575 -0
  150. package/tcl/tcl.contribution.js +8 -0
  151. package/tcl/tcl.js +231 -0
  152. package/twig/twig.contribution.js +9 -0
  153. package/twig/twig.js +391 -0
  154. package/typescript/typescript.contribution.js +11 -0
  155. package/typescript/typescript.js +336 -0
  156. package/typespec/typespec.contribution.js +8 -0
  157. package/typespec/typespec.js +126 -0
  158. package/vb/vb.contribution.js +8 -0
  159. package/vb/vb.js +371 -0
  160. package/wgsl/wgsl.contribution.js +8 -0
  161. package/wgsl/wgsl.js +452 -0
  162. package/xml/xml.contribution.js +28 -0
  163. package/xml/xml.js +88 -0
  164. package/yaml/yaml.contribution.js +9 -0
  165. package/yaml/yaml.js +199 -0
package/julia/julia.js ADDED
@@ -0,0 +1,510 @@
1
+ const conf = {
2
+ brackets: [
3
+ ["{", "}"],
4
+ ["[", "]"],
5
+ ["(", ")"]
6
+ ],
7
+ autoClosingPairs: [
8
+ { open: "{", close: "}" },
9
+ { open: "[", close: "]" },
10
+ { open: "(", close: ")" },
11
+ { open: '"', close: '"' },
12
+ { open: "'", close: "'" }
13
+ ],
14
+ surroundingPairs: [
15
+ { open: "{", close: "}" },
16
+ { open: "[", close: "]" },
17
+ { open: "(", close: ")" },
18
+ { open: '"', close: '"' },
19
+ { open: "'", close: "'" }
20
+ ]
21
+ };
22
+ const language = {
23
+ tokenPostfix: ".julia",
24
+ keywords: [
25
+ "begin",
26
+ "while",
27
+ "if",
28
+ "for",
29
+ "try",
30
+ "return",
31
+ "break",
32
+ "continue",
33
+ "function",
34
+ "macro",
35
+ "quote",
36
+ "let",
37
+ "local",
38
+ "global",
39
+ "const",
40
+ "do",
41
+ "struct",
42
+ "module",
43
+ "baremodule",
44
+ "using",
45
+ "import",
46
+ "export",
47
+ "end",
48
+ "else",
49
+ "elseif",
50
+ "catch",
51
+ "finally",
52
+ "mutable",
53
+ "primitive",
54
+ "abstract",
55
+ "type",
56
+ "in",
57
+ "isa",
58
+ "where",
59
+ "new"
60
+ ],
61
+ types: [
62
+ "LinRange",
63
+ "LineNumberNode",
64
+ "LinearIndices",
65
+ "LoadError",
66
+ "MIME",
67
+ "Matrix",
68
+ "Method",
69
+ "MethodError",
70
+ "Missing",
71
+ "MissingException",
72
+ "Module",
73
+ "NTuple",
74
+ "NamedTuple",
75
+ "Nothing",
76
+ "Number",
77
+ "OrdinalRange",
78
+ "OutOfMemoryError",
79
+ "OverflowError",
80
+ "Pair",
81
+ "PartialQuickSort",
82
+ "PermutedDimsArray",
83
+ "Pipe",
84
+ "Ptr",
85
+ "QuoteNode",
86
+ "Rational",
87
+ "RawFD",
88
+ "ReadOnlyMemoryError",
89
+ "Real",
90
+ "ReentrantLock",
91
+ "Ref",
92
+ "Regex",
93
+ "RegexMatch",
94
+ "RoundingMode",
95
+ "SegmentationFault",
96
+ "Set",
97
+ "Signed",
98
+ "Some",
99
+ "StackOverflowError",
100
+ "StepRange",
101
+ "StepRangeLen",
102
+ "StridedArray",
103
+ "StridedMatrix",
104
+ "StridedVecOrMat",
105
+ "StridedVector",
106
+ "String",
107
+ "StringIndexError",
108
+ "SubArray",
109
+ "SubString",
110
+ "SubstitutionString",
111
+ "Symbol",
112
+ "SystemError",
113
+ "Task",
114
+ "Text",
115
+ "TextDisplay",
116
+ "Timer",
117
+ "Tuple",
118
+ "Type",
119
+ "TypeError",
120
+ "TypeVar",
121
+ "UInt",
122
+ "UInt128",
123
+ "UInt16",
124
+ "UInt32",
125
+ "UInt64",
126
+ "UInt8",
127
+ "UndefInitializer",
128
+ "AbstractArray",
129
+ "UndefKeywordError",
130
+ "AbstractChannel",
131
+ "UndefRefError",
132
+ "AbstractChar",
133
+ "UndefVarError",
134
+ "AbstractDict",
135
+ "Union",
136
+ "AbstractDisplay",
137
+ "UnionAll",
138
+ "AbstractFloat",
139
+ "UnitRange",
140
+ "AbstractIrrational",
141
+ "Unsigned",
142
+ "AbstractMatrix",
143
+ "AbstractRange",
144
+ "Val",
145
+ "AbstractSet",
146
+ "Vararg",
147
+ "AbstractString",
148
+ "VecElement",
149
+ "AbstractUnitRange",
150
+ "VecOrMat",
151
+ "AbstractVecOrMat",
152
+ "Vector",
153
+ "AbstractVector",
154
+ "VersionNumber",
155
+ "Any",
156
+ "WeakKeyDict",
157
+ "ArgumentError",
158
+ "WeakRef",
159
+ "Array",
160
+ "AssertionError",
161
+ "BigFloat",
162
+ "BigInt",
163
+ "BitArray",
164
+ "BitMatrix",
165
+ "BitSet",
166
+ "BitVector",
167
+ "Bool",
168
+ "BoundsError",
169
+ "CapturedException",
170
+ "CartesianIndex",
171
+ "CartesianIndices",
172
+ "Cchar",
173
+ "Cdouble",
174
+ "Cfloat",
175
+ "Channel",
176
+ "Char",
177
+ "Cint",
178
+ "Cintmax_t",
179
+ "Clong",
180
+ "Clonglong",
181
+ "Cmd",
182
+ "Colon",
183
+ "Complex",
184
+ "ComplexF16",
185
+ "ComplexF32",
186
+ "ComplexF64",
187
+ "CompositeException",
188
+ "Condition",
189
+ "Cptrdiff_t",
190
+ "Cshort",
191
+ "Csize_t",
192
+ "Cssize_t",
193
+ "Cstring",
194
+ "Cuchar",
195
+ "Cuint",
196
+ "Cuintmax_t",
197
+ "Culong",
198
+ "Culonglong",
199
+ "Cushort",
200
+ "Cvoid",
201
+ "Cwchar_t",
202
+ "Cwstring",
203
+ "DataType",
204
+ "DenseArray",
205
+ "DenseMatrix",
206
+ "DenseVecOrMat",
207
+ "DenseVector",
208
+ "Dict",
209
+ "DimensionMismatch",
210
+ "Dims",
211
+ "DivideError",
212
+ "DomainError",
213
+ "EOFError",
214
+ "Enum",
215
+ "ErrorException",
216
+ "Exception",
217
+ "ExponentialBackOff",
218
+ "Expr",
219
+ "Float16",
220
+ "Float32",
221
+ "Float64",
222
+ "Function",
223
+ "GlobalRef",
224
+ "HTML",
225
+ "IO",
226
+ "IOBuffer",
227
+ "IOContext",
228
+ "IOStream",
229
+ "IdDict",
230
+ "IndexCartesian",
231
+ "IndexLinear",
232
+ "IndexStyle",
233
+ "InexactError",
234
+ "InitError",
235
+ "Int",
236
+ "Int128",
237
+ "Int16",
238
+ "Int32",
239
+ "Int64",
240
+ "Int8",
241
+ "Integer",
242
+ "InterruptException",
243
+ "InvalidStateException",
244
+ "Irrational",
245
+ "KeyError"
246
+ ],
247
+ keywordops: ["<:", ">:", ":", "=>", "...", ".", "->", "?"],
248
+ allops: /[^\w\d\s()\[\]{}"'#]+/,
249
+ constants: [
250
+ "true",
251
+ "false",
252
+ "nothing",
253
+ "missing",
254
+ "undef",
255
+ "Inf",
256
+ "pi",
257
+ "NaN",
258
+ "\u03C0",
259
+ "\u212F",
260
+ "ans",
261
+ "PROGRAM_FILE",
262
+ "ARGS",
263
+ "C_NULL",
264
+ "VERSION",
265
+ "DEPOT_PATH",
266
+ "LOAD_PATH"
267
+ ],
268
+ operators: [
269
+ "!",
270
+ "!=",
271
+ "!==",
272
+ "%",
273
+ "&",
274
+ "*",
275
+ "+",
276
+ "-",
277
+ "/",
278
+ "//",
279
+ "<",
280
+ "<<",
281
+ "<=",
282
+ "==",
283
+ "===",
284
+ "=>",
285
+ ">",
286
+ ">=",
287
+ ">>",
288
+ ">>>",
289
+ "\\",
290
+ "^",
291
+ "|",
292
+ "|>",
293
+ "~",
294
+ "\xF7",
295
+ "\u2208",
296
+ "\u2209",
297
+ "\u220B",
298
+ "\u220C",
299
+ "\u2218",
300
+ "\u221A",
301
+ "\u221B",
302
+ "\u2229",
303
+ "\u222A",
304
+ "\u2248",
305
+ "\u2249",
306
+ "\u2260",
307
+ "\u2261",
308
+ "\u2262",
309
+ "\u2264",
310
+ "\u2265",
311
+ "\u2286",
312
+ "\u2287",
313
+ "\u2288",
314
+ "\u2289",
315
+ "\u228A",
316
+ "\u228B",
317
+ "\u22BB"
318
+ ],
319
+ brackets: [
320
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
321
+ { open: "{", close: "}", token: "delimiter.curly" },
322
+ { open: "[", close: "]", token: "delimiter.square" }
323
+ ],
324
+ ident: /π|ℯ|\b(?!\d)\w+\b/,
325
+ // escape sequences
326
+ escape: /(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,
327
+ escapes: /\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,
328
+ // The main tokenizer for our languages
329
+ tokenizer: {
330
+ root: [
331
+ [/(::)\s*|\b(isa)\s+/, "keyword", "@typeanno"],
332
+ [/\b(isa)(\s*\(@ident\s*,\s*)/, ["keyword", { token: "", next: "@typeanno" }]],
333
+ [/\b(type|struct)[ \t]+/, "keyword", "@typeanno"],
334
+ // symbols
335
+ [/^\s*:@ident[!?]?/, "metatag"],
336
+ [/(return)(\s*:@ident[!?]?)/, ["keyword", "metatag"]],
337
+ [/(\(|\[|\{|@allops)(\s*:@ident[!?]?)/, ["", "metatag"]],
338
+ [/:\(/, "metatag", "@quote"],
339
+ // regular expressions
340
+ [/r"""/, "regexp.delim", "@tregexp"],
341
+ [/r"/, "regexp.delim", "@sregexp"],
342
+ // strings
343
+ [/raw"""/, "string.delim", "@rtstring"],
344
+ [/[bv]?"""/, "string.delim", "@dtstring"],
345
+ [/raw"/, "string.delim", "@rsstring"],
346
+ [/[bv]?"/, "string.delim", "@dsstring"],
347
+ [
348
+ /(@ident)\{/,
349
+ {
350
+ cases: {
351
+ "$1@types": { token: "type", next: "@gen" },
352
+ "@default": { token: "type", next: "@gen" }
353
+ }
354
+ }
355
+ ],
356
+ [
357
+ /@ident[!?'']?(?=\.?\()/,
358
+ {
359
+ cases: {
360
+ "@types": "type",
361
+ "@keywords": "keyword",
362
+ "@constants": "variable",
363
+ "@default": "keyword.flow"
364
+ }
365
+ }
366
+ ],
367
+ [
368
+ /@ident[!?']?/,
369
+ {
370
+ cases: {
371
+ "@types": "type",
372
+ "@keywords": "keyword",
373
+ "@constants": "variable",
374
+ "@default": "identifier"
375
+ }
376
+ }
377
+ ],
378
+ [/\$\w+/, "key"],
379
+ [/\$\(/, "key", "@paste"],
380
+ [/@@@ident/, "annotation"],
381
+ // whitespace
382
+ { include: "@whitespace" },
383
+ // characters
384
+ [/'(?:@escapes|.)'/, "string.character"],
385
+ // delimiters and operators
386
+ [/[()\[\]{}]/, "@brackets"],
387
+ [
388
+ /@allops/,
389
+ {
390
+ cases: {
391
+ "@keywordops": "keyword",
392
+ "@operators": "operator"
393
+ }
394
+ }
395
+ ],
396
+ [/[;,]/, "delimiter"],
397
+ // numbers
398
+ [/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/, "number.hex"],
399
+ [/0[_oO][0-7](_?[0-7])*/, "number.octal"],
400
+ [/0[bB][01](_?[01])*/, "number.binary"],
401
+ [/[+\-]?\d+(\.\d+)?(im?|[eE][+\-]?\d+(\.\d+)?)?/, "number"]
402
+ ],
403
+ // type
404
+ typeanno: [
405
+ [/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/, "type", "@gen"],
406
+ [/([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(\s*<:\s*)/, ["type", "keyword"]],
407
+ [/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/, "type", "@pop"],
408
+ ["", "", "@pop"]
409
+ ],
410
+ // generic type
411
+ gen: [
412
+ [/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/, "type", "@push"],
413
+ [/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/, "type"],
414
+ [/<:/, "keyword"],
415
+ [/(\})(\s*<:\s*)/, ["type", { token: "keyword", next: "@pop" }]],
416
+ [/\}/, "type", "@pop"],
417
+ { include: "@root" }
418
+ ],
419
+ // $(...)
420
+ quote: [
421
+ [/\$\(/, "key", "@paste"],
422
+ [/\(/, "@brackets", "@paren"],
423
+ [/\)/, "metatag", "@pop"],
424
+ { include: "@root" }
425
+ ],
426
+ // :(...)
427
+ paste: [
428
+ [/:\(/, "metatag", "@quote"],
429
+ [/\(/, "@brackets", "@paren"],
430
+ [/\)/, "key", "@pop"],
431
+ { include: "@root" }
432
+ ],
433
+ // (...)
434
+ paren: [
435
+ [/\$\(/, "key", "@paste"],
436
+ [/:\(/, "metatag", "@quote"],
437
+ [/\(/, "@brackets", "@push"],
438
+ [/\)/, "@brackets", "@pop"],
439
+ { include: "@root" }
440
+ ],
441
+ // r"egex string"
442
+ sregexp: [
443
+ [/^.*/, "invalid"],
444
+ [/[^\\"()\[\]{}]/, "regexp"],
445
+ [/[()\[\]{}]/, "@brackets"],
446
+ [/\\./, "operator.scss"],
447
+ [/"[imsx]*/, "regexp.delim", "@pop"]
448
+ ],
449
+ tregexp: [
450
+ [/[^\\"()\[\]{}]/, "regexp"],
451
+ [/[()\[\]{}]/, "@brackets"],
452
+ [/\\./, "operator.scss"],
453
+ [/"(?!"")/, "string"],
454
+ [/"""[imsx]*/, "regexp.delim", "@pop"]
455
+ ],
456
+ // raw"string"
457
+ rsstring: [
458
+ [/^.*/, "invalid"],
459
+ [/[^\\"]/, "string"],
460
+ [/\\./, "string.escape"],
461
+ [/"/, "string.delim", "@pop"]
462
+ ],
463
+ rtstring: [
464
+ [/[^\\"]/, "string"],
465
+ [/\\./, "string.escape"],
466
+ [/"(?!"")/, "string"],
467
+ [/"""/, "string.delim", "@pop"]
468
+ ],
469
+ // "string".
470
+ dsstring: [
471
+ [/^.*/, "invalid"],
472
+ [/[^\\"\$]/, "string"],
473
+ [/\$/, "", "@interpolated"],
474
+ [/@escapes/, "string.escape"],
475
+ [/\\./, "string.escape.invalid"],
476
+ [/"/, "string.delim", "@pop"]
477
+ ],
478
+ dtstring: [
479
+ [/[^\\"\$]/, "string"],
480
+ [/\$/, "", "@interpolated"],
481
+ [/@escapes/, "string.escape"],
482
+ [/\\./, "string.escape.invalid"],
483
+ [/"(?!"")/, "string"],
484
+ [/"""/, "string.delim", "@pop"]
485
+ ],
486
+ // interpolated sequence
487
+ interpolated: [
488
+ [/\(/, { token: "", switchTo: "@interpolated_compound" }],
489
+ [/[a-zA-Z_]\w*/, "identifier"],
490
+ ["", "", "@pop"]
491
+ // just a $ is interpreted as a $
492
+ ],
493
+ // any code
494
+ interpolated_compound: [[/\)/, "", "@pop"], { include: "@root" }],
495
+ // whitespace & comments
496
+ whitespace: [
497
+ [/[ \t\r\n]+/, ""],
498
+ [/#=/, "comment", "@multi_comment"],
499
+ [/#.*$/, "comment"]
500
+ ],
501
+ multi_comment: [
502
+ [/#=/, "comment", "@push"],
503
+ [/=#/, "comment", "@pop"],
504
+ [/=(?!#)|#(?!=)/, "comment"],
505
+ [/[^#=]+/, "comment"]
506
+ ]
507
+ }
508
+ };
509
+
510
+ export { conf, language };
@@ -0,0 +1,9 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "kotlin",
5
+ extensions: [".kt", ".kts"],
6
+ aliases: ["Kotlin", "kotlin"],
7
+ mimetypes: ["text/x-kotlin-source", "text/x-kotlin"],
8
+ loader: () => import('./kotlin.js')
9
+ });