@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
package/wgsl/wgsl.js ADDED
@@ -0,0 +1,461 @@
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/wgsl/wgsl.ts
10
+ var conf = {
11
+ comments: {
12
+ lineComment: "//",
13
+ blockComment: ["/*", "*/"]
14
+ },
15
+ brackets: [
16
+ ["{", "}"],
17
+ ["[", "]"],
18
+ ["(", ")"]
19
+ ],
20
+ autoClosingPairs: [
21
+ { open: "[", close: "]" },
22
+ { open: "{", close: "}" },
23
+ { open: "(", close: ")" }
24
+ ],
25
+ surroundingPairs: [
26
+ { open: "{", close: "}" },
27
+ { open: "[", close: "]" },
28
+ { open: "(", close: ")" }
29
+ ]
30
+ };
31
+ function qw(str) {
32
+ let result = [];
33
+ const words = str.split(/\t+|\r+|\n+| +/);
34
+ for (let i = 0; i < words.length; ++i) {
35
+ if (words[i].length > 0) {
36
+ result.push(words[i]);
37
+ }
38
+ }
39
+ return result;
40
+ }
41
+ var atoms = qw("true false");
42
+ var keywords = qw(`
43
+ alias
44
+ break
45
+ case
46
+ const
47
+ const_assert
48
+ continue
49
+ continuing
50
+ default
51
+ diagnostic
52
+ discard
53
+ else
54
+ enable
55
+ fn
56
+ for
57
+ if
58
+ let
59
+ loop
60
+ override
61
+ requires
62
+ return
63
+ struct
64
+ switch
65
+ var
66
+ while
67
+ `);
68
+ var reserved = qw(`
69
+ NULL
70
+ Self
71
+ abstract
72
+ active
73
+ alignas
74
+ alignof
75
+ as
76
+ asm
77
+ asm_fragment
78
+ async
79
+ attribute
80
+ auto
81
+ await
82
+ become
83
+ binding_array
84
+ cast
85
+ catch
86
+ class
87
+ co_await
88
+ co_return
89
+ co_yield
90
+ coherent
91
+ column_major
92
+ common
93
+ compile
94
+ compile_fragment
95
+ concept
96
+ const_cast
97
+ consteval
98
+ constexpr
99
+ constinit
100
+ crate
101
+ debugger
102
+ decltype
103
+ delete
104
+ demote
105
+ demote_to_helper
106
+ do
107
+ dynamic_cast
108
+ enum
109
+ explicit
110
+ export
111
+ extends
112
+ extern
113
+ external
114
+ fallthrough
115
+ filter
116
+ final
117
+ finally
118
+ friend
119
+ from
120
+ fxgroup
121
+ get
122
+ goto
123
+ groupshared
124
+ highp
125
+ impl
126
+ implements
127
+ import
128
+ inline
129
+ instanceof
130
+ interface
131
+ layout
132
+ lowp
133
+ macro
134
+ macro_rules
135
+ match
136
+ mediump
137
+ meta
138
+ mod
139
+ module
140
+ move
141
+ mut
142
+ mutable
143
+ namespace
144
+ new
145
+ nil
146
+ noexcept
147
+ noinline
148
+ nointerpolation
149
+ noperspective
150
+ null
151
+ nullptr
152
+ of
153
+ operator
154
+ package
155
+ packoffset
156
+ partition
157
+ pass
158
+ patch
159
+ pixelfragment
160
+ precise
161
+ precision
162
+ premerge
163
+ priv
164
+ protected
165
+ pub
166
+ public
167
+ readonly
168
+ ref
169
+ regardless
170
+ register
171
+ reinterpret_cast
172
+ require
173
+ resource
174
+ restrict
175
+ self
176
+ set
177
+ shared
178
+ sizeof
179
+ smooth
180
+ snorm
181
+ static
182
+ static_assert
183
+ static_cast
184
+ std
185
+ subroutine
186
+ super
187
+ target
188
+ template
189
+ this
190
+ thread_local
191
+ throw
192
+ trait
193
+ try
194
+ type
195
+ typedef
196
+ typeid
197
+ typename
198
+ typeof
199
+ union
200
+ unless
201
+ unorm
202
+ unsafe
203
+ unsized
204
+ use
205
+ using
206
+ varying
207
+ virtual
208
+ volatile
209
+ wgsl
210
+ where
211
+ with
212
+ writeonly
213
+ yield
214
+ `);
215
+ var predeclared_enums = qw(`
216
+ read write read_write
217
+ function private workgroup uniform storage
218
+ perspective linear flat
219
+ center centroid sample
220
+ vertex_index instance_index position front_facing frag_depth
221
+ local_invocation_id local_invocation_index
222
+ global_invocation_id workgroup_id num_workgroups
223
+ sample_index sample_mask
224
+ rgba8unorm
225
+ rgba8snorm
226
+ rgba8uint
227
+ rgba8sint
228
+ rgba16uint
229
+ rgba16sint
230
+ rgba16float
231
+ r32uint
232
+ r32sint
233
+ r32float
234
+ rg32uint
235
+ rg32sint
236
+ rg32float
237
+ rgba32uint
238
+ rgba32sint
239
+ rgba32float
240
+ bgra8unorm
241
+ `);
242
+ var predeclared_types = qw(`
243
+ bool
244
+ f16
245
+ f32
246
+ i32
247
+ sampler sampler_comparison
248
+ texture_depth_2d
249
+ texture_depth_2d_array
250
+ texture_depth_cube
251
+ texture_depth_cube_array
252
+ texture_depth_multisampled_2d
253
+ texture_external
254
+ texture_external
255
+ u32
256
+ `);
257
+ var predeclared_type_generators = qw(`
258
+ array
259
+ atomic
260
+ mat2x2
261
+ mat2x3
262
+ mat2x4
263
+ mat3x2
264
+ mat3x3
265
+ mat3x4
266
+ mat4x2
267
+ mat4x3
268
+ mat4x4
269
+ ptr
270
+ texture_1d
271
+ texture_2d
272
+ texture_2d_array
273
+ texture_3d
274
+ texture_cube
275
+ texture_cube_array
276
+ texture_multisampled_2d
277
+ texture_storage_1d
278
+ texture_storage_2d
279
+ texture_storage_2d_array
280
+ texture_storage_3d
281
+ vec2
282
+ vec3
283
+ vec4
284
+ `);
285
+ var predeclared_type_aliases = qw(`
286
+ vec2i vec3i vec4i
287
+ vec2u vec3u vec4u
288
+ vec2f vec3f vec4f
289
+ vec2h vec3h vec4h
290
+ mat2x2f mat2x3f mat2x4f
291
+ mat3x2f mat3x3f mat3x4f
292
+ mat4x2f mat4x3f mat4x4f
293
+ mat2x2h mat2x3h mat2x4h
294
+ mat3x2h mat3x3h mat3x4h
295
+ mat4x2h mat4x3h mat4x4h
296
+ `);
297
+ var predeclared_intrinsics = qw(`
298
+ bitcast all any select arrayLength abs acos acosh asin asinh atan atanh atan2
299
+ ceil clamp cos cosh countLeadingZeros countOneBits countTrailingZeros cross
300
+ degrees determinant distance dot exp exp2 extractBits faceForward firstLeadingBit
301
+ firstTrailingBit floor fma fract frexp inverseBits inverseSqrt ldexp length
302
+ log log2 max min mix modf normalize pow quantizeToF16 radians reflect refract
303
+ reverseBits round saturate sign sin sinh smoothstep sqrt step tan tanh transpose
304
+ trunc dpdx dpdxCoarse dpdxFine dpdy dpdyCoarse dpdyFine fwidth fwidthCoarse fwidthFine
305
+ textureDimensions textureGather textureGatherCompare textureLoad textureNumLayers
306
+ textureNumLevels textureNumSamples textureSample textureSampleBias textureSampleCompare
307
+ textureSampleCompareLevel textureSampleGrad textureSampleLevel textureSampleBaseClampToEdge
308
+ textureStore atomicLoad atomicStore atomicAdd atomicSub atomicMax atomicMin
309
+ atomicAnd atomicOr atomicXor atomicExchange atomicCompareExchangeWeak pack4x8snorm
310
+ pack4x8unorm pack2x16snorm pack2x16unorm pack2x16float unpack4x8snorm unpack4x8unorm
311
+ unpack2x16snorm unpack2x16unorm unpack2x16float storageBarrier workgroupBarrier
312
+ workgroupUniformLoad
313
+ `);
314
+ var operators = qw(`
315
+ &
316
+ &&
317
+ ->
318
+ /
319
+ =
320
+ ==
321
+ !=
322
+ >
323
+ >=
324
+ <
325
+ <=
326
+ %
327
+ -
328
+ --
329
+ +
330
+ ++
331
+ |
332
+ ||
333
+ *
334
+ <<
335
+ >>
336
+ +=
337
+ -=
338
+ *=
339
+ /=
340
+ %=
341
+ &=
342
+ |=
343
+ ^=
344
+ >>=
345
+ <<=
346
+ `);
347
+ var directive_re = /enable|requires|diagnostic/;
348
+ var ident_re = /[_\p{XID_Start}]\p{XID_Continue}*/u;
349
+ var predefined_token = "variable.predefined";
350
+ var language = {
351
+ tokenPostfix: ".wgsl",
352
+ defaultToken: "invalid",
353
+ unicode: true,
354
+ atoms,
355
+ keywords,
356
+ reserved,
357
+ predeclared_enums,
358
+ predeclared_types,
359
+ predeclared_type_generators,
360
+ predeclared_type_aliases,
361
+ predeclared_intrinsics,
362
+ operators,
363
+ symbols: /[!%&*+\-\.\/:;<=>^|_~,]+/,
364
+ tokenizer: {
365
+ root: [
366
+ [directive_re, "keyword", "@directive"],
367
+ [
368
+ // Identifier-like things, but also include '_'
369
+ ident_re,
370
+ {
371
+ cases: {
372
+ "@atoms": predefined_token,
373
+ "@keywords": "keyword",
374
+ "@reserved": "invalid",
375
+ "@predeclared_enums": predefined_token,
376
+ "@predeclared_types": predefined_token,
377
+ "@predeclared_type_generators": predefined_token,
378
+ "@predeclared_type_aliases": predefined_token,
379
+ "@predeclared_intrinsics": predefined_token,
380
+ "@default": "identifier"
381
+ }
382
+ }
383
+ ],
384
+ { include: "@commentOrSpace" },
385
+ { include: "@numbers" },
386
+ [/[{}()\[\]]/, "@brackets"],
387
+ ["@", "annotation", "@attribute"],
388
+ [
389
+ /@symbols/,
390
+ {
391
+ cases: {
392
+ "@operators": "operator",
393
+ "@default": "delimiter"
394
+ }
395
+ }
396
+ ],
397
+ [/./, "invalid"]
398
+ ],
399
+ commentOrSpace: [
400
+ [/\s+/, "white"],
401
+ [/\/\*/, "comment", "@blockComment"],
402
+ [/\/\/.*$/, "comment"]
403
+ ],
404
+ blockComment: [
405
+ // Soak up uninteresting text: anything except * or /
406
+ [/[^\/*]+/, "comment"],
407
+ // Recognize the start of a nested block comment.
408
+ [/\/\*/, "comment", "@push"],
409
+ // Recognize the end of a nested block comment.
410
+ [/\*\//, "comment", "@pop"],
411
+ // Recognize insignificant * and /
412
+ [/[\/*]/, "comment"]
413
+ ],
414
+ attribute: [
415
+ // For things like '@fragment' both '@' and 'fragment'
416
+ // are marked as annotations. This should work even if
417
+ // there are spaces or comments between the two tokens.
418
+ { include: "@commentOrSpace" },
419
+ [/\w+/, "annotation", "@pop"]
420
+ ],
421
+ directive: [
422
+ // For things like 'enable f16;', 'enable' maps to 'meta'
423
+ // and 'f16' maps to 'meta.tag'.
424
+ { include: "@commentOrSpace" },
425
+ [/[()]/, "@brackets"],
426
+ [/,/, "delimiter"],
427
+ [ident_re, "meta.content"],
428
+ [/;/, "delimiter", "@pop"]
429
+ ],
430
+ numbers: [
431
+ // Decimal float literals
432
+ // https://www.w3.org/TR/WGSL/#syntax-decimal_float_literal
433
+ // 0, with type-specifying suffix.
434
+ [/0[fh]/, "number.float"],
435
+ // Other decimal integer, with type-specifying suffix.
436
+ [/[1-9][0-9]*[fh]/, "number.float"],
437
+ // Has decimal point, at least one digit after decimal.
438
+ [/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/, "number.float"],
439
+ // Has decimal point, at least one digit before decimal.
440
+ [/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/, "number.float"],
441
+ // Has at least one digit, and has an exponent.
442
+ [/[0-9]+[eE][+-]?[0-9]+[fh]?/, "number.float"],
443
+ // Hex float literals
444
+ // https://www.w3.org/TR/WGSL/#syntax-hex_float_literal
445
+ [/0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+[fh]?)?/, "number.hex"],
446
+ [/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*(?:[pP][+-]?[0-9]+[fh]?)?/, "number.hex"],
447
+ [/0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?/, "number.hex"],
448
+ // Hexadecimal integer literals
449
+ // https://www.w3.org/TR/WGSL/#syntax-hex_int_literal
450
+ [/0[xX][0-9a-fA-F]+[iu]?/, "number.hex"],
451
+ // Decimal integer literals
452
+ // https://www.w3.org/TR/WGSL/#syntax-decimal_int_literal
453
+ // We need two rules here because 01 is not valid.
454
+ [/[1-9][0-9]*[iu]?/, "number"],
455
+ [/0[iu]?/, "number"]
456
+ // Must match last
457
+ ]
458
+ }
459
+ };
460
+
461
+ export { conf, language };
@@ -0,0 +1,39 @@
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: "xml",
12
+ extensions: [
13
+ ".xml",
14
+ ".xsd",
15
+ ".dtd",
16
+ ".ascx",
17
+ ".csproj",
18
+ ".config",
19
+ ".props",
20
+ ".targets",
21
+ ".wxi",
22
+ ".wxl",
23
+ ".wxs",
24
+ ".xaml",
25
+ ".svg",
26
+ ".svgz",
27
+ ".opf",
28
+ ".xslt",
29
+ ".xsl"
30
+ ],
31
+ firstLine: "(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",
32
+ aliases: ["XML", "xml"],
33
+ mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
34
+ loader: () => {
35
+ {
36
+ return import('./xml.js');
37
+ }
38
+ }
39
+ });
package/xml/xml.js ADDED
@@ -0,0 +1,114 @@
1
+ import * as monaco_editor_core_star from 'monaco-editor';
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
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
23
+
24
+ // src/fillers/monaco-editor-core.ts
25
+ var monaco_editor_core_exports = {};
26
+ __reExport(monaco_editor_core_exports, monaco_editor_core_star);
27
+
28
+ // src/basic-languages/xml/xml.ts
29
+ var conf = {
30
+ comments: {
31
+ blockComment: ["<!--", "-->"]
32
+ },
33
+ brackets: [["<", ">"]],
34
+ autoClosingPairs: [
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(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`, "i"),
47
+ afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i,
48
+ action: {
49
+ indentAction: monaco_editor_core_exports.languages.IndentAction.IndentOutdent
50
+ }
51
+ },
52
+ {
53
+ beforeText: new RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`, "i"),
54
+ action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Indent }
55
+ }
56
+ ]
57
+ };
58
+ var language = {
59
+ defaultToken: "",
60
+ tokenPostfix: ".xml",
61
+ ignoreCase: true,
62
+ // Useful regular expressions
63
+ qualifiedName: /(?:[\w\.\-]+:)?[\w\.\-]+/,
64
+ tokenizer: {
65
+ root: [
66
+ [/[^<&]+/, ""],
67
+ { include: "@whitespace" },
68
+ // Standard opening tag
69
+ [/(<)(@qualifiedName)/, [{ token: "delimiter" }, { token: "tag", next: "@tag" }]],
70
+ // Standard closing tag
71
+ [
72
+ /(<\/)(@qualifiedName)(\s*)(>)/,
73
+ [{ token: "delimiter" }, { token: "tag" }, "", { token: "delimiter" }]
74
+ ],
75
+ // Meta tags - instruction
76
+ [/(<\?)(@qualifiedName)/, [{ token: "delimiter" }, { token: "metatag", next: "@tag" }]],
77
+ // Meta tags - declaration
78
+ [/(<\!)(@qualifiedName)/, [{ token: "delimiter" }, { token: "metatag", next: "@tag" }]],
79
+ // CDATA
80
+ [/<\!\[CDATA\[/, { token: "delimiter.cdata", next: "@cdata" }],
81
+ [/&\w+;/, "string.escape"]
82
+ ],
83
+ cdata: [
84
+ [/[^\]]+/, ""],
85
+ [/\]\]>/, { token: "delimiter.cdata", next: "@pop" }],
86
+ [/\]/, ""]
87
+ ],
88
+ tag: [
89
+ [/[ \t\r\n]+/, ""],
90
+ [/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/, ["attribute.name", "", "attribute.value"]],
91
+ [
92
+ /(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,
93
+ ["attribute.name", "", "attribute.value"]
94
+ ],
95
+ [/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/, ["attribute.name", "", "attribute.value"]],
96
+ [/@qualifiedName/, "attribute.name"],
97
+ [/\?>/, { token: "delimiter", next: "@pop" }],
98
+ [/(\/)(>)/, [{ token: "tag" }, { token: "delimiter", next: "@pop" }]],
99
+ [/>/, { token: "delimiter", next: "@pop" }]
100
+ ],
101
+ whitespace: [
102
+ [/[ \t\r\n]+/, ""],
103
+ [/<!--/, { token: "comment", next: "@comment" }]
104
+ ],
105
+ comment: [
106
+ [/[^<\-]+/, "comment.content"],
107
+ [/-->/, { token: "comment", next: "@pop" }],
108
+ [/<!--/, "comment.content.invalid"],
109
+ [/[<\-]/, "comment.content"]
110
+ ]
111
+ }
112
+ };
113
+
114
+ export { conf, language };
@@ -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: "yaml",
12
+ extensions: [".yaml", ".yml"],
13
+ aliases: ["YAML", "yaml", "YML", "yml"],
14
+ mimetypes: ["application/x-yaml", "text/x-yaml"],
15
+ loader: () => {
16
+ {
17
+ return import('./yaml.js');
18
+ }
19
+ }
20
+ });