@codingame/monaco-vscode-standalone-languages 23.2.1 → 23.3.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/_.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
@@ -0,0 +1,8 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "st",
5
+ extensions: [".st", ".iecst", ".iecplc", ".lc3lib", ".TcPOU", ".TcDUT", ".TcGVL", ".TcIO"],
6
+ aliases: ["StructuredText", "scl", "stl"],
7
+ loader: () => import('./st.js')
8
+ });
package/st/st.js ADDED
@@ -0,0 +1,415 @@
1
+ const conf = {
2
+ comments: {
3
+ lineComment: "//",
4
+ blockComment: ["(*", "*)"]
5
+ },
6
+ brackets: [
7
+ ["{", "}"],
8
+ ["[", "]"],
9
+ ["(", ")"],
10
+ ["var", "end_var"],
11
+ ["var_input", "end_var"],
12
+ ["var_output", "end_var"],
13
+ ["var_in_out", "end_var"],
14
+ ["var_temp", "end_var"],
15
+ ["var_global", "end_var"],
16
+ ["var_access", "end_var"],
17
+ ["var_external", "end_var"],
18
+ ["type", "end_type"],
19
+ ["struct", "end_struct"],
20
+ ["program", "end_program"],
21
+ ["function", "end_function"],
22
+ ["function_block", "end_function_block"],
23
+ ["action", "end_action"],
24
+ ["step", "end_step"],
25
+ ["initial_step", "end_step"],
26
+ ["transaction", "end_transaction"],
27
+ ["configuration", "end_configuration"],
28
+ ["tcp", "end_tcp"],
29
+ ["recource", "end_recource"],
30
+ ["channel", "end_channel"],
31
+ ["library", "end_library"],
32
+ ["folder", "end_folder"],
33
+ ["binaries", "end_binaries"],
34
+ ["includes", "end_includes"],
35
+ ["sources", "end_sources"]
36
+ ],
37
+ autoClosingPairs: [
38
+ { open: "[", close: "]" },
39
+ { open: "{", close: "}" },
40
+ { open: "(", close: ")" },
41
+ { open: "/*", close: "*/" },
42
+ { open: "'", close: "'", notIn: ["string_sq"] },
43
+ { open: '"', close: '"', notIn: ["string_dq"] },
44
+ { open: "var_input", close: "end_var" },
45
+ { open: "var_output", close: "end_var" },
46
+ { open: "var_in_out", close: "end_var" },
47
+ { open: "var_temp", close: "end_var" },
48
+ { open: "var_global", close: "end_var" },
49
+ { open: "var_access", close: "end_var" },
50
+ { open: "var_external", close: "end_var" },
51
+ { open: "type", close: "end_type" },
52
+ { open: "struct", close: "end_struct" },
53
+ { open: "program", close: "end_program" },
54
+ { open: "function", close: "end_function" },
55
+ { open: "function_block", close: "end_function_block" },
56
+ { open: "action", close: "end_action" },
57
+ { open: "step", close: "end_step" },
58
+ { open: "initial_step", close: "end_step" },
59
+ { open: "transaction", close: "end_transaction" },
60
+ { open: "configuration", close: "end_configuration" },
61
+ { open: "tcp", close: "end_tcp" },
62
+ { open: "recource", close: "end_recource" },
63
+ { open: "channel", close: "end_channel" },
64
+ { open: "library", close: "end_library" },
65
+ { open: "folder", close: "end_folder" },
66
+ { open: "binaries", close: "end_binaries" },
67
+ { open: "includes", close: "end_includes" },
68
+ { open: "sources", close: "end_sources" }
69
+ ],
70
+ surroundingPairs: [
71
+ { open: "{", close: "}" },
72
+ { open: "[", close: "]" },
73
+ { open: "(", close: ")" },
74
+ { open: '"', close: '"' },
75
+ { open: "'", close: "'" },
76
+ { open: "var", close: "end_var" },
77
+ { open: "var_input", close: "end_var" },
78
+ { open: "var_output", close: "end_var" },
79
+ { open: "var_in_out", close: "end_var" },
80
+ { open: "var_temp", close: "end_var" },
81
+ { open: "var_global", close: "end_var" },
82
+ { open: "var_access", close: "end_var" },
83
+ { open: "var_external", close: "end_var" },
84
+ { open: "type", close: "end_type" },
85
+ { open: "struct", close: "end_struct" },
86
+ { open: "program", close: "end_program" },
87
+ { open: "function", close: "end_function" },
88
+ { open: "function_block", close: "end_function_block" },
89
+ { open: "action", close: "end_action" },
90
+ { open: "step", close: "end_step" },
91
+ { open: "initial_step", close: "end_step" },
92
+ { open: "transaction", close: "end_transaction" },
93
+ { open: "configuration", close: "end_configuration" },
94
+ { open: "tcp", close: "end_tcp" },
95
+ { open: "recource", close: "end_recource" },
96
+ { open: "channel", close: "end_channel" },
97
+ { open: "library", close: "end_library" },
98
+ { open: "folder", close: "end_folder" },
99
+ { open: "binaries", close: "end_binaries" },
100
+ { open: "includes", close: "end_includes" },
101
+ { open: "sources", close: "end_sources" }
102
+ ],
103
+ folding: {
104
+ markers: {
105
+ start: new RegExp("^\\s*#pragma\\s+region\\b"),
106
+ end: new RegExp("^\\s*#pragma\\s+endregion\\b")
107
+ }
108
+ }
109
+ };
110
+ const language = {
111
+ defaultToken: "",
112
+ tokenPostfix: ".st",
113
+ ignoreCase: true,
114
+ brackets: [
115
+ { token: "delimiter.curly", open: "{", close: "}" },
116
+ { token: "delimiter.parenthesis", open: "(", close: ")" },
117
+ { token: "delimiter.square", open: "[", close: "]" }
118
+ ],
119
+ keywords: [
120
+ "if",
121
+ "end_if",
122
+ "elsif",
123
+ "else",
124
+ "case",
125
+ "of",
126
+ "to",
127
+ "__try",
128
+ "__catch",
129
+ "__finally",
130
+ "do",
131
+ "with",
132
+ "by",
133
+ "while",
134
+ "repeat",
135
+ "end_while",
136
+ "end_repeat",
137
+ "end_case",
138
+ "for",
139
+ "end_for",
140
+ "task",
141
+ "retain",
142
+ "non_retain",
143
+ "constant",
144
+ "with",
145
+ "at",
146
+ "exit",
147
+ "return",
148
+ "interval",
149
+ "priority",
150
+ "address",
151
+ "port",
152
+ "on_channel",
153
+ "then",
154
+ "iec",
155
+ "file",
156
+ "uses",
157
+ "version",
158
+ "packagetype",
159
+ "displayname",
160
+ "copyright",
161
+ "summary",
162
+ "vendor",
163
+ "common_source",
164
+ "from",
165
+ "extends",
166
+ "implements"
167
+ ],
168
+ constant: ["false", "true", "null"],
169
+ defineKeywords: [
170
+ "var",
171
+ "var_input",
172
+ "var_output",
173
+ "var_in_out",
174
+ "var_temp",
175
+ "var_global",
176
+ "var_access",
177
+ "var_external",
178
+ "end_var",
179
+ "type",
180
+ "end_type",
181
+ "struct",
182
+ "end_struct",
183
+ "program",
184
+ "end_program",
185
+ "function",
186
+ "end_function",
187
+ "function_block",
188
+ "end_function_block",
189
+ "interface",
190
+ "end_interface",
191
+ "method",
192
+ "end_method",
193
+ "property",
194
+ "end_property",
195
+ "namespace",
196
+ "end_namespace",
197
+ "configuration",
198
+ "end_configuration",
199
+ "tcp",
200
+ "end_tcp",
201
+ "resource",
202
+ "end_resource",
203
+ "channel",
204
+ "end_channel",
205
+ "library",
206
+ "end_library",
207
+ "folder",
208
+ "end_folder",
209
+ "binaries",
210
+ "end_binaries",
211
+ "includes",
212
+ "end_includes",
213
+ "sources",
214
+ "end_sources",
215
+ "action",
216
+ "end_action",
217
+ "step",
218
+ "initial_step",
219
+ "end_step",
220
+ "transaction",
221
+ "end_transaction"
222
+ ],
223
+ typeKeywords: [
224
+ "int",
225
+ "sint",
226
+ "dint",
227
+ "lint",
228
+ "usint",
229
+ "uint",
230
+ "udint",
231
+ "ulint",
232
+ "real",
233
+ "lreal",
234
+ "time",
235
+ "date",
236
+ "time_of_day",
237
+ "date_and_time",
238
+ "string",
239
+ "bool",
240
+ "byte",
241
+ "word",
242
+ "dword",
243
+ "array",
244
+ "pointer",
245
+ "lword"
246
+ ],
247
+ operators: [
248
+ "=",
249
+ ">",
250
+ "<",
251
+ ":",
252
+ ":=",
253
+ "<=",
254
+ ">=",
255
+ "<>",
256
+ "&",
257
+ "+",
258
+ "-",
259
+ "*",
260
+ "**",
261
+ "MOD",
262
+ "^",
263
+ "or",
264
+ "and",
265
+ "not",
266
+ "xor",
267
+ "abs",
268
+ "acos",
269
+ "asin",
270
+ "atan",
271
+ "cos",
272
+ "exp",
273
+ "expt",
274
+ "ln",
275
+ "log",
276
+ "sin",
277
+ "sqrt",
278
+ "tan",
279
+ "sel",
280
+ "max",
281
+ "min",
282
+ "limit",
283
+ "mux",
284
+ "shl",
285
+ "shr",
286
+ "rol",
287
+ "ror",
288
+ "indexof",
289
+ "sizeof",
290
+ "adr",
291
+ "adrinst",
292
+ "bitadr",
293
+ "is_valid",
294
+ "ref",
295
+ "ref_to"
296
+ ],
297
+ builtinVariables: [],
298
+ builtinFunctions: [
299
+ "sr",
300
+ "rs",
301
+ "tp",
302
+ "ton",
303
+ "tof",
304
+ "eq",
305
+ "ge",
306
+ "le",
307
+ "lt",
308
+ "ne",
309
+ "round",
310
+ "trunc",
311
+ "ctd",
312
+ "\u0441tu",
313
+ "ctud",
314
+ "r_trig",
315
+ "f_trig",
316
+ "move",
317
+ "concat",
318
+ "delete",
319
+ "find",
320
+ "insert",
321
+ "left",
322
+ "len",
323
+ "replace",
324
+ "right",
325
+ "rtc"
326
+ ],
327
+ // we include these common regular expressions
328
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
329
+ // C# style strings
330
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
331
+ // The main tokenizer for our languages
332
+ tokenizer: {
333
+ root: [
334
+ [/(\.\.)/, "delimiter"],
335
+ [/\b(16#[0-9A-Fa-f\_]*)+\b/, "number.hex"],
336
+ [/\b(2#[01\_]+)+\b/, "number.binary"],
337
+ [/\b(8#[0-9\_]*)+\b/, "number.octal"],
338
+ [/\b\d*\.\d+([eE][\-+]?\d+)?\b/, "number.float"],
339
+ [/\b(L?REAL)#[0-9\_\.e]+\b/, "number.float"],
340
+ [/\b(BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT)#[0-9\_]+\b/, "number"],
341
+ [/\d+/, "number"],
342
+ [/\b(T|DT|TOD)#[0-9:-_shmyd]+\b/, "tag"],
343
+ [/\%(I|Q|M)(X|B|W|D|L)[0-9\.]+/, "tag"],
344
+ [/\%(I|Q|M)[0-9\.]*/, "tag"],
345
+ [/\b[A-Za-z]{1,6}#[0-9]+\b/, "tag"],
346
+ [/\b(TO_|CTU_|CTD_|CTUD_|MUX_|SEL_)[A_Za-z]+\b/, "predefined"],
347
+ [/\b[A_Za-z]+(_TO_)[A_Za-z]+\b/, "predefined"],
348
+ [/[;]/, "delimiter"],
349
+ [/[.]/, { token: "delimiter", next: "@params" }],
350
+ // identifiers and keywords
351
+ [
352
+ /[a-zA-Z_]\w*/,
353
+ {
354
+ cases: {
355
+ "@operators": "operators",
356
+ "@keywords": "keyword",
357
+ "@typeKeywords": "type",
358
+ "@defineKeywords": "variable",
359
+ "@constant": "constant",
360
+ "@builtinVariables": "predefined",
361
+ "@builtinFunctions": "predefined",
362
+ "@default": "identifier"
363
+ }
364
+ }
365
+ ],
366
+ { include: "@whitespace" },
367
+ [/[{}()\[\]]/, "@brackets"],
368
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
369
+ // non-teminated string
370
+ [/"/, { token: "string.quote", bracket: "@open", next: "@string_dq" }],
371
+ [/'/, { token: "string.quote", bracket: "@open", next: "@string_sq" }],
372
+ [/'[^\\']'/, "string"],
373
+ [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
374
+ [/'/, "string.invalid"]
375
+ ],
376
+ params: [
377
+ [/\b[A-Za-z0-9_]+\b(?=\()/, { token: "identifier", next: "@pop" }],
378
+ [/\b[A-Za-z0-9_]+\b/, "variable.name", "@pop"]
379
+ ],
380
+ comment: [
381
+ [/[^\/*]+/, "comment"],
382
+ [/\/\*/, "comment", "@push"],
383
+ // nested comment
384
+ ["\\*/", "comment", "@pop"],
385
+ [/[\/*]/, "comment"]
386
+ ],
387
+ comment2: [
388
+ [/[^\(*]+/, "comment"],
389
+ [/\(\*/, "comment", "@push"],
390
+ // nested comment
391
+ ["\\*\\)", "comment", "@pop"],
392
+ [/[\(*]/, "comment"]
393
+ ],
394
+ whitespace: [
395
+ [/[ \t\r\n]+/, "white"],
396
+ [/\/\/.*$/, "comment"],
397
+ [/\/\*/, "comment", "@comment"],
398
+ [/\(\*/, "comment", "@comment2"]
399
+ ],
400
+ string_dq: [
401
+ [/[^\\"]+/, "string"],
402
+ [/@escapes/, "string.escape"],
403
+ [/\\./, "string.escape.invalid"],
404
+ [/"/, { token: "string.quote", bracket: "@close", next: "@pop" }]
405
+ ],
406
+ string_sq: [
407
+ [/[^\\']+/, "string"],
408
+ [/@escapes/, "string.escape"],
409
+ [/\\./, "string.escape.invalid"],
410
+ [/'/, { token: "string.quote", bracket: "@close", next: "@pop" }]
411
+ ]
412
+ }
413
+ };
414
+
415
+ export { conf, language };
@@ -0,0 +1,9 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "swift",
5
+ aliases: ["Swift", "swift"],
6
+ extensions: [".swift"],
7
+ mimetypes: ["text/swift"],
8
+ loader: () => import('./swift.js')
9
+ });