@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/scala/scala.js ADDED
@@ -0,0 +1,369 @@
1
+ const conf = {
2
+ /*
3
+ * `...` is allowed as an identifier.
4
+ * $ is allowed in identifiers.
5
+ * unary_<op> is allowed as an identifier.
6
+ * <name>_= is allowed as an identifier.
7
+ */
8
+ wordPattern: /(unary_[@~!#%^&*()\-=+\\|:<>\/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g,
9
+ comments: {
10
+ lineComment: "//",
11
+ blockComment: ["/*", "*/"]
12
+ },
13
+ brackets: [
14
+ ["{", "}"],
15
+ ["[", "]"],
16
+ ["(", ")"]
17
+ ],
18
+ autoClosingPairs: [
19
+ { open: "{", close: "}" },
20
+ { open: "[", close: "]" },
21
+ { open: "(", close: ")" },
22
+ { open: '"', close: '"' },
23
+ { open: "'", close: "'" }
24
+ ],
25
+ surroundingPairs: [
26
+ { open: "{", close: "}" },
27
+ { open: "[", close: "]" },
28
+ { open: "(", close: ")" },
29
+ { open: '"', close: '"' },
30
+ { open: "'", close: "'" }
31
+ ],
32
+ folding: {
33
+ markers: {
34
+ start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
35
+ end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
36
+ }
37
+ }
38
+ };
39
+ const language = {
40
+ tokenPostfix: ".scala",
41
+ // We can't easily add everything from Dotty, but we can at least add some of its keywords
42
+ keywords: [
43
+ "asInstanceOf",
44
+ "catch",
45
+ "class",
46
+ "classOf",
47
+ "def",
48
+ "do",
49
+ "else",
50
+ "extends",
51
+ "finally",
52
+ "for",
53
+ "foreach",
54
+ "forSome",
55
+ "if",
56
+ "import",
57
+ "isInstanceOf",
58
+ "macro",
59
+ "match",
60
+ "new",
61
+ "object",
62
+ "package",
63
+ "return",
64
+ "throw",
65
+ "trait",
66
+ "try",
67
+ "type",
68
+ "until",
69
+ "val",
70
+ "var",
71
+ "while",
72
+ "with",
73
+ "yield",
74
+ // Dotty-specific:
75
+ "given",
76
+ "enum",
77
+ "then"
78
+ ],
79
+ // Dotty-specific:
80
+ softKeywords: ["as", "export", "extension", "end", "derives", "on"],
81
+ constants: ["true", "false", "null", "this", "super"],
82
+ modifiers: [
83
+ "abstract",
84
+ "final",
85
+ "implicit",
86
+ "lazy",
87
+ "override",
88
+ "private",
89
+ "protected",
90
+ "sealed"
91
+ ],
92
+ // Dotty-specific:
93
+ softModifiers: ["inline", "opaque", "open", "transparent", "using"],
94
+ name: /(?:[a-z_$][\w$]*|`[^`]+`)/,
95
+ type: /(?:[A-Z][\w$]*)/,
96
+ // we include these common regular expressions
97
+ symbols: /[=><!~?:&|+\-*\/^\\%@#]+/,
98
+ digits: /\d+(_+\d+)*/,
99
+ hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
100
+ // C# style strings
101
+ escapes: /\\(?:[btnfr\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
102
+ fstring_conv: /[bBhHsScCdoxXeEfgGaAt]|[Tn](?:[HIklMSLNpzZsQ]|[BbhAaCYyjmde]|[RTrDFC])/,
103
+ // The main tokenizer for our languages
104
+ tokenizer: {
105
+ root: [
106
+ // strings
107
+ [/\braw"""/, { token: "string.quote", bracket: "@open", next: "@rawstringt" }],
108
+ [/\braw"/, { token: "string.quote", bracket: "@open", next: "@rawstring" }],
109
+ [/\bs"""/, { token: "string.quote", bracket: "@open", next: "@sstringt" }],
110
+ [/\bs"/, { token: "string.quote", bracket: "@open", next: "@sstring" }],
111
+ [/\bf""""/, { token: "string.quote", bracket: "@open", next: "@fstringt" }],
112
+ [/\bf"/, { token: "string.quote", bracket: "@open", next: "@fstring" }],
113
+ [/"""/, { token: "string.quote", bracket: "@open", next: "@stringt" }],
114
+ [/"/, { token: "string.quote", bracket: "@open", next: "@string" }],
115
+ // numbers
116
+ [/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, "number.float", "@allowMethod"],
117
+ [/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, "number.float", "@allowMethod"],
118
+ [/0[xX](@hexdigits)[Ll]?/, "number.hex", "@allowMethod"],
119
+ [/(@digits)[fFdD]/, "number.float", "@allowMethod"],
120
+ [/(@digits)[lL]?/, "number", "@allowMethod"],
121
+ [/\b_\*/, "key"],
122
+ [/\b(_)\b/, "keyword", "@allowMethod"],
123
+ // identifiers and keywords
124
+ [/\bimport\b/, "keyword", "@import"],
125
+ [/\b(case)([ \t]+)(class)\b/, ["keyword.modifier", "white", "keyword"]],
126
+ [/\bcase\b/, "keyword", "@case"],
127
+ [/\bva[lr]\b/, "keyword", "@vardef"],
128
+ [
129
+ /\b(def)([ \t]+)((?:unary_)?@symbols|@name(?:_=)|@name)/,
130
+ ["keyword", "white", "identifier"]
131
+ ],
132
+ [/@name(?=[ \t]*:(?!:))/, "variable"],
133
+ [/(\.)(@name|@symbols)/, ["operator", { token: "@rematch", next: "@allowMethod" }]],
134
+ [/([{(])(\s*)(@name(?=\s*=>))/, ["@brackets", "white", "variable"]],
135
+ [
136
+ /@name/,
137
+ {
138
+ cases: {
139
+ "@keywords": "keyword",
140
+ "@softKeywords": "keyword",
141
+ "@modifiers": "keyword.modifier",
142
+ "@softModifiers": "keyword.modifier",
143
+ "@constants": {
144
+ token: "constant",
145
+ next: "@allowMethod"
146
+ },
147
+ "@default": {
148
+ token: "identifier",
149
+ next: "@allowMethod"
150
+ }
151
+ }
152
+ }
153
+ ],
154
+ [/@type/, "type", "@allowMethod"],
155
+ // whitespace
156
+ { include: "@whitespace" },
157
+ // @ annotations.
158
+ [/@[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*/, "annotation"],
159
+ // delimiters and operators
160
+ [/[{(]/, "@brackets"],
161
+ [/[})]/, "@brackets", "@allowMethod"],
162
+ [/\[/, "operator.square"],
163
+ [/](?!\s*(?:va[rl]|def|type)\b)/, "operator.square", "@allowMethod"],
164
+ [/]/, "operator.square"],
165
+ [/([=-]>|<-|>:|<:|:>|<%)(?=[\s\w()[\]{},\."'`])/, "keyword"],
166
+ [/@symbols/, "operator"],
167
+ // delimiter: after number because of .\d floats
168
+ [/[;,\.]/, "delimiter"],
169
+ // symbols
170
+ [/'[a-zA-Z$][\w$]*(?!')/, "attribute.name"],
171
+ // characters
172
+ [/'[^\\']'/, "string", "@allowMethod"],
173
+ [/(')(@escapes)(')/, ["string", "string.escape", { token: "string", next: "@allowMethod" }]],
174
+ [/'/, "string.invalid"]
175
+ ],
176
+ import: [
177
+ [/;/, "delimiter", "@pop"],
178
+ [/^|$/, "", "@pop"],
179
+ [/[ \t]+/, "white"],
180
+ [/[\n\r]+/, "white", "@pop"],
181
+ [/\/\*/, "comment", "@comment"],
182
+ [/@name|@type/, "type"],
183
+ [/[(){}]/, "@brackets"],
184
+ [/[[\]]/, "operator.square"],
185
+ [/[\.,]/, "delimiter"]
186
+ ],
187
+ allowMethod: [
188
+ [/^|$/, "", "@pop"],
189
+ [/[ \t]+/, "white"],
190
+ [/[\n\r]+/, "white", "@pop"],
191
+ [/\/\*/, "comment", "@comment"],
192
+ [/(?==>[\s\w([{])/, "keyword", "@pop"],
193
+ [
194
+ /(@name|@symbols)(?=[ \t]*[[({"'`]|[ \t]+(?:[+-]?\.?\d|\w))/,
195
+ {
196
+ cases: {
197
+ "@keywords": { token: "keyword", next: "@pop" },
198
+ "->|<-|>:|<:|<%": { token: "keyword", next: "@pop" },
199
+ "@default": { token: "@rematch", next: "@pop" }
200
+ }
201
+ }
202
+ ],
203
+ ["", "", "@pop"]
204
+ ],
205
+ comment: [
206
+ [/[^\/*]+/, "comment"],
207
+ [/\/\*/, "comment", "@push"],
208
+ // nested comment
209
+ [/\*\//, "comment", "@pop"],
210
+ [/[\/*]/, "comment"]
211
+ ],
212
+ case: [
213
+ [/\b_\*/, "key"],
214
+ [/\b(_|true|false|null|this|super)\b/, "keyword", "@allowMethod"],
215
+ [/\bif\b|=>/, "keyword", "@pop"],
216
+ [/`[^`]+`/, "identifier", "@allowMethod"],
217
+ [/@name/, "variable", "@allowMethod"],
218
+ [/:::?|\||@(?![a-z_$])/, "keyword"],
219
+ { include: "@root" }
220
+ ],
221
+ vardef: [
222
+ [/\b_\*/, "key"],
223
+ [/\b(_|true|false|null|this|super)\b/, "keyword"],
224
+ [/@name/, "variable"],
225
+ [/:::?|\||@(?![a-z_$])/, "keyword"],
226
+ [/=|:(?!:)/, "operator", "@pop"],
227
+ [/$/, "white", "@pop"],
228
+ { include: "@root" }
229
+ ],
230
+ string: [
231
+ [/[^\\"\n\r]+/, "string"],
232
+ [/@escapes/, "string.escape"],
233
+ [/\\./, "string.escape.invalid"],
234
+ [
235
+ /"/,
236
+ {
237
+ token: "string.quote",
238
+ bracket: "@close",
239
+ switchTo: "@allowMethod"
240
+ }
241
+ ]
242
+ ],
243
+ stringt: [
244
+ [/[^\\"\n\r]+/, "string"],
245
+ [/@escapes/, "string.escape"],
246
+ [/\\./, "string.escape.invalid"],
247
+ [/"(?=""")/, "string"],
248
+ [
249
+ /"""/,
250
+ {
251
+ token: "string.quote",
252
+ bracket: "@close",
253
+ switchTo: "@allowMethod"
254
+ }
255
+ ],
256
+ [/"/, "string"]
257
+ ],
258
+ fstring: [
259
+ [/@escapes/, "string.escape"],
260
+ [
261
+ /"/,
262
+ {
263
+ token: "string.quote",
264
+ bracket: "@close",
265
+ switchTo: "@allowMethod"
266
+ }
267
+ ],
268
+ [/\$\$/, "string"],
269
+ [/(\$)([a-z_]\w*)/, ["operator", "identifier"]],
270
+ [/\$\{/, "operator", "@interp"],
271
+ [/%%/, "string"],
272
+ [
273
+ /(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,
274
+ ["metatag", "keyword.modifier", "number", "metatag"]
275
+ ],
276
+ [/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/, ["metatag", "number", "metatag"]],
277
+ [/(%)([\-#+ 0,(])(@fstring_conv)/, ["metatag", "keyword.modifier", "metatag"]],
278
+ [/(%)(@fstring_conv)/, ["metatag", "metatag"]],
279
+ [/./, "string"]
280
+ ],
281
+ fstringt: [
282
+ [/@escapes/, "string.escape"],
283
+ [/"(?=""")/, "string"],
284
+ [
285
+ /"""/,
286
+ {
287
+ token: "string.quote",
288
+ bracket: "@close",
289
+ switchTo: "@allowMethod"
290
+ }
291
+ ],
292
+ [/\$\$/, "string"],
293
+ [/(\$)([a-z_]\w*)/, ["operator", "identifier"]],
294
+ [/\$\{/, "operator", "@interp"],
295
+ [/%%/, "string"],
296
+ [
297
+ /(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,
298
+ ["metatag", "keyword.modifier", "number", "metatag"]
299
+ ],
300
+ [/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/, ["metatag", "number", "metatag"]],
301
+ [/(%)([\-#+ 0,(])(@fstring_conv)/, ["metatag", "keyword.modifier", "metatag"]],
302
+ [/(%)(@fstring_conv)/, ["metatag", "metatag"]],
303
+ [/./, "string"]
304
+ ],
305
+ sstring: [
306
+ [/@escapes/, "string.escape"],
307
+ [
308
+ /"/,
309
+ {
310
+ token: "string.quote",
311
+ bracket: "@close",
312
+ switchTo: "@allowMethod"
313
+ }
314
+ ],
315
+ [/\$\$/, "string"],
316
+ [/(\$)([a-z_]\w*)/, ["operator", "identifier"]],
317
+ [/\$\{/, "operator", "@interp"],
318
+ [/./, "string"]
319
+ ],
320
+ sstringt: [
321
+ [/@escapes/, "string.escape"],
322
+ [/"(?=""")/, "string"],
323
+ [
324
+ /"""/,
325
+ {
326
+ token: "string.quote",
327
+ bracket: "@close",
328
+ switchTo: "@allowMethod"
329
+ }
330
+ ],
331
+ [/\$\$/, "string"],
332
+ [/(\$)([a-z_]\w*)/, ["operator", "identifier"]],
333
+ [/\$\{/, "operator", "@interp"],
334
+ [/./, "string"]
335
+ ],
336
+ interp: [[/{/, "operator", "@push"], [/}/, "operator", "@pop"], { include: "@root" }],
337
+ rawstring: [
338
+ [/[^"]/, "string"],
339
+ [
340
+ /"/,
341
+ {
342
+ token: "string.quote",
343
+ bracket: "@close",
344
+ switchTo: "@allowMethod"
345
+ }
346
+ ]
347
+ ],
348
+ rawstringt: [
349
+ [/[^"]/, "string"],
350
+ [/"(?=""")/, "string"],
351
+ [
352
+ /"""/,
353
+ {
354
+ token: "string.quote",
355
+ bracket: "@close",
356
+ switchTo: "@allowMethod"
357
+ }
358
+ ],
359
+ [/"/, "string"]
360
+ ],
361
+ whitespace: [
362
+ [/[ \t\r\n]+/, "white"],
363
+ [/\/\*/, "comment", "@comment"],
364
+ [/\/\/.*$/, "comment"]
365
+ ]
366
+ }
367
+ };
368
+
369
+ export { conf, language };
@@ -0,0 +1,8 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "scheme",
5
+ extensions: [".scm", ".ss", ".sch", ".rkt"],
6
+ aliases: ["scheme", "Scheme"],
7
+ loader: () => import('./scheme.js')
8
+ });
@@ -0,0 +1,107 @@
1
+ const conf = {
2
+ comments: {
3
+ lineComment: ";",
4
+ blockComment: ["#|", "|#"]
5
+ },
6
+ brackets: [
7
+ ["(", ")"],
8
+ ["{", "}"],
9
+ ["[", "]"]
10
+ ],
11
+ autoClosingPairs: [
12
+ { open: "{", close: "}" },
13
+ { open: "[", close: "]" },
14
+ { open: "(", close: ")" },
15
+ { open: '"', close: '"' }
16
+ ],
17
+ surroundingPairs: [
18
+ { open: "{", close: "}" },
19
+ { open: "[", close: "]" },
20
+ { open: "(", close: ")" },
21
+ { open: '"', close: '"' }
22
+ ]
23
+ };
24
+ const language = {
25
+ defaultToken: "",
26
+ ignoreCase: true,
27
+ tokenPostfix: ".scheme",
28
+ brackets: [
29
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
30
+ { open: "{", close: "}", token: "delimiter.curly" },
31
+ { open: "[", close: "]", token: "delimiter.square" }
32
+ ],
33
+ keywords: [
34
+ "case",
35
+ "do",
36
+ "let",
37
+ "loop",
38
+ "if",
39
+ "else",
40
+ "when",
41
+ "cons",
42
+ "car",
43
+ "cdr",
44
+ "cond",
45
+ "lambda",
46
+ "lambda*",
47
+ "syntax-rules",
48
+ "format",
49
+ "set!",
50
+ "quote",
51
+ "eval",
52
+ "append",
53
+ "list",
54
+ "list?",
55
+ "member?",
56
+ "load"
57
+ ],
58
+ constants: ["#t", "#f"],
59
+ operators: ["eq?", "eqv?", "equal?", "and", "or", "not", "null?"],
60
+ tokenizer: {
61
+ root: [
62
+ [/#[xXoObB][0-9a-fA-F]+/, "number.hex"],
63
+ [/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/, "number.float"],
64
+ [
65
+ /(?:\b(?:(define|define-syntax|define-macro))\b)(\s+)((?:\w|\-|\!|\?)*)/,
66
+ ["keyword", "white", "variable"]
67
+ ],
68
+ { include: "@whitespace" },
69
+ { include: "@strings" },
70
+ [
71
+ /[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,
72
+ {
73
+ cases: {
74
+ "@keywords": "keyword",
75
+ "@constants": "constant",
76
+ "@operators": "operators",
77
+ "@default": "identifier"
78
+ }
79
+ }
80
+ ]
81
+ ],
82
+ comment: [
83
+ [/[^\|#]+/, "comment"],
84
+ [/#\|/, "comment", "@push"],
85
+ [/\|#/, "comment", "@pop"],
86
+ [/[\|#]/, "comment"]
87
+ ],
88
+ whitespace: [
89
+ [/[ \t\r\n]+/, "white"],
90
+ [/#\|/, "comment", "@comment"],
91
+ [/;.*$/, "comment"]
92
+ ],
93
+ strings: [
94
+ [/"$/, "string", "@popall"],
95
+ [/"(?=.)/, "string", "@multiLineString"]
96
+ ],
97
+ multiLineString: [
98
+ [/[^\\"]+$/, "string", "@popall"],
99
+ [/[^\\"]+/, "string"],
100
+ [/\\./, "string.escape"],
101
+ [/"/, "string", "@popall"],
102
+ [/\\$/, "string"]
103
+ ]
104
+ }
105
+ };
106
+
107
+ export { conf, language };
@@ -0,0 +1,9 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "scss",
5
+ extensions: [".scss"],
6
+ aliases: ["Sass", "sass", "scss"],
7
+ mimetypes: ["text/x-scss", "text/scss"],
8
+ loader: () => import('./scss.js')
9
+ });