@codingame/monaco-vscode-standalone-languages 23.1.1 → 23.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 (165) hide show
  1. package/index.js +48 -82
  2. package/package.json +2 -2
  3. package/_.contribution.js +0 -74
  4. package/abap/abap.contribution.js +0 -19
  5. package/abap/abap.js +0 -1406
  6. package/apex/apex.contribution.js +0 -20
  7. package/apex/apex.js +0 -338
  8. package/azcli/azcli.contribution.js +0 -19
  9. package/azcli/azcli.js +0 -76
  10. package/bat/bat.contribution.js +0 -19
  11. package/bat/bat.js +0 -108
  12. package/bicep/bicep.contribution.js +0 -19
  13. package/bicep/bicep.js +0 -117
  14. package/cameligo/cameligo.contribution.js +0 -19
  15. package/cameligo/cameligo.js +0 -182
  16. package/clojure/clojure.contribution.js +0 -19
  17. package/clojure/clojure.js +0 -769
  18. package/coffee/coffee.contribution.js +0 -20
  19. package/coffee/coffee.js +0 -240
  20. package/cpp/cpp.contribution.js +0 -29
  21. package/cpp/cpp.js +0 -397
  22. package/csharp/csharp.contribution.js +0 -19
  23. package/csharp/csharp.js +0 -334
  24. package/csp/csp.contribution.js +0 -19
  25. package/csp/csp.js +0 -61
  26. package/css/css.contribution.js +0 -20
  27. package/css/css.js +0 -193
  28. package/cypher/cypher.contribution.js +0 -19
  29. package/cypher/cypher.js +0 -271
  30. package/dart/dart.contribution.js +0 -20
  31. package/dart/dart.js +0 -289
  32. package/dockerfile/dockerfile.contribution.js +0 -20
  33. package/dockerfile/dockerfile.js +0 -138
  34. package/ecl/ecl.contribution.js +0 -19
  35. package/ecl/ecl.js +0 -464
  36. package/elixir/elixir.contribution.js +0 -19
  37. package/elixir/elixir.js +0 -577
  38. package/flow9/flow9.contribution.js +0 -19
  39. package/flow9/flow9.js +0 -150
  40. package/freemarker2/freemarker2.contribution.js +0 -73
  41. package/freemarker2/freemarker2.js +0 -1016
  42. package/fsharp/fsharp.contribution.js +0 -19
  43. package/fsharp/fsharp.js +0 -225
  44. package/go/go.contribution.js +0 -19
  45. package/go/go.js +0 -226
  46. package/graphql/graphql.contribution.js +0 -20
  47. package/graphql/graphql.js +0 -159
  48. package/handlebars/handlebars.contribution.js +0 -20
  49. package/handlebars/handlebars.js +0 -439
  50. package/hcl/hcl.contribution.js +0 -19
  51. package/hcl/hcl.js +0 -191
  52. package/html/html.contribution.js +0 -20
  53. package/html/html.js +0 -328
  54. package/ini/ini.contribution.js +0 -20
  55. package/ini/ini.js +0 -79
  56. package/java/java.contribution.js +0 -20
  57. package/java/java.js +0 -240
  58. package/javascript/javascript.contribution.js +0 -22
  59. package/javascript/javascript.js +0 -77
  60. package/julia/julia.contribution.js +0 -19
  61. package/julia/julia.js +0 -519
  62. package/kotlin/kotlin.contribution.js +0 -20
  63. package/kotlin/kotlin.js +0 -261
  64. package/less/less.contribution.js +0 -20
  65. package/less/less.js +0 -169
  66. package/lexon/lexon.contribution.js +0 -19
  67. package/lexon/lexon.js +0 -165
  68. package/liquid/liquid.contribution.js +0 -20
  69. package/liquid/liquid.js +0 -260
  70. package/lua/lua.contribution.js +0 -19
  71. package/lua/lua.js +0 -170
  72. package/m3/m3.contribution.js +0 -19
  73. package/m3/m3.js +0 -218
  74. package/markdown/markdown.contribution.js +0 -19
  75. package/markdown/markdown.js +0 -237
  76. package/mdx/mdx.contribution.js +0 -19
  77. package/mdx/mdx.js +0 -184
  78. package/mips/mips.contribution.js +0 -20
  79. package/mips/mips.js +0 -206
  80. package/msdax/msdax.contribution.js +0 -19
  81. package/msdax/msdax.js +0 -383
  82. package/mysql/mysql.contribution.js +0 -19
  83. package/mysql/mysql.js +0 -886
  84. package/objective-c/objective-c.contribution.js +0 -19
  85. package/objective-c/objective-c.js +0 -191
  86. package/pascal/pascal.contribution.js +0 -20
  87. package/pascal/pascal.js +0 -259
  88. package/pascaligo/pascaligo.contribution.js +0 -19
  89. package/pascaligo/pascaligo.js +0 -172
  90. package/perl/perl.contribution.js +0 -19
  91. package/perl/perl.js +0 -634
  92. package/pgsql/pgsql.contribution.js +0 -19
  93. package/pgsql/pgsql.js +0 -859
  94. package/php/php.contribution.js +0 -20
  95. package/php/php.js +0 -508
  96. package/pla/pla.contribution.js +0 -18
  97. package/pla/pla.js +0 -145
  98. package/postiats/postiats.contribution.js +0 -19
  99. package/postiats/postiats.js +0 -915
  100. package/powerquery/powerquery.contribution.js +0 -19
  101. package/powerquery/powerquery.js +0 -898
  102. package/powershell/powershell.contribution.js +0 -19
  103. package/powershell/powershell.js +0 -247
  104. package/protobuf/protobuf.contribution.js +0 -19
  105. package/protobuf/protobuf.js +0 -428
  106. package/pug/pug.contribution.js +0 -19
  107. package/pug/pug.js +0 -410
  108. package/python/python.contribution.js +0 -20
  109. package/python/python.js +0 -320
  110. package/qsharp/qsharp.contribution.js +0 -19
  111. package/qsharp/qsharp.js +0 -309
  112. package/r/r.contribution.js +0 -19
  113. package/r/r.js +0 -251
  114. package/razor/razor.contribution.js +0 -20
  115. package/razor/razor.js +0 -570
  116. package/redis/redis.contribution.js +0 -19
  117. package/redis/redis.js +0 -310
  118. package/redshift/redshift.contribution.js +0 -19
  119. package/redshift/redshift.js +0 -817
  120. package/restructuredtext/restructuredtext.contribution.js +0 -19
  121. package/restructuredtext/restructuredtext.js +0 -182
  122. package/ruby/ruby.contribution.js +0 -20
  123. package/ruby/ruby.js +0 -519
  124. package/rust/rust.contribution.js +0 -19
  125. package/rust/rust.js +0 -351
  126. package/sb/sb.contribution.js +0 -19
  127. package/sb/sb.js +0 -123
  128. package/scala/scala.contribution.js +0 -20
  129. package/scala/scala.js +0 -378
  130. package/scheme/scheme.contribution.js +0 -19
  131. package/scheme/scheme.js +0 -116
  132. package/scss/scss.contribution.js +0 -20
  133. package/scss/scss.js +0 -268
  134. package/shell/shell.contribution.js +0 -19
  135. package/shell/shell.js +0 -229
  136. package/solidity/solidity.contribution.js +0 -19
  137. package/solidity/solidity.js +0 -1375
  138. package/sophia/sophia.contribution.js +0 -19
  139. package/sophia/sophia.js +0 -207
  140. package/sparql/sparql.contribution.js +0 -19
  141. package/sparql/sparql.js +0 -209
  142. package/sql/sql.contribution.js +0 -19
  143. package/sql/sql.js +0 -861
  144. package/st/st.contribution.js +0 -19
  145. package/st/st.js +0 -424
  146. package/swift/swift.contribution.js +0 -20
  147. package/swift/swift.js +0 -320
  148. package/systemverilog/systemverilog.contribution.js +0 -29
  149. package/systemverilog/systemverilog.js +0 -584
  150. package/tcl/tcl.contribution.js +0 -19
  151. package/tcl/tcl.js +0 -240
  152. package/twig/twig.contribution.js +0 -20
  153. package/twig/twig.js +0 -400
  154. package/typescript/typescript.contribution.js +0 -20
  155. package/typescript/typescript.js +0 -362
  156. package/typespec/typespec.contribution.js +0 -19
  157. package/typespec/typespec.js +0 -135
  158. package/vb/vb.contribution.js +0 -19
  159. package/vb/vb.js +0 -380
  160. package/wgsl/wgsl.contribution.js +0 -19
  161. package/wgsl/wgsl.js +0 -461
  162. package/xml/xml.contribution.js +0 -39
  163. package/xml/xml.js +0 -114
  164. package/yaml/yaml.contribution.js +0 -20
  165. package/yaml/yaml.js +0 -225
package/ruby/ruby.js DELETED
@@ -1,519 +0,0 @@
1
- /*!-----------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Version: 0.54.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/ruby/ruby.ts
10
- var conf = {
11
- comments: {
12
- lineComment: "#",
13
- blockComment: ["=begin", "=end"]
14
- },
15
- brackets: [
16
- ["(", ")"],
17
- ["{", "}"],
18
- ["[", "]"]
19
- ],
20
- autoClosingPairs: [
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
- ],
34
- indentationRules: {
35
- increaseIndentPattern: new RegExp(
36
- `^\\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)*(#.*)?$`
37
- ),
38
- decreaseIndentPattern: new RegExp(
39
- "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)"
40
- )
41
- }
42
- };
43
- var language = {
44
- tokenPostfix: ".ruby",
45
- keywords: [
46
- "__LINE__",
47
- "__ENCODING__",
48
- "__FILE__",
49
- "BEGIN",
50
- "END",
51
- "alias",
52
- "and",
53
- "begin",
54
- "break",
55
- "case",
56
- "class",
57
- "def",
58
- "defined?",
59
- "do",
60
- "else",
61
- "elsif",
62
- "end",
63
- "ensure",
64
- "for",
65
- "false",
66
- "if",
67
- "in",
68
- "module",
69
- "next",
70
- "nil",
71
- "not",
72
- "or",
73
- "redo",
74
- "rescue",
75
- "retry",
76
- "return",
77
- "self",
78
- "super",
79
- "then",
80
- "true",
81
- "undef",
82
- "unless",
83
- "until",
84
- "when",
85
- "while",
86
- "yield"
87
- ],
88
- keywordops: ["::", "..", "...", "?", ":", "=>"],
89
- builtins: [
90
- "require",
91
- "public",
92
- "private",
93
- "include",
94
- "extend",
95
- "attr_reader",
96
- "protected",
97
- "private_class_method",
98
- "protected_class_method",
99
- "new"
100
- ],
101
- // these are closed by 'end' (if, while and until are handled separately)
102
- declarations: [
103
- "module",
104
- "class",
105
- "def",
106
- "case",
107
- "do",
108
- "begin",
109
- "for",
110
- "if",
111
- "while",
112
- "until",
113
- "unless"
114
- ],
115
- linedecls: ["def", "case", "do", "begin", "for", "if", "while", "until", "unless"],
116
- operators: [
117
- "^",
118
- "&",
119
- "|",
120
- "<=>",
121
- "==",
122
- "===",
123
- "!~",
124
- "=~",
125
- ">",
126
- ">=",
127
- "<",
128
- "<=",
129
- "<<",
130
- ">>",
131
- "+",
132
- "-",
133
- "*",
134
- "/",
135
- "%",
136
- "**",
137
- "~",
138
- "+@",
139
- "-@",
140
- "[]",
141
- "[]=",
142
- "`",
143
- "+=",
144
- "-=",
145
- "*=",
146
- "**=",
147
- "/=",
148
- "^=",
149
- "%=",
150
- "<<=",
151
- ">>=",
152
- "&=",
153
- "&&=",
154
- "||=",
155
- "|="
156
- ],
157
- brackets: [
158
- { open: "(", close: ")", token: "delimiter.parenthesis" },
159
- { open: "{", close: "}", token: "delimiter.curly" },
160
- { open: "[", close: "]", token: "delimiter.square" }
161
- ],
162
- // we include these common regular expressions
163
- symbols: /[=><!~?:&|+\-*\/\^%\.]+/,
164
- // escape sequences
165
- escape: /(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,
166
- escapes: /\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,
167
- decpart: /\d(_?\d)*/,
168
- decimal: /0|@decpart/,
169
- delim: /[^a-zA-Z0-9\s\n\r]/,
170
- heredelim: /(?:\w+|'[^']*'|"[^"]*"|`[^`]*`)/,
171
- regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
172
- regexpesc: /\\(?:[AzZbBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})?/,
173
- // The main tokenizer for our languages
174
- tokenizer: {
175
- // Main entry.
176
- // root.<decl> where decl is the current opening declaration (like 'class')
177
- root: [
178
- // identifiers and keywords
179
- // most complexity here is due to matching 'end' correctly with declarations.
180
- // We distinguish a declaration that comes first on a line, versus declarations further on a line (which are most likey modifiers)
181
- [
182
- /^(\s*)([a-z_]\w*[!?=]?)/,
183
- [
184
- "white",
185
- {
186
- cases: {
187
- "for|until|while": {
188
- token: "keyword.$2",
189
- next: "@dodecl.$2"
190
- },
191
- "@declarations": {
192
- token: "keyword.$2",
193
- next: "@root.$2"
194
- },
195
- end: { token: "keyword.$S2", next: "@pop" },
196
- "@keywords": "keyword",
197
- "@builtins": "predefined",
198
- "@default": "identifier"
199
- }
200
- }
201
- ]
202
- ],
203
- [
204
- /[a-z_]\w*[!?=]?/,
205
- {
206
- cases: {
207
- "if|unless|while|until": {
208
- token: "keyword.$0x",
209
- next: "@modifier.$0x"
210
- },
211
- for: { token: "keyword.$2", next: "@dodecl.$2" },
212
- "@linedecls": { token: "keyword.$0", next: "@root.$0" },
213
- end: { token: "keyword.$S2", next: "@pop" },
214
- "@keywords": "keyword",
215
- "@builtins": "predefined",
216
- "@default": "identifier"
217
- }
218
- }
219
- ],
220
- [/[A-Z][\w]*[!?=]?/, "constructor.identifier"],
221
- // constant
222
- [/\$[\w]*/, "global.constant"],
223
- // global
224
- [/@[\w]*/, "namespace.instance.identifier"],
225
- // instance
226
- [/@@@[\w]*/, "namespace.class.identifier"],
227
- // class
228
- // here document
229
- [/<<[-~](@heredelim).*/, { token: "string.heredoc.delimiter", next: "@heredoc.$1" }],
230
- [/[ \t\r\n]+<<(@heredelim).*/, { token: "string.heredoc.delimiter", next: "@heredoc.$1" }],
231
- [/^<<(@heredelim).*/, { token: "string.heredoc.delimiter", next: "@heredoc.$1" }],
232
- // whitespace
233
- { include: "@whitespace" },
234
- // strings
235
- [/"/, { token: "string.d.delim", next: '@dstring.d."' }],
236
- [/'/, { token: "string.sq.delim", next: "@sstring.sq" }],
237
- // % literals. For efficiency, rematch in the 'pstring' state
238
- [/%([rsqxwW]|Q?)/, { token: "@rematch", next: "pstring" }],
239
- // commands and symbols
240
- [/`/, { token: "string.x.delim", next: "@dstring.x.`" }],
241
- [/:(\w|[$@])\w*[!?=]?/, "string.s"],
242
- [/:"/, { token: "string.s.delim", next: '@dstring.s."' }],
243
- [/:'/, { token: "string.s.delim", next: "@sstring.s" }],
244
- // regular expressions. Lookahead for a (not escaped) closing forwardslash on the same line
245
- [/\/(?=(\\\/|[^\/\n])+\/)/, { token: "regexp.delim", next: "@regexp" }],
246
- // delimiters and operators
247
- [/[{}()\[\]]/, "@brackets"],
248
- [
249
- /@symbols/,
250
- {
251
- cases: {
252
- "@keywordops": "keyword",
253
- "@operators": "operator",
254
- "@default": ""
255
- }
256
- }
257
- ],
258
- [/[;,]/, "delimiter"],
259
- // numbers
260
- [/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/, "number.hex"],
261
- [/0[_oO][0-7](_?[0-7])*/, "number.octal"],
262
- [/0[bB][01](_?[01])*/, "number.binary"],
263
- [/0[dD]@decpart/, "number"],
264
- [
265
- /@decimal((\.@decpart)?([eE][\-+]?@decpart)?)/,
266
- {
267
- cases: {
268
- $1: "number.float",
269
- "@default": "number"
270
- }
271
- }
272
- ]
273
- ],
274
- // used to not treat a 'do' as a block opener if it occurs on the same
275
- // line as a 'do' statement: 'while|until|for'
276
- // dodecl.<decl> where decl is the declarations started, like 'while'
277
- dodecl: [
278
- [/^/, { token: "", switchTo: "@root.$S2" }],
279
- // get out of do-skipping mode on a new line
280
- [
281
- /[a-z_]\w*[!?=]?/,
282
- {
283
- cases: {
284
- end: { token: "keyword.$S2", next: "@pop" },
285
- // end on same line
286
- do: { token: "keyword", switchTo: "@root.$S2" },
287
- // do on same line: not an open bracket here
288
- "@linedecls": {
289
- token: "@rematch",
290
- switchTo: "@root.$S2"
291
- },
292
- // other declaration on same line: rematch
293
- "@keywords": "keyword",
294
- "@builtins": "predefined",
295
- "@default": "identifier"
296
- }
297
- }
298
- ],
299
- { include: "@root" }
300
- ],
301
- // used to prevent potential modifiers ('if|until|while|unless') to match
302
- // with 'end' keywords.
303
- // modifier.<decl>x where decl is the declaration starter, like 'if'
304
- modifier: [
305
- [/^/, "", "@pop"],
306
- // it was a modifier: get out of modifier mode on a new line
307
- [
308
- /[a-z_]\w*[!?=]?/,
309
- {
310
- cases: {
311
- end: { token: "keyword.$S2", next: "@pop" },
312
- // end on same line
313
- "then|else|elsif|do": {
314
- token: "keyword",
315
- switchTo: "@root.$S2"
316
- },
317
- // real declaration and not a modifier
318
- "@linedecls": {
319
- token: "@rematch",
320
- switchTo: "@root.$S2"
321
- },
322
- // other declaration => not a modifier
323
- "@keywords": "keyword",
324
- "@builtins": "predefined",
325
- "@default": "identifier"
326
- }
327
- }
328
- ],
329
- { include: "@root" }
330
- ],
331
- // single quote strings (also used for symbols)
332
- // sstring.<kind> where kind is 'sq' (single quote) or 's' (symbol)
333
- sstring: [
334
- [/[^\\']+/, "string.$S2"],
335
- [/\\\\|\\'|\\$/, "string.$S2.escape"],
336
- [/\\./, "string.$S2.invalid"],
337
- [/'/, { token: "string.$S2.delim", next: "@pop" }]
338
- ],
339
- // double quoted "string".
340
- // dstring.<kind>.<delim> where kind is 'd' (double quoted), 'x' (command), or 's' (symbol)
341
- // and delim is the ending delimiter (" or `)
342
- dstring: [
343
- [/[^\\`"#]+/, "string.$S2"],
344
- [/#/, "string.$S2.escape", "@interpolated"],
345
- [/\\$/, "string.$S2.escape"],
346
- [/@escapes/, "string.$S2.escape"],
347
- [/\\./, "string.$S2.escape.invalid"],
348
- [
349
- /[`"]/,
350
- {
351
- cases: {
352
- "$#==$S3": { token: "string.$S2.delim", next: "@pop" },
353
- "@default": "string.$S2"
354
- }
355
- }
356
- ]
357
- ],
358
- // literal documents
359
- // heredoc.<close> where close is the closing delimiter
360
- heredoc: [
361
- [
362
- /^(\s*)(@heredelim)$/,
363
- {
364
- cases: {
365
- "$2==$S2": ["string.heredoc", { token: "string.heredoc.delimiter", next: "@pop" }],
366
- "@default": ["string.heredoc", "string.heredoc"]
367
- }
368
- }
369
- ],
370
- [/.*/, "string.heredoc"]
371
- ],
372
- // interpolated sequence
373
- interpolated: [
374
- [/\$\w*/, "global.constant", "@pop"],
375
- [/@\w*/, "namespace.class.identifier", "@pop"],
376
- [/@@@\w*/, "namespace.instance.identifier", "@pop"],
377
- [
378
- /[{]/,
379
- {
380
- token: "string.escape.curly",
381
- switchTo: "@interpolated_compound"
382
- }
383
- ],
384
- ["", "", "@pop"]
385
- // just a # is interpreted as a #
386
- ],
387
- // any code
388
- interpolated_compound: [
389
- [/[}]/, { token: "string.escape.curly", next: "@pop" }],
390
- { include: "@root" }
391
- ],
392
- // %r quoted regexp
393
- // pregexp.<open>.<close> where open/close are the open/close delimiter
394
- pregexp: [
395
- { include: "@whitespace" },
396
- // turns out that you can quote using regex control characters, aargh!
397
- // for example; %r|kgjgaj| is ok (even though | is used for alternation)
398
- // so, we need to match those first
399
- [
400
- /[^\(\{\[\\]/,
401
- {
402
- cases: {
403
- "$#==$S3": { token: "regexp.delim", next: "@pop" },
404
- "$#==$S2": { token: "regexp.delim", next: "@push" },
405
- // nested delimiters are allowed..
406
- "~[)}\\]]": "@brackets.regexp.escape.control",
407
- "~@regexpctl": "regexp.escape.control",
408
- "@default": "regexp"
409
- }
410
- }
411
- ],
412
- { include: "@regexcontrol" }
413
- ],
414
- // We match regular expression quite precisely
415
- regexp: [
416
- { include: "@regexcontrol" },
417
- [/[^\\\/]/, "regexp"],
418
- ["/[ixmp]*", { token: "regexp.delim" }, "@pop"]
419
- ],
420
- regexcontrol: [
421
- [
422
- /(\{)(\d+(?:,\d*)?)(\})/,
423
- [
424
- "@brackets.regexp.escape.control",
425
- "regexp.escape.control",
426
- "@brackets.regexp.escape.control"
427
- ]
428
- ],
429
- [
430
- /(\[)(\^?)/,
431
- ["@brackets.regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
432
- ],
433
- [/(\()(\?[:=!])/, ["@brackets.regexp.escape.control", "regexp.escape.control"]],
434
- [/\(\?#/, { token: "regexp.escape.control", next: "@regexpcomment" }],
435
- [/[()]/, "@brackets.regexp.escape.control"],
436
- [/@regexpctl/, "regexp.escape.control"],
437
- [/\\$/, "regexp.escape"],
438
- [/@regexpesc/, "regexp.escape"],
439
- [/\\\./, "regexp.invalid"],
440
- [/#/, "regexp.escape", "@interpolated"]
441
- ],
442
- regexrange: [
443
- [/-/, "regexp.escape.control"],
444
- [/\^/, "regexp.invalid"],
445
- [/\\$/, "regexp.escape"],
446
- [/@regexpesc/, "regexp.escape"],
447
- [/[^\]]/, "regexp"],
448
- [/\]/, "@brackets.regexp.escape.control", "@pop"]
449
- ],
450
- regexpcomment: [
451
- [/[^)]+/, "comment"],
452
- [/\)/, { token: "regexp.escape.control", next: "@pop" }]
453
- ],
454
- // % quoted strings
455
- // A bit repetitive since we need to often special case the kind of ending delimiter
456
- pstring: [
457
- [/%([qws])\(/, { token: "string.$1.delim", switchTo: "@qstring.$1.(.)" }],
458
- [/%([qws])\[/, { token: "string.$1.delim", switchTo: "@qstring.$1.[.]" }],
459
- [/%([qws])\{/, { token: "string.$1.delim", switchTo: "@qstring.$1.{.}" }],
460
- [/%([qws])</, { token: "string.$1.delim", switchTo: "@qstring.$1.<.>" }],
461
- [/%([qws])(@delim)/, { token: "string.$1.delim", switchTo: "@qstring.$1.$2.$2" }],
462
- [/%r\(/, { token: "regexp.delim", switchTo: "@pregexp.(.)" }],
463
- [/%r\[/, { token: "regexp.delim", switchTo: "@pregexp.[.]" }],
464
- [/%r\{/, { token: "regexp.delim", switchTo: "@pregexp.{.}" }],
465
- [/%r</, { token: "regexp.delim", switchTo: "@pregexp.<.>" }],
466
- [/%r(@delim)/, { token: "regexp.delim", switchTo: "@pregexp.$1.$1" }],
467
- [/%(x|W|Q?)\(/, { token: "string.$1.delim", switchTo: "@qqstring.$1.(.)" }],
468
- [/%(x|W|Q?)\[/, { token: "string.$1.delim", switchTo: "@qqstring.$1.[.]" }],
469
- [/%(x|W|Q?)\{/, { token: "string.$1.delim", switchTo: "@qqstring.$1.{.}" }],
470
- [/%(x|W|Q?)</, { token: "string.$1.delim", switchTo: "@qqstring.$1.<.>" }],
471
- [/%(x|W|Q?)(@delim)/, { token: "string.$1.delim", switchTo: "@qqstring.$1.$2.$2" }],
472
- [/%([rqwsxW]|Q?)./, { token: "invalid", next: "@pop" }],
473
- // recover
474
- [/./, { token: "invalid", next: "@pop" }]
475
- // recover
476
- ],
477
- // non-expanded quoted string.
478
- // qstring.<kind>.<open>.<close>
479
- // kind = q|w|s (single quote, array, symbol)
480
- // open = open delimiter
481
- // close = close delimiter
482
- qstring: [
483
- [/\\$/, "string.$S2.escape"],
484
- [/\\./, "string.$S2.escape"],
485
- [
486
- /./,
487
- {
488
- cases: {
489
- "$#==$S4": { token: "string.$S2.delim", next: "@pop" },
490
- "$#==$S3": { token: "string.$S2.delim", next: "@push" },
491
- // nested delimiters are allowed..
492
- "@default": "string.$S2"
493
- }
494
- }
495
- ]
496
- ],
497
- // expanded quoted string.
498
- // qqstring.<kind>.<open>.<close>
499
- // kind = Q|W|x (double quote, array, command)
500
- // open = open delimiter
501
- // close = close delimiter
502
- qqstring: [[/#/, "string.$S2.escape", "@interpolated"], { include: "@qstring" }],
503
- // whitespace & comments
504
- whitespace: [
505
- [/[ \t\r\n]+/, ""],
506
- [/^\s*=begin\b/, "comment", "@comment"],
507
- [/#.*$/, "comment"]
508
- ],
509
- comment: [
510
- [/[^=]+/, "comment"],
511
- [/^\s*=begin\b/, "comment.invalid"],
512
- // nested comment
513
- [/^\s*=end\b.*/, "comment", "@pop"],
514
- [/[=]/, "comment"]
515
- ]
516
- }
517
- };
518
-
519
- export { conf, language };
@@ -1,19 +0,0 @@
1
- import { registerLanguage } from '../_.contribution.js';
2
-
3
- /*!-----------------------------------------------------------------------------
4
- * Copyright (c) Microsoft Corporation. All rights reserved.
5
- * Version: 0.54.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: "rust",
12
- extensions: [".rs", ".rlib"],
13
- aliases: ["Rust", "rust"],
14
- loader: () => {
15
- {
16
- return import('./rust.js');
17
- }
18
- }
19
- });