@codingame/monaco-vscode-standalone-languages 3.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 (163) hide show
  1. package/_.contribution.js +74 -0
  2. package/abap/abap.contribution.js +19 -0
  3. package/abap/abap.js +1406 -0
  4. package/apex/apex.contribution.js +20 -0
  5. package/apex/apex.js +338 -0
  6. package/azcli/azcli.contribution.js +19 -0
  7. package/azcli/azcli.js +76 -0
  8. package/bat/bat.contribution.js +19 -0
  9. package/bat/bat.js +108 -0
  10. package/bicep/bicep.contribution.js +19 -0
  11. package/bicep/bicep.js +117 -0
  12. package/cameligo/cameligo.contribution.js +19 -0
  13. package/cameligo/cameligo.js +182 -0
  14. package/clojure/clojure.contribution.js +19 -0
  15. package/clojure/clojure.js +769 -0
  16. package/coffee/coffee.contribution.js +20 -0
  17. package/coffee/coffee.js +240 -0
  18. package/cpp/cpp.contribution.js +29 -0
  19. package/cpp/cpp.js +409 -0
  20. package/csharp/csharp.contribution.js +19 -0
  21. package/csharp/csharp.js +334 -0
  22. package/csp/csp.contribution.js +19 -0
  23. package/csp/csp.js +61 -0
  24. package/css/css.contribution.js +20 -0
  25. package/css/css.js +193 -0
  26. package/cypher/cypher.contribution.js +19 -0
  27. package/cypher/cypher.js +271 -0
  28. package/dart/dart.contribution.js +20 -0
  29. package/dart/dart.js +289 -0
  30. package/dockerfile/dockerfile.contribution.js +20 -0
  31. package/dockerfile/dockerfile.js +138 -0
  32. package/ecl/ecl.contribution.js +19 -0
  33. package/ecl/ecl.js +464 -0
  34. package/elixir/elixir.contribution.js +19 -0
  35. package/elixir/elixir.js +577 -0
  36. package/flow9/flow9.contribution.js +19 -0
  37. package/flow9/flow9.js +150 -0
  38. package/freemarker2/freemarker2.contribution.js +73 -0
  39. package/freemarker2/freemarker2.js +1016 -0
  40. package/fsharp/fsharp.contribution.js +19 -0
  41. package/fsharp/fsharp.js +225 -0
  42. package/go/go.contribution.js +19 -0
  43. package/go/go.js +226 -0
  44. package/graphql/graphql.contribution.js +20 -0
  45. package/graphql/graphql.js +159 -0
  46. package/handlebars/handlebars.contribution.js +20 -0
  47. package/handlebars/handlebars.js +439 -0
  48. package/hcl/hcl.contribution.js +19 -0
  49. package/hcl/hcl.js +191 -0
  50. package/html/html.contribution.js +20 -0
  51. package/html/html.js +328 -0
  52. package/index.js +81 -0
  53. package/ini/ini.contribution.js +20 -0
  54. package/ini/ini.js +79 -0
  55. package/java/java.contribution.js +20 -0
  56. package/java/java.js +240 -0
  57. package/javascript/javascript.contribution.js +22 -0
  58. package/javascript/javascript.js +77 -0
  59. package/julia/julia.contribution.js +19 -0
  60. package/julia/julia.js +519 -0
  61. package/kotlin/kotlin.contribution.js +20 -0
  62. package/kotlin/kotlin.js +261 -0
  63. package/less/less.contribution.js +20 -0
  64. package/less/less.js +169 -0
  65. package/lexon/lexon.contribution.js +19 -0
  66. package/lexon/lexon.js +165 -0
  67. package/liquid/liquid.contribution.js +20 -0
  68. package/liquid/liquid.js +260 -0
  69. package/lua/lua.contribution.js +19 -0
  70. package/lua/lua.js +170 -0
  71. package/m3/m3.contribution.js +19 -0
  72. package/m3/m3.js +218 -0
  73. package/markdown/markdown.contribution.js +19 -0
  74. package/markdown/markdown.js +237 -0
  75. package/mdx/mdx.contribution.js +19 -0
  76. package/mdx/mdx.js +184 -0
  77. package/mips/mips.contribution.js +20 -0
  78. package/mips/mips.js +206 -0
  79. package/msdax/msdax.contribution.js +19 -0
  80. package/msdax/msdax.js +383 -0
  81. package/mysql/mysql.contribution.js +19 -0
  82. package/mysql/mysql.js +886 -0
  83. package/objective-c/objective-c.contribution.js +19 -0
  84. package/objective-c/objective-c.js +191 -0
  85. package/package.json +23 -0
  86. package/pascal/pascal.contribution.js +20 -0
  87. package/pascal/pascal.js +259 -0
  88. package/pascaligo/pascaligo.contribution.js +19 -0
  89. package/pascaligo/pascaligo.js +172 -0
  90. package/perl/perl.contribution.js +19 -0
  91. package/perl/perl.js +634 -0
  92. package/pgsql/pgsql.contribution.js +19 -0
  93. package/pgsql/pgsql.js +859 -0
  94. package/php/php.contribution.js +20 -0
  95. package/php/php.js +508 -0
  96. package/pla/pla.contribution.js +18 -0
  97. package/pla/pla.js +145 -0
  98. package/postiats/postiats.contribution.js +19 -0
  99. package/postiats/postiats.js +915 -0
  100. package/powerquery/powerquery.contribution.js +19 -0
  101. package/powerquery/powerquery.js +898 -0
  102. package/powershell/powershell.contribution.js +19 -0
  103. package/powershell/powershell.js +247 -0
  104. package/protobuf/protobuf.contribution.js +19 -0
  105. package/protobuf/protobuf.js +428 -0
  106. package/pug/pug.contribution.js +19 -0
  107. package/pug/pug.js +410 -0
  108. package/python/python.contribution.js +20 -0
  109. package/python/python.js +295 -0
  110. package/qsharp/qsharp.contribution.js +19 -0
  111. package/qsharp/qsharp.js +293 -0
  112. package/r/r.contribution.js +19 -0
  113. package/r/r.js +251 -0
  114. package/razor/razor.contribution.js +20 -0
  115. package/razor/razor.js +570 -0
  116. package/redis/redis.contribution.js +19 -0
  117. package/redis/redis.js +310 -0
  118. package/redshift/redshift.contribution.js +19 -0
  119. package/redshift/redshift.js +817 -0
  120. package/restructuredtext/restructuredtext.contribution.js +19 -0
  121. package/restructuredtext/restructuredtext.js +182 -0
  122. package/ruby/ruby.contribution.js +20 -0
  123. package/ruby/ruby.js +519 -0
  124. package/rust/rust.contribution.js +19 -0
  125. package/rust/rust.js +351 -0
  126. package/sb/sb.contribution.js +19 -0
  127. package/sb/sb.js +123 -0
  128. package/scala/scala.contribution.js +20 -0
  129. package/scala/scala.js +378 -0
  130. package/scheme/scheme.contribution.js +19 -0
  131. package/scheme/scheme.js +116 -0
  132. package/scss/scss.contribution.js +20 -0
  133. package/scss/scss.js +268 -0
  134. package/shell/shell.contribution.js +19 -0
  135. package/shell/shell.js +229 -0
  136. package/solidity/solidity.contribution.js +19 -0
  137. package/solidity/solidity.js +1375 -0
  138. package/sophia/sophia.contribution.js +19 -0
  139. package/sophia/sophia.js +207 -0
  140. package/sparql/sparql.contribution.js +19 -0
  141. package/sparql/sparql.js +209 -0
  142. package/sql/sql.contribution.js +19 -0
  143. package/sql/sql.js +861 -0
  144. package/st/st.contribution.js +19 -0
  145. package/st/st.js +424 -0
  146. package/swift/swift.contribution.js +20 -0
  147. package/swift/swift.js +320 -0
  148. package/systemverilog/systemverilog.contribution.js +29 -0
  149. package/systemverilog/systemverilog.js +584 -0
  150. package/tcl/tcl.contribution.js +19 -0
  151. package/tcl/tcl.js +240 -0
  152. package/twig/twig.contribution.js +20 -0
  153. package/twig/twig.js +400 -0
  154. package/typescript/typescript.contribution.js +20 -0
  155. package/typescript/typescript.js +362 -0
  156. package/vb/vb.contribution.js +19 -0
  157. package/vb/vb.js +380 -0
  158. package/wgsl/wgsl.contribution.js +19 -0
  159. package/wgsl/wgsl.js +461 -0
  160. package/xml/xml.contribution.js +39 -0
  161. package/xml/xml.js +114 -0
  162. package/yaml/yaml.contribution.js +20 -0
  163. package/yaml/yaml.js +225 -0
@@ -0,0 +1,20 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ /*!-----------------------------------------------------------------------------
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Version: 0.47.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: "apex",
12
+ extensions: [".cls"],
13
+ aliases: ["Apex", "apex"],
14
+ mimetypes: ["text/x-apex-source", "text/x-apex"],
15
+ loader: () => {
16
+ {
17
+ return import('./apex.js');
18
+ }
19
+ }
20
+ });
package/apex/apex.js ADDED
@@ -0,0 +1,338 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Version: 0.47.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/apex/apex.ts
10
+ var conf = {
11
+ // the default separators except `@$`
12
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
13
+ comments: {
14
+ lineComment: "//",
15
+ blockComment: ["/*", "*/"]
16
+ },
17
+ brackets: [
18
+ ["{", "}"],
19
+ ["[", "]"],
20
+ ["(", ")"]
21
+ ],
22
+ autoClosingPairs: [
23
+ { open: "{", close: "}" },
24
+ { open: "[", close: "]" },
25
+ { open: "(", close: ")" },
26
+ { open: '"', close: '"' },
27
+ { open: "'", close: "'" }
28
+ ],
29
+ surroundingPairs: [
30
+ { open: "{", close: "}" },
31
+ { open: "[", close: "]" },
32
+ { open: "(", close: ")" },
33
+ { open: '"', close: '"' },
34
+ { open: "'", close: "'" },
35
+ { open: "<", close: ">" }
36
+ ],
37
+ folding: {
38
+ markers: {
39
+ start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
40
+ end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
41
+ }
42
+ }
43
+ };
44
+ var keywords = [
45
+ "abstract",
46
+ "activate",
47
+ "and",
48
+ "any",
49
+ "array",
50
+ "as",
51
+ "asc",
52
+ "assert",
53
+ "autonomous",
54
+ "begin",
55
+ "bigdecimal",
56
+ "blob",
57
+ "boolean",
58
+ "break",
59
+ "bulk",
60
+ "by",
61
+ "case",
62
+ "cast",
63
+ "catch",
64
+ "char",
65
+ "class",
66
+ "collect",
67
+ "commit",
68
+ "const",
69
+ "continue",
70
+ "convertcurrency",
71
+ "decimal",
72
+ "default",
73
+ "delete",
74
+ "desc",
75
+ "do",
76
+ "double",
77
+ "else",
78
+ "end",
79
+ "enum",
80
+ "exception",
81
+ "exit",
82
+ "export",
83
+ "extends",
84
+ "false",
85
+ "final",
86
+ "finally",
87
+ "float",
88
+ "for",
89
+ "from",
90
+ "future",
91
+ "get",
92
+ "global",
93
+ "goto",
94
+ "group",
95
+ "having",
96
+ "hint",
97
+ "if",
98
+ "implements",
99
+ "import",
100
+ "in",
101
+ "inner",
102
+ "insert",
103
+ "instanceof",
104
+ "int",
105
+ "interface",
106
+ "into",
107
+ "join",
108
+ "last_90_days",
109
+ "last_month",
110
+ "last_n_days",
111
+ "last_week",
112
+ "like",
113
+ "limit",
114
+ "list",
115
+ "long",
116
+ "loop",
117
+ "map",
118
+ "merge",
119
+ "native",
120
+ "new",
121
+ "next_90_days",
122
+ "next_month",
123
+ "next_n_days",
124
+ "next_week",
125
+ "not",
126
+ "null",
127
+ "nulls",
128
+ "number",
129
+ "object",
130
+ "of",
131
+ "on",
132
+ "or",
133
+ "outer",
134
+ "override",
135
+ "package",
136
+ "parallel",
137
+ "pragma",
138
+ "private",
139
+ "protected",
140
+ "public",
141
+ "retrieve",
142
+ "return",
143
+ "returning",
144
+ "rollback",
145
+ "savepoint",
146
+ "search",
147
+ "select",
148
+ "set",
149
+ "short",
150
+ "sort",
151
+ "stat",
152
+ "static",
153
+ "strictfp",
154
+ "super",
155
+ "switch",
156
+ "synchronized",
157
+ "system",
158
+ "testmethod",
159
+ "then",
160
+ "this",
161
+ "this_month",
162
+ "this_week",
163
+ "throw",
164
+ "throws",
165
+ "today",
166
+ "tolabel",
167
+ "tomorrow",
168
+ "transaction",
169
+ "transient",
170
+ "trigger",
171
+ "true",
172
+ "try",
173
+ "type",
174
+ "undelete",
175
+ "update",
176
+ "upsert",
177
+ "using",
178
+ "virtual",
179
+ "void",
180
+ "volatile",
181
+ "webservice",
182
+ "when",
183
+ "where",
184
+ "while",
185
+ "yesterday"
186
+ ];
187
+ var uppercaseFirstLetter = (lowercase) => lowercase.charAt(0).toUpperCase() + lowercase.substr(1);
188
+ var keywordsWithCaseVariations = [];
189
+ keywords.forEach((lowercase) => {
190
+ keywordsWithCaseVariations.push(lowercase);
191
+ keywordsWithCaseVariations.push(lowercase.toUpperCase());
192
+ keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase));
193
+ });
194
+ var language = {
195
+ defaultToken: "",
196
+ tokenPostfix: ".apex",
197
+ keywords: keywordsWithCaseVariations,
198
+ operators: [
199
+ "=",
200
+ ">",
201
+ "<",
202
+ "!",
203
+ "~",
204
+ "?",
205
+ ":",
206
+ "==",
207
+ "<=",
208
+ ">=",
209
+ "!=",
210
+ "&&",
211
+ "||",
212
+ "++",
213
+ "--",
214
+ "+",
215
+ "-",
216
+ "*",
217
+ "/",
218
+ "&",
219
+ "|",
220
+ "^",
221
+ "%",
222
+ "<<",
223
+ ">>",
224
+ ">>>",
225
+ "+=",
226
+ "-=",
227
+ "*=",
228
+ "/=",
229
+ "&=",
230
+ "|=",
231
+ "^=",
232
+ "%=",
233
+ "<<=",
234
+ ">>=",
235
+ ">>>="
236
+ ],
237
+ // we include these common regular expressions
238
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
239
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
240
+ digits: /\d+(_+\d+)*/,
241
+ octaldigits: /[0-7]+(_+[0-7]+)*/,
242
+ binarydigits: /[0-1]+(_+[0-1]+)*/,
243
+ hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
244
+ // The main tokenizer for our languages
245
+ tokenizer: {
246
+ root: [
247
+ // identifiers and keywords
248
+ [
249
+ /[a-z_$][\w$]*/,
250
+ {
251
+ cases: {
252
+ "@keywords": { token: "keyword.$0" },
253
+ "@default": "identifier"
254
+ }
255
+ }
256
+ ],
257
+ // assume that identifiers starting with an uppercase letter are types
258
+ [
259
+ /[A-Z][\w\$]*/,
260
+ {
261
+ cases: {
262
+ "@keywords": { token: "keyword.$0" },
263
+ "@default": "type.identifier"
264
+ }
265
+ }
266
+ ],
267
+ // whitespace
268
+ { include: "@whitespace" },
269
+ // delimiters and operators
270
+ [/[{}()\[\]]/, "@brackets"],
271
+ [/[<>](?!@symbols)/, "@brackets"],
272
+ [
273
+ /@symbols/,
274
+ {
275
+ cases: {
276
+ "@operators": "delimiter",
277
+ "@default": ""
278
+ }
279
+ }
280
+ ],
281
+ // @ annotations.
282
+ [/@\s*[a-zA-Z_\$][\w\$]*/, "annotation"],
283
+ // numbers
284
+ [/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, "number.float"],
285
+ [/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, "number.float"],
286
+ [/(@digits)[fFdD]/, "number.float"],
287
+ [/(@digits)[lL]?/, "number"],
288
+ // delimiter: after number because of .\d floats
289
+ [/[;,.]/, "delimiter"],
290
+ // strings
291
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
292
+ // non-teminated string
293
+ [/'([^'\\]|\\.)*$/, "string.invalid"],
294
+ // non-teminated string
295
+ [/"/, "string", '@string."'],
296
+ [/'/, "string", "@string.'"],
297
+ // characters
298
+ [/'[^\\']'/, "string"],
299
+ [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
300
+ [/'/, "string.invalid"]
301
+ ],
302
+ whitespace: [
303
+ [/[ \t\r\n]+/, ""],
304
+ [/\/\*\*(?!\/)/, "comment.doc", "@apexdoc"],
305
+ [/\/\*/, "comment", "@comment"],
306
+ [/\/\/.*$/, "comment"]
307
+ ],
308
+ comment: [
309
+ [/[^\/*]+/, "comment"],
310
+ // [/\/\*/, 'comment', '@push' ], // nested comment not allowed :-(
311
+ // [/\/\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/
312
+ [/\*\//, "comment", "@pop"],
313
+ [/[\/*]/, "comment"]
314
+ ],
315
+ //Identical copy of comment above, except for the addition of .doc
316
+ apexdoc: [
317
+ [/[^\/*]+/, "comment.doc"],
318
+ [/\*\//, "comment.doc", "@pop"],
319
+ [/[\/*]/, "comment.doc"]
320
+ ],
321
+ string: [
322
+ [/[^\\"']+/, "string"],
323
+ [/@escapes/, "string.escape"],
324
+ [/\\./, "string.escape.invalid"],
325
+ [
326
+ /["']/,
327
+ {
328
+ cases: {
329
+ "$#==$S2": { token: "string", next: "@pop" },
330
+ "@default": "string"
331
+ }
332
+ }
333
+ ]
334
+ ]
335
+ }
336
+ };
337
+
338
+ export { conf, language };
@@ -0,0 +1,19 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ /*!-----------------------------------------------------------------------------
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Version: 0.47.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: "azcli",
12
+ extensions: [".azcli"],
13
+ aliases: ["Azure CLI", "azcli"],
14
+ loader: () => {
15
+ {
16
+ return import('./azcli.js');
17
+ }
18
+ }
19
+ });
package/azcli/azcli.js ADDED
@@ -0,0 +1,76 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Version: 0.47.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/azcli/azcli.ts
10
+ var conf = {
11
+ comments: {
12
+ lineComment: "#"
13
+ }
14
+ };
15
+ var language = {
16
+ defaultToken: "keyword",
17
+ ignoreCase: true,
18
+ tokenPostfix: ".azcli",
19
+ str: /[^#\s]/,
20
+ tokenizer: {
21
+ root: [
22
+ { include: "@comment" },
23
+ [
24
+ /\s-+@str*\s*/,
25
+ {
26
+ cases: {
27
+ "@eos": { token: "key.identifier", next: "@popall" },
28
+ "@default": { token: "key.identifier", next: "@type" }
29
+ }
30
+ }
31
+ ],
32
+ [
33
+ /^-+@str*\s*/,
34
+ {
35
+ cases: {
36
+ "@eos": { token: "key.identifier", next: "@popall" },
37
+ "@default": { token: "key.identifier", next: "@type" }
38
+ }
39
+ }
40
+ ]
41
+ ],
42
+ type: [
43
+ { include: "@comment" },
44
+ [
45
+ /-+@str*\s*/,
46
+ {
47
+ cases: {
48
+ "@eos": { token: "key.identifier", next: "@popall" },
49
+ "@default": "key.identifier"
50
+ }
51
+ }
52
+ ],
53
+ [
54
+ /@str+\s*/,
55
+ {
56
+ cases: {
57
+ "@eos": { token: "string", next: "@popall" },
58
+ "@default": "string"
59
+ }
60
+ }
61
+ ]
62
+ ],
63
+ comment: [
64
+ [
65
+ /#.*$/,
66
+ {
67
+ cases: {
68
+ "@eos": { token: "comment", next: "@popall" }
69
+ }
70
+ }
71
+ ]
72
+ ]
73
+ }
74
+ };
75
+
76
+ export { conf, language };
@@ -0,0 +1,19 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ /*!-----------------------------------------------------------------------------
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Version: 0.47.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: "bat",
12
+ extensions: [".bat", ".cmd"],
13
+ aliases: ["Batch", "bat"],
14
+ loader: () => {
15
+ {
16
+ return import('./bat.js');
17
+ }
18
+ }
19
+ });
package/bat/bat.js ADDED
@@ -0,0 +1,108 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Version: 0.47.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/bat/bat.ts
10
+ var conf = {
11
+ comments: {
12
+ lineComment: "REM"
13
+ },
14
+ brackets: [
15
+ ["{", "}"],
16
+ ["[", "]"],
17
+ ["(", ")"]
18
+ ],
19
+ autoClosingPairs: [
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
+ ],
30
+ folding: {
31
+ markers: {
32
+ start: new RegExp("^\\s*(::\\s*|REM\\s+)#region"),
33
+ end: new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")
34
+ }
35
+ }
36
+ };
37
+ var language = {
38
+ defaultToken: "",
39
+ ignoreCase: true,
40
+ tokenPostfix: ".bat",
41
+ brackets: [
42
+ { token: "delimiter.bracket", open: "{", close: "}" },
43
+ { token: "delimiter.parenthesis", open: "(", close: ")" },
44
+ { token: "delimiter.square", open: "[", close: "]" }
45
+ ],
46
+ keywords: /call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,
47
+ // we include these common regular expressions
48
+ symbols: /[=><!~?&|+\-*\/\^;\.,]+/,
49
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
50
+ // The main tokenizer for our languages
51
+ tokenizer: {
52
+ root: [
53
+ [/^(\s*)(rem(?:\s.*|))$/, ["", "comment"]],
54
+ [/(\@?)(@keywords)(?!\w)/, [{ token: "keyword" }, { token: "keyword.$2" }]],
55
+ // whitespace
56
+ [/[ \t\r\n]+/, ""],
57
+ // blocks
58
+ [/setlocal(?!\w)/, "keyword.tag-setlocal"],
59
+ [/endlocal(?!\w)/, "keyword.tag-setlocal"],
60
+ // words
61
+ [/[a-zA-Z_]\w*/, ""],
62
+ // labels
63
+ [/:\w*/, "metatag"],
64
+ // variables
65
+ [/%[^%]+%/, "variable"],
66
+ [/%%[\w]+(?!\w)/, "variable"],
67
+ // punctuations
68
+ [/[{}()\[\]]/, "@brackets"],
69
+ [/@symbols/, "delimiter"],
70
+ // numbers
71
+ [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
72
+ [/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, "number.hex"],
73
+ [/\d+/, "number"],
74
+ // punctuation: after number because of .\d floats
75
+ [/[;,.]/, "delimiter"],
76
+ // strings:
77
+ [/"/, "string", '@string."'],
78
+ [/'/, "string", "@string.'"]
79
+ ],
80
+ string: [
81
+ [
82
+ /[^\\"'%]+/,
83
+ {
84
+ cases: {
85
+ "@eos": { token: "string", next: "@popall" },
86
+ "@default": "string"
87
+ }
88
+ }
89
+ ],
90
+ [/@escapes/, "string.escape"],
91
+ [/\\./, "string.escape.invalid"],
92
+ [/%[\w ]+%/, "variable"],
93
+ [/%%[\w]+(?!\w)/, "variable"],
94
+ [
95
+ /["']/,
96
+ {
97
+ cases: {
98
+ "$#==$S2": { token: "string", next: "@pop" },
99
+ "@default": "string"
100
+ }
101
+ }
102
+ ],
103
+ [/$/, "string", "@popall"]
104
+ ]
105
+ }
106
+ };
107
+
108
+ export { conf, language };
@@ -0,0 +1,19 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ /*!-----------------------------------------------------------------------------
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Version: 0.47.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: "bicep",
12
+ extensions: [".bicep"],
13
+ aliases: ["Bicep"],
14
+ loader: () => {
15
+ {
16
+ return import('./bicep.js');
17
+ }
18
+ }
19
+ });