@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/razor/razor.js ADDED
@@ -0,0 +1,544 @@
1
+ import { languages } from 'monaco-editor';
2
+
3
+ const EMPTY_ELEMENTS = [
4
+ "area",
5
+ "base",
6
+ "br",
7
+ "col",
8
+ "embed",
9
+ "hr",
10
+ "img",
11
+ "input",
12
+ "keygen",
13
+ "link",
14
+ "menuitem",
15
+ "meta",
16
+ "param",
17
+ "source",
18
+ "track",
19
+ "wbr"
20
+ ];
21
+ const conf = {
22
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
23
+ comments: {
24
+ blockComment: ["<!--", "-->"]
25
+ },
26
+ brackets: [
27
+ ["<!--", "-->"],
28
+ ["<", ">"],
29
+ ["{", "}"],
30
+ ["(", ")"]
31
+ ],
32
+ autoClosingPairs: [
33
+ { open: "{", close: "}" },
34
+ { open: "[", close: "]" },
35
+ { open: "(", close: ")" },
36
+ { open: '"', close: '"' },
37
+ { open: "'", close: "'" }
38
+ ],
39
+ surroundingPairs: [
40
+ { open: '"', close: '"' },
41
+ { open: "'", close: "'" },
42
+ { open: "<", close: ">" }
43
+ ],
44
+ onEnterRules: [
45
+ {
46
+ beforeText: new RegExp(
47
+ `<(?!(?:${EMPTY_ELEMENTS.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,
48
+ "i"
49
+ ),
50
+ afterText: /^<\/(\w[\w\d]*)\s*>$/i,
51
+ action: {
52
+ indentAction: languages.IndentAction.IndentOutdent
53
+ }
54
+ },
55
+ {
56
+ beforeText: new RegExp(
57
+ `<(?!(?:${EMPTY_ELEMENTS.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,
58
+ "i"
59
+ ),
60
+ action: { indentAction: languages.IndentAction.Indent }
61
+ }
62
+ ]
63
+ };
64
+ const language = {
65
+ defaultToken: "",
66
+ tokenPostfix: "",
67
+ // ignoreCase: true,
68
+ // The main tokenizer for our languages
69
+ tokenizer: {
70
+ root: [
71
+ [/@@@@/],
72
+ // text
73
+ [/@[^@]/, { token: "@rematch", switchTo: "@razorInSimpleState.root" }],
74
+ [/<!DOCTYPE/, "metatag.html", "@doctype"],
75
+ [/<!--/, "comment.html", "@comment"],
76
+ [/(<)([\w\-]+)(\/>)/, ["delimiter.html", "tag.html", "delimiter.html"]],
77
+ [/(<)(script)/, ["delimiter.html", { token: "tag.html", next: "@script" }]],
78
+ [/(<)(style)/, ["delimiter.html", { token: "tag.html", next: "@style" }]],
79
+ [/(<)([:\w\-]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
80
+ [/(<\/)([\w\-]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
81
+ [/</, "delimiter.html"],
82
+ [/[ \t\r\n]+/],
83
+ // whitespace
84
+ [/[^<@]+/]
85
+ // text
86
+ ],
87
+ doctype: [
88
+ [/@[^@]/, { token: "@rematch", switchTo: "@razorInSimpleState.comment" }],
89
+ [/[^>]+/, "metatag.content.html"],
90
+ [/>/, "metatag.html", "@pop"]
91
+ ],
92
+ comment: [
93
+ [/@[^@]/, { token: "@rematch", switchTo: "@razorInSimpleState.comment" }],
94
+ [/-->/, "comment.html", "@pop"],
95
+ [/[^-]+/, "comment.content.html"],
96
+ [/./, "comment.content.html"]
97
+ ],
98
+ otherTag: [
99
+ [/@[^@]/, { token: "@rematch", switchTo: "@razorInSimpleState.otherTag" }],
100
+ [/\/?>/, "delimiter.html", "@pop"],
101
+ [/"([^"]*)"/, "attribute.value"],
102
+ [/'([^']*)'/, "attribute.value"],
103
+ [/[\w\-]+/, "attribute.name"],
104
+ [/=/, "delimiter"],
105
+ [/[ \t\r\n]+/]
106
+ // whitespace
107
+ ],
108
+ // -- BEGIN <script> tags handling
109
+ // After <script
110
+ script: [
111
+ [/@[^@]/, { token: "@rematch", switchTo: "@razorInSimpleState.script" }],
112
+ [/type/, "attribute.name", "@scriptAfterType"],
113
+ [/"([^"]*)"/, "attribute.value"],
114
+ [/'([^']*)'/, "attribute.value"],
115
+ [/[\w\-]+/, "attribute.name"],
116
+ [/=/, "delimiter"],
117
+ [
118
+ />/,
119
+ {
120
+ token: "delimiter.html",
121
+ next: "@scriptEmbedded.text/javascript",
122
+ nextEmbedded: "text/javascript"
123
+ }
124
+ ],
125
+ [/[ \t\r\n]+/],
126
+ // whitespace
127
+ [
128
+ /(<\/)(script\s*)(>)/,
129
+ ["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
130
+ ]
131
+ ],
132
+ // After <script ... type
133
+ scriptAfterType: [
134
+ [
135
+ /@[^@]/,
136
+ {
137
+ token: "@rematch",
138
+ switchTo: "@razorInSimpleState.scriptAfterType"
139
+ }
140
+ ],
141
+ [/=/, "delimiter", "@scriptAfterTypeEquals"],
142
+ [
143
+ />/,
144
+ {
145
+ token: "delimiter.html",
146
+ next: "@scriptEmbedded.text/javascript",
147
+ nextEmbedded: "text/javascript"
148
+ }
149
+ ],
150
+ // cover invalid e.g. <script type>
151
+ [/[ \t\r\n]+/],
152
+ // whitespace
153
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
154
+ ],
155
+ // After <script ... type =
156
+ scriptAfterTypeEquals: [
157
+ [
158
+ /@[^@]/,
159
+ {
160
+ token: "@rematch",
161
+ switchTo: "@razorInSimpleState.scriptAfterTypeEquals"
162
+ }
163
+ ],
164
+ [
165
+ /"([^"]*)"/,
166
+ {
167
+ token: "attribute.value",
168
+ switchTo: "@scriptWithCustomType.$1"
169
+ }
170
+ ],
171
+ [
172
+ /'([^']*)'/,
173
+ {
174
+ token: "attribute.value",
175
+ switchTo: "@scriptWithCustomType.$1"
176
+ }
177
+ ],
178
+ [
179
+ />/,
180
+ {
181
+ token: "delimiter.html",
182
+ next: "@scriptEmbedded.text/javascript",
183
+ nextEmbedded: "text/javascript"
184
+ }
185
+ ],
186
+ // cover invalid e.g. <script type=>
187
+ [/[ \t\r\n]+/],
188
+ // whitespace
189
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
190
+ ],
191
+ // After <script ... type = $S2
192
+ scriptWithCustomType: [
193
+ [
194
+ /@[^@]/,
195
+ {
196
+ token: "@rematch",
197
+ switchTo: "@razorInSimpleState.scriptWithCustomType.$S2"
198
+ }
199
+ ],
200
+ [
201
+ />/,
202
+ {
203
+ token: "delimiter.html",
204
+ next: "@scriptEmbedded.$S2",
205
+ nextEmbedded: "$S2"
206
+ }
207
+ ],
208
+ [/"([^"]*)"/, "attribute.value"],
209
+ [/'([^']*)'/, "attribute.value"],
210
+ [/[\w\-]+/, "attribute.name"],
211
+ [/=/, "delimiter"],
212
+ [/[ \t\r\n]+/],
213
+ // whitespace
214
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
215
+ ],
216
+ scriptEmbedded: [
217
+ [
218
+ /@[^@]/,
219
+ {
220
+ token: "@rematch",
221
+ switchTo: "@razorInEmbeddedState.scriptEmbedded.$S2",
222
+ nextEmbedded: "@pop"
223
+ }
224
+ ],
225
+ [/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
226
+ ],
227
+ // -- END <script> tags handling
228
+ // -- BEGIN <style> tags handling
229
+ // After <style
230
+ style: [
231
+ [/@[^@]/, { token: "@rematch", switchTo: "@razorInSimpleState.style" }],
232
+ [/type/, "attribute.name", "@styleAfterType"],
233
+ [/"([^"]*)"/, "attribute.value"],
234
+ [/'([^']*)'/, "attribute.value"],
235
+ [/[\w\-]+/, "attribute.name"],
236
+ [/=/, "delimiter"],
237
+ [
238
+ />/,
239
+ {
240
+ token: "delimiter.html",
241
+ next: "@styleEmbedded.text/css",
242
+ nextEmbedded: "text/css"
243
+ }
244
+ ],
245
+ [/[ \t\r\n]+/],
246
+ // whitespace
247
+ [
248
+ /(<\/)(style\s*)(>)/,
249
+ ["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
250
+ ]
251
+ ],
252
+ // After <style ... type
253
+ styleAfterType: [
254
+ [
255
+ /@[^@]/,
256
+ {
257
+ token: "@rematch",
258
+ switchTo: "@razorInSimpleState.styleAfterType"
259
+ }
260
+ ],
261
+ [/=/, "delimiter", "@styleAfterTypeEquals"],
262
+ [
263
+ />/,
264
+ {
265
+ token: "delimiter.html",
266
+ next: "@styleEmbedded.text/css",
267
+ nextEmbedded: "text/css"
268
+ }
269
+ ],
270
+ // cover invalid e.g. <style type>
271
+ [/[ \t\r\n]+/],
272
+ // whitespace
273
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
274
+ ],
275
+ // After <style ... type =
276
+ styleAfterTypeEquals: [
277
+ [
278
+ /@[^@]/,
279
+ {
280
+ token: "@rematch",
281
+ switchTo: "@razorInSimpleState.styleAfterTypeEquals"
282
+ }
283
+ ],
284
+ [
285
+ /"([^"]*)"/,
286
+ {
287
+ token: "attribute.value",
288
+ switchTo: "@styleWithCustomType.$1"
289
+ }
290
+ ],
291
+ [
292
+ /'([^']*)'/,
293
+ {
294
+ token: "attribute.value",
295
+ switchTo: "@styleWithCustomType.$1"
296
+ }
297
+ ],
298
+ [
299
+ />/,
300
+ {
301
+ token: "delimiter.html",
302
+ next: "@styleEmbedded.text/css",
303
+ nextEmbedded: "text/css"
304
+ }
305
+ ],
306
+ // cover invalid e.g. <style type=>
307
+ [/[ \t\r\n]+/],
308
+ // whitespace
309
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
310
+ ],
311
+ // After <style ... type = $S2
312
+ styleWithCustomType: [
313
+ [
314
+ /@[^@]/,
315
+ {
316
+ token: "@rematch",
317
+ switchTo: "@razorInSimpleState.styleWithCustomType.$S2"
318
+ }
319
+ ],
320
+ [
321
+ />/,
322
+ {
323
+ token: "delimiter.html",
324
+ next: "@styleEmbedded.$S2",
325
+ nextEmbedded: "$S2"
326
+ }
327
+ ],
328
+ [/"([^"]*)"/, "attribute.value"],
329
+ [/'([^']*)'/, "attribute.value"],
330
+ [/[\w\-]+/, "attribute.name"],
331
+ [/=/, "delimiter"],
332
+ [/[ \t\r\n]+/],
333
+ // whitespace
334
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
335
+ ],
336
+ styleEmbedded: [
337
+ [
338
+ /@[^@]/,
339
+ {
340
+ token: "@rematch",
341
+ switchTo: "@razorInEmbeddedState.styleEmbedded.$S2",
342
+ nextEmbedded: "@pop"
343
+ }
344
+ ],
345
+ [/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
346
+ ],
347
+ // -- END <style> tags handling
348
+ razorInSimpleState: [
349
+ [/@\*/, "comment.cs", "@razorBlockCommentTopLevel"],
350
+ [/@[{(]/, "metatag.cs", "@razorRootTopLevel"],
351
+ [/(@)(\s*[\w]+)/, ["metatag.cs", { token: "identifier.cs", switchTo: "@$S2.$S3" }]],
352
+ [/[})]/, { token: "metatag.cs", switchTo: "@$S2.$S3" }],
353
+ [/\*@/, { token: "comment.cs", switchTo: "@$S2.$S3" }]
354
+ ],
355
+ razorInEmbeddedState: [
356
+ [/@\*/, "comment.cs", "@razorBlockCommentTopLevel"],
357
+ [/@[{(]/, "metatag.cs", "@razorRootTopLevel"],
358
+ [
359
+ /(@)(\s*[\w]+)/,
360
+ [
361
+ "metatag.cs",
362
+ {
363
+ token: "identifier.cs",
364
+ switchTo: "@$S2.$S3",
365
+ nextEmbedded: "$S3"
366
+ }
367
+ ]
368
+ ],
369
+ [
370
+ /[})]/,
371
+ {
372
+ token: "metatag.cs",
373
+ switchTo: "@$S2.$S3",
374
+ nextEmbedded: "$S3"
375
+ }
376
+ ],
377
+ [
378
+ /\*@/,
379
+ {
380
+ token: "comment.cs",
381
+ switchTo: "@$S2.$S3",
382
+ nextEmbedded: "$S3"
383
+ }
384
+ ]
385
+ ],
386
+ razorBlockCommentTopLevel: [
387
+ [/\*@/, "@rematch", "@pop"],
388
+ [/[^*]+/, "comment.cs"],
389
+ [/./, "comment.cs"]
390
+ ],
391
+ razorBlockComment: [
392
+ [/\*@/, "comment.cs", "@pop"],
393
+ [/[^*]+/, "comment.cs"],
394
+ [/./, "comment.cs"]
395
+ ],
396
+ razorRootTopLevel: [
397
+ [/\{/, "delimiter.bracket.cs", "@razorRoot"],
398
+ [/\(/, "delimiter.parenthesis.cs", "@razorRoot"],
399
+ [/[})]/, "@rematch", "@pop"],
400
+ { include: "razorCommon" }
401
+ ],
402
+ razorRoot: [
403
+ [/\{/, "delimiter.bracket.cs", "@razorRoot"],
404
+ [/\(/, "delimiter.parenthesis.cs", "@razorRoot"],
405
+ [/\}/, "delimiter.bracket.cs", "@pop"],
406
+ [/\)/, "delimiter.parenthesis.cs", "@pop"],
407
+ { include: "razorCommon" }
408
+ ],
409
+ razorCommon: [
410
+ [
411
+ /[a-zA-Z_]\w*/,
412
+ {
413
+ cases: {
414
+ "@razorKeywords": { token: "keyword.cs" },
415
+ "@default": "identifier.cs"
416
+ }
417
+ }
418
+ ],
419
+ // brackets
420
+ [/[\[\]]/, "delimiter.array.cs"],
421
+ // whitespace
422
+ [/[ \t\r\n]+/],
423
+ // comments
424
+ [/\/\/.*$/, "comment.cs"],
425
+ [/@\*/, "comment.cs", "@razorBlockComment"],
426
+ // strings
427
+ [/"([^"]*)"/, "string.cs"],
428
+ [/'([^']*)'/, "string.cs"],
429
+ // simple html
430
+ [/(<)([\w\-]+)(\/>)/, ["delimiter.html", "tag.html", "delimiter.html"]],
431
+ [/(<)([\w\-]+)(>)/, ["delimiter.html", "tag.html", "delimiter.html"]],
432
+ [/(<\/)([\w\-]+)(>)/, ["delimiter.html", "tag.html", "delimiter.html"]],
433
+ // delimiters
434
+ [/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/, "delimiter.cs"],
435
+ // numbers
436
+ [/\d*\d+[eE]([\-+]?\d+)?/, "number.float.cs"],
437
+ [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float.cs"],
438
+ [/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, "number.hex.cs"],
439
+ [/0[0-7']*[0-7]/, "number.octal.cs"],
440
+ [/0[bB][0-1']*[0-1]/, "number.binary.cs"],
441
+ [/\d[\d']*/, "number.cs"],
442
+ [/\d/, "number.cs"]
443
+ ]
444
+ },
445
+ razorKeywords: [
446
+ "abstract",
447
+ "as",
448
+ "async",
449
+ "await",
450
+ "base",
451
+ "bool",
452
+ "break",
453
+ "by",
454
+ "byte",
455
+ "case",
456
+ "catch",
457
+ "char",
458
+ "checked",
459
+ "class",
460
+ "const",
461
+ "continue",
462
+ "decimal",
463
+ "default",
464
+ "delegate",
465
+ "do",
466
+ "double",
467
+ "descending",
468
+ "explicit",
469
+ "event",
470
+ "extern",
471
+ "else",
472
+ "enum",
473
+ "false",
474
+ "finally",
475
+ "fixed",
476
+ "float",
477
+ "for",
478
+ "foreach",
479
+ "from",
480
+ "goto",
481
+ "group",
482
+ "if",
483
+ "implicit",
484
+ "in",
485
+ "int",
486
+ "interface",
487
+ "internal",
488
+ "into",
489
+ "is",
490
+ "lock",
491
+ "long",
492
+ "nameof",
493
+ "new",
494
+ "null",
495
+ "namespace",
496
+ "object",
497
+ "operator",
498
+ "out",
499
+ "override",
500
+ "orderby",
501
+ "params",
502
+ "private",
503
+ "protected",
504
+ "public",
505
+ "readonly",
506
+ "ref",
507
+ "return",
508
+ "switch",
509
+ "struct",
510
+ "sbyte",
511
+ "sealed",
512
+ "short",
513
+ "sizeof",
514
+ "stackalloc",
515
+ "static",
516
+ "string",
517
+ "select",
518
+ "this",
519
+ "throw",
520
+ "true",
521
+ "try",
522
+ "typeof",
523
+ "uint",
524
+ "ulong",
525
+ "unchecked",
526
+ "unsafe",
527
+ "ushort",
528
+ "using",
529
+ "var",
530
+ "virtual",
531
+ "volatile",
532
+ "void",
533
+ "when",
534
+ "while",
535
+ "where",
536
+ "yield",
537
+ "model",
538
+ "inject"
539
+ // Razor specific
540
+ ],
541
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/
542
+ };
543
+
544
+ export { conf, language };
@@ -0,0 +1,8 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "redis",
5
+ extensions: [".redis"],
6
+ aliases: ["redis"],
7
+ loader: () => import('./redis.js')
8
+ });