@codingame/monaco-languageclient-wrapper 1.3.0 → 1.4.1

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 (170) hide show
  1. package/dist/BSV.tmLanguage.js +299 -0
  2. package/dist/COBOL Copybook.js +2017 -0
  3. package/dist/COBOL.js +2017 -0
  4. package/dist/COBOL.tmLanguage.js +149 -0
  5. package/dist/CodinGameMonacoWorkspace.d.ts +13 -0
  6. package/dist/Configuration.d.ts +15 -0
  7. package/dist/Erlang.plist.js +1752 -0
  8. package/dist/JSON.tmLanguage.js +221 -0
  9. package/dist/JSONC.tmLanguage.js +221 -0
  10. package/dist/JavaScript.tmLanguage.js +5894 -0
  11. package/dist/Kotlin.tmLanguage.js +724 -0
  12. package/dist/MagicPython.tmLanguage.js +5340 -0
  13. package/dist/MagicRegExp.tmLanguage.js +505 -0
  14. package/dist/Regular Expressions (JavaScript).tmLanguage.js +166 -0
  15. package/dist/SQL.plist.js +482 -0
  16. package/dist/Scala.tmLanguage.js +1255 -0
  17. package/dist/TypeScript.tmLanguage.js +5641 -0
  18. package/dist/WatchableConsoleWindow.d.ts +22 -0
  19. package/dist/_rollupPluginBabelHelpers.js +54 -0
  20. package/dist/asp-vb-net.tmlanguage.js +247 -0
  21. package/dist/bsv.js +49 -0
  22. package/dist/c.js +18 -0
  23. package/dist/c.tmLanguage.js +3347 -0
  24. package/dist/cabal.tmLanguage.js +66 -0
  25. package/dist/clojure.tmLanguage.js +443 -0
  26. package/dist/codeblock-cabal.js +42 -0
  27. package/dist/codeblock-haskell.js +42 -0
  28. package/dist/codeblock-literate-haskell.js +42 -0
  29. package/dist/codeblock.js +36 -0
  30. package/dist/codeblock2.js +95 -0
  31. package/dist/coffeescript.js +18 -0
  32. package/dist/coffeescript.tmLanguage.js +1324 -0
  33. package/dist/configuration/index.d.ts +5 -0
  34. package/dist/cpp.js +18 -0
  35. package/dist/cpp.tmLanguage.js +19996 -0
  36. package/dist/csharp.js +18 -0
  37. package/dist/csharp.tmLanguage.js +4750 -0
  38. package/dist/css.tmLanguage.js +1873 -0
  39. package/dist/css.worker.js +6 -0
  40. package/dist/cssContribution.js +10 -0
  41. package/dist/cuda-cpp.tmLanguage.js +19993 -0
  42. package/dist/d.js +3159 -0
  43. package/dist/dart.js +530 -0
  44. package/dist/diet.js +758 -0
  45. package/dist/diet2.js +92 -0
  46. package/dist/dml.js +169 -0
  47. package/dist/eex.js +55 -0
  48. package/dist/elixir.js +2341 -0
  49. package/dist/elixir2.js +184 -0
  50. package/dist/erlang.js +195 -0
  51. package/dist/expression.js +846 -0
  52. package/dist/extensionConfiguration.d.ts +7 -0
  53. package/dist/extensions/autofold.d.ts +2 -0
  54. package/dist/extensions/cobol.d.ts +2 -0
  55. package/dist/extensions/index.d.ts +2 -0
  56. package/dist/extensions.d.ts +13 -1
  57. package/dist/features/cssContribution.d.ts +1 -0
  58. package/dist/features/htmlContribution.d.ts +1 -0
  59. package/dist/features/jsonContribution.d.ts +1 -0
  60. package/dist/features/typescriptContribution.d.ts +1 -0
  61. package/dist/fsharp.js +18 -0
  62. package/dist/fsharp.tmLanguage.js +1811 -0
  63. package/dist/go.tmLanguage.js +1025 -0
  64. package/dist/groovy.js +229 -0
  65. package/dist/groovy.tmLanguage.js +1391 -0
  66. package/dist/haskell.tmLanguage.js +629 -0
  67. package/dist/html (eex).js +31 -0
  68. package/dist/html-derivative.tmLanguage.js +57 -0
  69. package/dist/html.tmLanguage.js +2652 -0
  70. package/dist/html.tmLanguage2.js +97 -0
  71. package/dist/html.worker.js +6 -0
  72. package/dist/htmlContribution.js +10 -0
  73. package/dist/index.d.ts +5 -3
  74. package/dist/inline-styles.js +104 -0
  75. package/dist/inline-template.js +88 -0
  76. package/dist/java.js +18 -0
  77. package/dist/java.tmLanguage.js +1863 -0
  78. package/dist/javascript.js +196 -0
  79. package/dist/javascriptreact.js +196 -0
  80. package/dist/jsdoc.js.injection.tmLanguage.js +32 -0
  81. package/dist/jsdoc.ts.injection.tmLanguage.js +32 -0
  82. package/dist/json.worker.js +6 -0
  83. package/dist/jsonContribution.js +78 -0
  84. package/dist/keybindings/index.d.ts +2 -0
  85. package/dist/keybindings/keybindingHelper.d.ts +2 -0
  86. package/dist/keybindings/vim.d.ts +3 -0
  87. package/dist/kotlin.js +117 -0
  88. package/dist/kotlinscript.js +117 -0
  89. package/dist/languageClient.d.ts +18 -8
  90. package/dist/languages/extensions/grammarLoader.d.ts +91037 -0
  91. package/dist/languages/extensions/snippetLoader.d.ts +4578 -0
  92. package/dist/languages/index.d.ts +3 -0
  93. package/dist/languages/monarch/index.d.ts +7 -0
  94. package/dist/languages/monarch/list.d.ts +7 -0
  95. package/dist/languages/monarch/stub-generator.d.ts +2 -0
  96. package/dist/languages/snippets/index.d.ts +1 -0
  97. package/dist/languages/textMate/CGTMGrammarFactory.d.ts +5 -0
  98. package/dist/languages/textMate/TextMateTokensProvider.d.ts +11 -0
  99. package/dist/languages/textMate/index.d.ts +2 -0
  100. package/dist/literateHaskell.tmLanguage.js +70 -0
  101. package/dist/lua.tmLanguage.js +289 -0
  102. package/dist/main.js +377 -258
  103. package/dist/markdown.js +103 -0
  104. package/dist/markdown.tmLanguage.js +2784 -0
  105. package/dist/merlin.js +111 -0
  106. package/dist/monaco.d.ts +8 -0
  107. package/dist/objective-c.tmLanguage.js +3618 -0
  108. package/dist/ocaml-hover-info.js +34 -0
  109. package/dist/ocaml-hover-type.js +24 -0
  110. package/dist/ocaml-markdown-codeblock.js +42 -0
  111. package/dist/ocaml.js +2979 -0
  112. package/dist/ocamlbuild.js +239 -0
  113. package/dist/opam.js +149 -0
  114. package/dist/pascal.js +382 -0
  115. package/dist/pascal.tmLanguage.js +169 -0
  116. package/dist/perl.tmLanguage.js +2986 -0
  117. package/dist/perl6.tmLanguage.js +323 -0
  118. package/dist/pgsql.tmLanguage.js +284 -0
  119. package/dist/php.js +265 -0
  120. package/dist/php.tmLanguage.js +3791 -0
  121. package/dist/platform.tmLanguage.js +1135 -0
  122. package/dist/powershell.js +18 -0
  123. package/dist/powershell.tmLanguage.js +1037 -0
  124. package/dist/r.tmLanguage.js +551 -0
  125. package/dist/reason-hover-info.js +34 -0
  126. package/dist/reason-hover-signature.js +21 -0
  127. package/dist/reason-hover-type.js +21 -0
  128. package/dist/reason-markdown-codeblock.js +42 -0
  129. package/dist/reason.js +100 -0
  130. package/dist/ruby.tmLanguage.js +2784 -0
  131. package/dist/rust.tmLanguage.js +1178 -0
  132. package/dist/sassdoc.tmLanguage.js +362 -0
  133. package/dist/scss.tmLanguage.js +1887 -0
  134. package/dist/sdc.tmLanguage.js +712 -0
  135. package/dist/sdl.js +162 -0
  136. package/dist/services/EditorModelResolverService.d.ts +8 -0
  137. package/dist/services/MultiEditorStandaloneCodeEditorService.d.ts +7 -0
  138. package/dist/shell-unix-bash.tmLanguage.js +1291 -0
  139. package/dist/sql.js +21 -0
  140. package/dist/staticOptions.d.ts +5 -7
  141. package/dist/stub-generator.js +15 -0
  142. package/dist/swift.js +183 -0
  143. package/dist/swift.tmLanguage.js +3288 -0
  144. package/dist/systemverilog.js +208 -0
  145. package/dist/systemverilog.tmLanguage.js +1067 -0
  146. package/dist/tcl.js +151 -0
  147. package/dist/tcl.tmlanguage.yaml.js +5484 -0
  148. package/dist/template.js +207 -0
  149. package/dist/theme/index.d.ts +3 -0
  150. package/dist/theme/registry.d.ts +4 -0
  151. package/dist/theme/semanticHighlight.d.ts +1 -0
  152. package/dist/theme/tools.d.ts +13 -0
  153. package/dist/tools.d.ts +3 -0
  154. package/dist/ts.worker.js +6 -0
  155. package/dist/typescript.js +312 -0
  156. package/dist/typescriptContribution.js +36 -0
  157. package/dist/typescriptreact.js +312 -0
  158. package/dist/ucf.tmLanguage.js +36 -0
  159. package/dist/vb.js +88 -0
  160. package/dist/verilog.js +432 -0
  161. package/dist/verilog.tmLanguage.js +321 -0
  162. package/dist/worker.d.ts +6 -0
  163. package/dist/worker.js +54 -0
  164. package/dist/xml.tmLanguage.js +395 -0
  165. package/dist/xsl.tmLanguage.js +102 -0
  166. package/dist/yaml.tmLanguage.js +629 -0
  167. package/package.json +2 -2
  168. package/stats.html +1 -1
  169. package/dist/monaco-languageclient-wrapper.d.ts +0 -1478
  170. package/dist/tsdoc-metadata.json +0 -11
@@ -0,0 +1,1178 @@
1
+ var information_for_contributors = [
2
+ "This file has been converted from https://github.com/microsoft/vscode/blob/master/extensions/rust/",
3
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
4
+ "Once accepted there, we are happy to receive an update request."
5
+ ];
6
+ var version = "https://github.com/dustypomerleau/rust-syntax/commit/20462d50ff97338f42c6b64c3f421c634fd60734";
7
+ var name = "Rust";
8
+ var scopeName = "source.rust";
9
+ var patterns = [
10
+ {
11
+ comment: "boxed slice literal",
12
+ begin: "(<)(\\[)",
13
+ beginCaptures: {
14
+ "1": {
15
+ name: "punctuation.brackets.angle.rust"
16
+ },
17
+ "2": {
18
+ name: "punctuation.brackets.square.rust"
19
+ }
20
+ },
21
+ end: ">",
22
+ endCaptures: {
23
+ "0": {
24
+ name: "punctuation.brackets.angle.rust"
25
+ }
26
+ },
27
+ patterns: [
28
+ {
29
+ include: "#block-comments"
30
+ },
31
+ {
32
+ include: "#comments"
33
+ },
34
+ {
35
+ include: "#gtypes"
36
+ },
37
+ {
38
+ include: "#lvariables"
39
+ },
40
+ {
41
+ include: "#lifetimes"
42
+ },
43
+ {
44
+ include: "#punctuation"
45
+ },
46
+ {
47
+ include: "#types"
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ comment: "macro type metavariables",
53
+ name: "meta.macro.metavariable.type.rust",
54
+ match: "(\\$)((crate)|([A-Z][A-Za-z0-9_]*))((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?",
55
+ captures: {
56
+ "1": {
57
+ name: "keyword.operator.macro.dollar.rust"
58
+ },
59
+ "3": {
60
+ name: "keyword.other.crate.rust"
61
+ },
62
+ "4": {
63
+ name: "entity.name.type.metavariable.rust"
64
+ },
65
+ "6": {
66
+ name: "keyword.operator.key-value.rust"
67
+ },
68
+ "7": {
69
+ name: "variable.other.metavariable.specifier.rust"
70
+ }
71
+ },
72
+ patterns: [
73
+ {
74
+ include: "#keywords"
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ comment: "macro metavariables",
80
+ name: "meta.macro.metavariable.rust",
81
+ match: "(\\$)([a-z][A-Za-z0-9_]*)((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?",
82
+ captures: {
83
+ "1": {
84
+ name: "keyword.operator.macro.dollar.rust"
85
+ },
86
+ "2": {
87
+ name: "variable.other.metavariable.name.rust"
88
+ },
89
+ "4": {
90
+ name: "keyword.operator.key-value.rust"
91
+ },
92
+ "5": {
93
+ name: "variable.other.metavariable.specifier.rust"
94
+ }
95
+ },
96
+ patterns: [
97
+ {
98
+ include: "#keywords"
99
+ }
100
+ ]
101
+ },
102
+ {
103
+ comment: "macro rules",
104
+ name: "meta.macro.rules.rust",
105
+ match: "\\b(macro_rules!)\\s+(([a-z0-9_]+)|([A-Z][a-z0-9_]*))\\s+(\\{)",
106
+ captures: {
107
+ "1": {
108
+ name: "entity.name.function.macro.rules.rust"
109
+ },
110
+ "3": {
111
+ name: "entity.name.function.macro.rust"
112
+ },
113
+ "4": {
114
+ name: "entity.name.type.macro.rust"
115
+ },
116
+ "5": {
117
+ name: "punctuation.brackets.curly.rust"
118
+ }
119
+ }
120
+ },
121
+ {
122
+ comment: "attributes",
123
+ name: "meta.attribute.rust",
124
+ begin: "(#)(\\!?)(\\[)",
125
+ beginCaptures: {
126
+ "1": {
127
+ name: "punctuation.definition.attribute.rust"
128
+ },
129
+ "2": {
130
+ name: "keyword.operator.attribute.inner.rust"
131
+ },
132
+ "3": {
133
+ name: "punctuation.brackets.attribute.rust"
134
+ }
135
+ },
136
+ end: "\\]",
137
+ endCaptures: {
138
+ "0": {
139
+ name: "punctuation.brackets.attribute.rust"
140
+ }
141
+ },
142
+ patterns: [
143
+ {
144
+ include: "#block-comments"
145
+ },
146
+ {
147
+ include: "#comments"
148
+ },
149
+ {
150
+ include: "#keywords"
151
+ },
152
+ {
153
+ include: "#lifetimes"
154
+ },
155
+ {
156
+ include: "#punctuation"
157
+ },
158
+ {
159
+ include: "#strings"
160
+ },
161
+ {
162
+ include: "#gtypes"
163
+ },
164
+ {
165
+ include: "#types"
166
+ }
167
+ ]
168
+ },
169
+ {
170
+ comment: "modules",
171
+ match: "(mod)\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)",
172
+ captures: {
173
+ "1": {
174
+ name: "storage.type.rust"
175
+ },
176
+ "2": {
177
+ name: "entity.name.module.rust"
178
+ }
179
+ }
180
+ },
181
+ {
182
+ comment: "external crate imports",
183
+ name: "meta.import.rust",
184
+ begin: "\\b(extern)\\s+(crate)",
185
+ beginCaptures: {
186
+ "1": {
187
+ name: "storage.type.rust"
188
+ },
189
+ "2": {
190
+ name: "keyword.other.crate.rust"
191
+ }
192
+ },
193
+ end: ";",
194
+ endCaptures: {
195
+ "0": {
196
+ name: "punctuation.semi.rust"
197
+ }
198
+ },
199
+ patterns: [
200
+ {
201
+ include: "#block-comments"
202
+ },
203
+ {
204
+ include: "#comments"
205
+ },
206
+ {
207
+ include: "#keywords"
208
+ },
209
+ {
210
+ include: "#punctuation"
211
+ }
212
+ ]
213
+ },
214
+ {
215
+ comment: "use statements",
216
+ name: "meta.use.rust",
217
+ begin: "\\b(use)\\s",
218
+ beginCaptures: {
219
+ "1": {
220
+ name: "keyword.other.rust"
221
+ }
222
+ },
223
+ end: ";",
224
+ endCaptures: {
225
+ "0": {
226
+ name: "punctuation.semi.rust"
227
+ }
228
+ },
229
+ patterns: [
230
+ {
231
+ include: "#block-comments"
232
+ },
233
+ {
234
+ include: "#comments"
235
+ },
236
+ {
237
+ include: "#keywords"
238
+ },
239
+ {
240
+ include: "#namespaces"
241
+ },
242
+ {
243
+ include: "#punctuation"
244
+ },
245
+ {
246
+ include: "#types"
247
+ },
248
+ {
249
+ include: "#lvariables"
250
+ }
251
+ ]
252
+ },
253
+ {
254
+ include: "#block-comments"
255
+ },
256
+ {
257
+ include: "#comments"
258
+ },
259
+ {
260
+ include: "#lvariables"
261
+ },
262
+ {
263
+ include: "#constants"
264
+ },
265
+ {
266
+ include: "#gtypes"
267
+ },
268
+ {
269
+ include: "#functions"
270
+ },
271
+ {
272
+ include: "#types"
273
+ },
274
+ {
275
+ include: "#keywords"
276
+ },
277
+ {
278
+ include: "#lifetimes"
279
+ },
280
+ {
281
+ include: "#macros"
282
+ },
283
+ {
284
+ include: "#namespaces"
285
+ },
286
+ {
287
+ include: "#punctuation"
288
+ },
289
+ {
290
+ include: "#strings"
291
+ },
292
+ {
293
+ include: "#variables"
294
+ }
295
+ ];
296
+ var repository = {
297
+ comments: {
298
+ patterns: [
299
+ {
300
+ comment: "documentation comments",
301
+ name: "comment.line.documentation.rust",
302
+ match: "^\\s*///.*"
303
+ },
304
+ {
305
+ comment: "line comments",
306
+ name: "comment.line.double-slash.rust",
307
+ match: "\\s*//.*"
308
+ }
309
+ ]
310
+ },
311
+ "block-comments": {
312
+ patterns: [
313
+ {
314
+ comment: "empty block comments",
315
+ name: "comment.block.rust",
316
+ match: "/\\*\\*/"
317
+ },
318
+ {
319
+ comment: "block documentation comments",
320
+ name: "comment.block.documentation.rust",
321
+ begin: "/\\*\\*",
322
+ end: "\\*/",
323
+ patterns: [
324
+ {
325
+ include: "#block-comments"
326
+ }
327
+ ]
328
+ },
329
+ {
330
+ comment: "block comments",
331
+ name: "comment.block.rust",
332
+ begin: "/\\*(?!\\*)",
333
+ end: "\\*/",
334
+ patterns: [
335
+ {
336
+ include: "#block-comments"
337
+ }
338
+ ]
339
+ }
340
+ ]
341
+ },
342
+ constants: {
343
+ patterns: [
344
+ {
345
+ comment: "ALL CAPS constants",
346
+ name: "constant.other.caps.rust",
347
+ match: "\\b[A-Z]{2}[A-Z0-9_]*\\b"
348
+ },
349
+ {
350
+ comment: "constant declarations",
351
+ match: "\\b(const)\\s+([A-Z][A-Za-z0-9_]*)\\b",
352
+ captures: {
353
+ "1": {
354
+ name: "storage.type.rust"
355
+ },
356
+ "2": {
357
+ name: "constant.other.caps.rust"
358
+ }
359
+ }
360
+ },
361
+ {
362
+ comment: "decimal integers and floats",
363
+ name: "constant.numeric.decimal.rust",
364
+ match: "\\b\\d[\\d_]*(\\.?)[\\d_]*(?:(E)([+-])([\\d_]+))?(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
365
+ captures: {
366
+ "1": {
367
+ name: "punctuation.separator.dot.decimal.rust"
368
+ },
369
+ "2": {
370
+ name: "keyword.operator.exponent.rust"
371
+ },
372
+ "3": {
373
+ name: "keyword.operator.exponent.sign.rust"
374
+ },
375
+ "4": {
376
+ name: "constant.numeric.decimal.exponent.mantissa.rust"
377
+ },
378
+ "5": {
379
+ name: "entity.name.type.numeric.rust"
380
+ }
381
+ }
382
+ },
383
+ {
384
+ comment: "hexadecimal integers",
385
+ name: "constant.numeric.hex.rust",
386
+ match: "\\b0x[\\da-fA-F_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
387
+ captures: {
388
+ "1": {
389
+ name: "entity.name.type.numeric.rust"
390
+ }
391
+ }
392
+ },
393
+ {
394
+ comment: "octal integers",
395
+ name: "constant.numeric.oct.rust",
396
+ match: "\\b0o[0-7_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
397
+ captures: {
398
+ "1": {
399
+ name: "entity.name.type.numeric.rust"
400
+ }
401
+ }
402
+ },
403
+ {
404
+ comment: "binary integers",
405
+ name: "constant.numeric.bin.rust",
406
+ match: "\\b0b[01_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
407
+ captures: {
408
+ "1": {
409
+ name: "entity.name.type.numeric.rust"
410
+ }
411
+ }
412
+ },
413
+ {
414
+ comment: "booleans",
415
+ name: "constant.language.bool.rust",
416
+ match: "\\b(true|false)\\b"
417
+ }
418
+ ]
419
+ },
420
+ escapes: {
421
+ comment: "escapes: ASCII, byte, Unicode, quote, regex",
422
+ name: "constant.character.escape.rust",
423
+ match: "(\\\\)(?:(?:(x[0-7][0-7a-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))",
424
+ captures: {
425
+ "1": {
426
+ name: "constant.character.escape.backslash.rust"
427
+ },
428
+ "2": {
429
+ name: "constant.character.escape.bit.rust"
430
+ },
431
+ "3": {
432
+ name: "constant.character.escape.unicode.rust"
433
+ },
434
+ "4": {
435
+ name: "constant.character.escape.unicode.punctuation.rust"
436
+ },
437
+ "5": {
438
+ name: "constant.character.escape.unicode.punctuation.rust"
439
+ }
440
+ }
441
+ },
442
+ functions: {
443
+ patterns: [
444
+ {
445
+ comment: "pub as a function",
446
+ match: "\\b(pub)(\\()",
447
+ captures: {
448
+ "1": {
449
+ name: "keyword.other.rust"
450
+ },
451
+ "2": {
452
+ name: "punctuation.brackets.round.rust"
453
+ }
454
+ }
455
+ },
456
+ {
457
+ comment: "function definition",
458
+ name: "meta.function.definition.rust",
459
+ begin: "\\b(fn)\\s+((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)((\\()|(<))",
460
+ beginCaptures: {
461
+ "1": {
462
+ name: "keyword.other.fn.rust"
463
+ },
464
+ "2": {
465
+ name: "entity.name.function.rust"
466
+ },
467
+ "4": {
468
+ name: "punctuation.brackets.round.rust"
469
+ },
470
+ "5": {
471
+ name: "punctuation.brackets.angle.rust"
472
+ }
473
+ },
474
+ end: "\\{|;",
475
+ endCaptures: {
476
+ "0": {
477
+ name: "punctuation.brackets.curly.rust"
478
+ }
479
+ },
480
+ patterns: [
481
+ {
482
+ include: "#block-comments"
483
+ },
484
+ {
485
+ include: "#comments"
486
+ },
487
+ {
488
+ include: "#keywords"
489
+ },
490
+ {
491
+ include: "#lvariables"
492
+ },
493
+ {
494
+ include: "#constants"
495
+ },
496
+ {
497
+ include: "#gtypes"
498
+ },
499
+ {
500
+ include: "#functions"
501
+ },
502
+ {
503
+ include: "#lifetimes"
504
+ },
505
+ {
506
+ include: "#macros"
507
+ },
508
+ {
509
+ include: "#namespaces"
510
+ },
511
+ {
512
+ include: "#punctuation"
513
+ },
514
+ {
515
+ include: "#strings"
516
+ },
517
+ {
518
+ include: "#types"
519
+ },
520
+ {
521
+ include: "#variables"
522
+ }
523
+ ]
524
+ },
525
+ {
526
+ comment: "function/method calls, chaining",
527
+ name: "meta.function.call.rust",
528
+ begin: "((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(\\()",
529
+ beginCaptures: {
530
+ "1": {
531
+ name: "entity.name.function.rust"
532
+ },
533
+ "2": {
534
+ name: "punctuation.brackets.round.rust"
535
+ }
536
+ },
537
+ end: "\\)",
538
+ endCaptures: {
539
+ "0": {
540
+ name: "punctuation.brackets.round.rust"
541
+ }
542
+ },
543
+ patterns: [
544
+ {
545
+ include: "#block-comments"
546
+ },
547
+ {
548
+ include: "#comments"
549
+ },
550
+ {
551
+ include: "#keywords"
552
+ },
553
+ {
554
+ include: "#lvariables"
555
+ },
556
+ {
557
+ include: "#constants"
558
+ },
559
+ {
560
+ include: "#gtypes"
561
+ },
562
+ {
563
+ include: "#functions"
564
+ },
565
+ {
566
+ include: "#lifetimes"
567
+ },
568
+ {
569
+ include: "#macros"
570
+ },
571
+ {
572
+ include: "#namespaces"
573
+ },
574
+ {
575
+ include: "#punctuation"
576
+ },
577
+ {
578
+ include: "#strings"
579
+ },
580
+ {
581
+ include: "#types"
582
+ },
583
+ {
584
+ include: "#variables"
585
+ }
586
+ ]
587
+ },
588
+ {
589
+ comment: "function/method calls with turbofish",
590
+ name: "meta.function.call.rust",
591
+ begin: "((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(?=::<.*>\\()",
592
+ beginCaptures: {
593
+ "1": {
594
+ name: "entity.name.function.rust"
595
+ }
596
+ },
597
+ end: "\\)",
598
+ endCaptures: {
599
+ "0": {
600
+ name: "punctuation.brackets.round.rust"
601
+ }
602
+ },
603
+ patterns: [
604
+ {
605
+ include: "#block-comments"
606
+ },
607
+ {
608
+ include: "#comments"
609
+ },
610
+ {
611
+ include: "#keywords"
612
+ },
613
+ {
614
+ include: "#lvariables"
615
+ },
616
+ {
617
+ include: "#constants"
618
+ },
619
+ {
620
+ include: "#gtypes"
621
+ },
622
+ {
623
+ include: "#functions"
624
+ },
625
+ {
626
+ include: "#lifetimes"
627
+ },
628
+ {
629
+ include: "#macros"
630
+ },
631
+ {
632
+ include: "#namespaces"
633
+ },
634
+ {
635
+ include: "#punctuation"
636
+ },
637
+ {
638
+ include: "#strings"
639
+ },
640
+ {
641
+ include: "#types"
642
+ },
643
+ {
644
+ include: "#variables"
645
+ }
646
+ ]
647
+ }
648
+ ]
649
+ },
650
+ keywords: {
651
+ patterns: [
652
+ {
653
+ comment: "control flow keywords",
654
+ name: "keyword.control.rust",
655
+ match: "\\b(await|break|continue|do|else|for|if|loop|match|return|try|while|yield)\\b"
656
+ },
657
+ {
658
+ comment: "storage keywords",
659
+ name: "keyword.other.rust storage.type.rust",
660
+ match: "\\b(extern|let|macro|mod)\\b"
661
+ },
662
+ {
663
+ comment: "const keyword",
664
+ name: "storage.modifier.rust",
665
+ match: "\\b(const)\\b"
666
+ },
667
+ {
668
+ comment: "type keyword",
669
+ name: "keyword.declaration.type.rust storage.type.rust",
670
+ match: "\\b(type)\\b"
671
+ },
672
+ {
673
+ comment: "enum keyword",
674
+ name: "keyword.declaration.enum.rust storage.type.rust",
675
+ match: "\\b(enum)\\b"
676
+ },
677
+ {
678
+ comment: "trait keyword",
679
+ name: "keyword.declaration.trait.rust storage.type.rust",
680
+ match: "\\b(trait)\\b"
681
+ },
682
+ {
683
+ comment: "struct keyword",
684
+ name: "keyword.declaration.struct.rust storage.type.rust",
685
+ match: "\\b(struct)\\b"
686
+ },
687
+ {
688
+ comment: "storage modifiers",
689
+ name: "storage.modifier.rust",
690
+ match: "\\b(abstract|static)\\b"
691
+ },
692
+ {
693
+ comment: "other keywords",
694
+ name: "keyword.other.rust",
695
+ match: "\\b(as|async|become|box|dyn|move|final|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\\b"
696
+ },
697
+ {
698
+ comment: "fn",
699
+ name: "keyword.other.fn.rust",
700
+ match: "\\bfn\\b"
701
+ },
702
+ {
703
+ comment: "crate",
704
+ name: "keyword.other.crate.rust",
705
+ match: "\\bcrate\\b"
706
+ },
707
+ {
708
+ comment: "mut",
709
+ name: "storage.modifier.mut.rust",
710
+ match: "\\bmut\\b"
711
+ },
712
+ {
713
+ comment: "logical operators",
714
+ name: "keyword.operator.logical.rust",
715
+ match: "(\\^|\\||\\|\\||&&|<<|>>|!)(?!=)"
716
+ },
717
+ {
718
+ comment: "logical AND, borrow references",
719
+ name: "keyword.operator.borrow.and.rust",
720
+ match: "&(?![&=])"
721
+ },
722
+ {
723
+ comment: "assignment operators",
724
+ name: "keyword.operator.assignment.rust",
725
+ match: "(\\+=|-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)"
726
+ },
727
+ {
728
+ comment: "single equal",
729
+ name: "keyword.operator.assignment.equal.rust",
730
+ match: "(?<![<>])=(?!=|>)"
731
+ },
732
+ {
733
+ comment: "comparison operators",
734
+ name: "keyword.operator.comparison.rust",
735
+ match: "(=(=)?(?!>)|!=|<=|(?<!=)>=)"
736
+ },
737
+ {
738
+ comment: "math operators",
739
+ name: "keyword.operator.math.rust",
740
+ match: "(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))"
741
+ },
742
+ {
743
+ comment: "less than, greater than (special case)",
744
+ match: "(?:\\b|(?:(\\))|(\\])|(\\})))[ \\t]+([<>])[ \\t]+(?:\\b|(?:(\\()|(\\[)|(\\{)))",
745
+ captures: {
746
+ "1": {
747
+ name: "punctuation.brackets.round.rust"
748
+ },
749
+ "2": {
750
+ name: "punctuation.brackets.square.rust"
751
+ },
752
+ "3": {
753
+ name: "punctuation.brackets.curly.rust"
754
+ },
755
+ "4": {
756
+ name: "keyword.operator.comparison.rust"
757
+ },
758
+ "5": {
759
+ name: "punctuation.brackets.round.rust"
760
+ },
761
+ "6": {
762
+ name: "punctuation.brackets.square.rust"
763
+ },
764
+ "7": {
765
+ name: "punctuation.brackets.curly.rust"
766
+ }
767
+ }
768
+ },
769
+ {
770
+ comment: "namespace operator",
771
+ name: "keyword.operator.namespace.rust",
772
+ match: "::"
773
+ },
774
+ {
775
+ comment: "dereference asterisk",
776
+ match: "(\\*)(?=\\w+)",
777
+ captures: {
778
+ "1": {
779
+ name: "keyword.operator.dereference.rust"
780
+ }
781
+ }
782
+ },
783
+ {
784
+ comment: "subpattern binding",
785
+ name: "keyword.operator.subpattern.rust",
786
+ match: "@"
787
+ },
788
+ {
789
+ comment: "dot access",
790
+ name: "keyword.operator.access.dot.rust",
791
+ match: "\\.(?!\\.)"
792
+ },
793
+ {
794
+ comment: "ranges, range patterns",
795
+ name: "keyword.operator.range.rust",
796
+ match: "\\.{2}(=|\\.)?"
797
+ },
798
+ {
799
+ comment: "colon",
800
+ name: "keyword.operator.key-value.rust",
801
+ match: ":(?!:)"
802
+ },
803
+ {
804
+ comment: "dashrocket, skinny arrow",
805
+ name: "keyword.operator.arrow.skinny.rust",
806
+ match: "->"
807
+ },
808
+ {
809
+ comment: "hashrocket, fat arrow",
810
+ name: "keyword.operator.arrow.fat.rust",
811
+ match: "=>"
812
+ },
813
+ {
814
+ comment: "dollar macros",
815
+ name: "keyword.operator.macro.dollar.rust",
816
+ match: "\\$"
817
+ },
818
+ {
819
+ comment: "question mark operator, questionably sized, macro kleene matcher",
820
+ name: "keyword.operator.question.rust",
821
+ match: "\\?"
822
+ }
823
+ ]
824
+ },
825
+ interpolations: {
826
+ comment: "curly brace interpolations",
827
+ name: "meta.interpolation.rust",
828
+ match: "({)[^\"{}]*(})",
829
+ captures: {
830
+ "1": {
831
+ name: "punctuation.definition.interpolation.rust"
832
+ },
833
+ "2": {
834
+ name: "punctuation.definition.interpolation.rust"
835
+ }
836
+ }
837
+ },
838
+ lifetimes: {
839
+ patterns: [
840
+ {
841
+ comment: "named lifetime parameters",
842
+ match: "(['])([a-zA-Z_][0-9a-zA-Z_]*)(?!['])\\b",
843
+ captures: {
844
+ "1": {
845
+ name: "punctuation.definition.lifetime.rust"
846
+ },
847
+ "2": {
848
+ name: "entity.name.type.lifetime.rust"
849
+ }
850
+ }
851
+ },
852
+ {
853
+ comment: "borrowing references to named lifetimes",
854
+ match: "(\\&)(['])([a-zA-Z_][0-9a-zA-Z_]*)(?!['])\\b",
855
+ captures: {
856
+ "1": {
857
+ name: "keyword.operator.borrow.rust"
858
+ },
859
+ "2": {
860
+ name: "punctuation.definition.lifetime.rust"
861
+ },
862
+ "3": {
863
+ name: "entity.name.type.lifetime.rust"
864
+ }
865
+ }
866
+ }
867
+ ]
868
+ },
869
+ macros: {
870
+ patterns: [
871
+ {
872
+ comment: "macros",
873
+ name: "meta.macro.rust",
874
+ match: "(([a-z_][A-Za-z0-9_]*!)|([A-Z_][A-Za-z0-9_]*!))",
875
+ captures: {
876
+ "2": {
877
+ name: "entity.name.function.macro.rust"
878
+ },
879
+ "3": {
880
+ name: "entity.name.type.macro.rust"
881
+ }
882
+ }
883
+ }
884
+ ]
885
+ },
886
+ namespaces: {
887
+ patterns: [
888
+ {
889
+ comment: "namespace (non-type, non-function path segment)",
890
+ match: "(?<![A-Za-z0-9_])([a-z0-9_]+)((?<!super|self)::)",
891
+ captures: {
892
+ "1": {
893
+ name: "entity.name.namespace.rust"
894
+ },
895
+ "2": {
896
+ name: "keyword.operator.namespace.rust"
897
+ }
898
+ }
899
+ }
900
+ ]
901
+ },
902
+ types: {
903
+ patterns: [
904
+ {
905
+ comment: "numeric types",
906
+ match: "(?<![A-Za-z])(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)\\b",
907
+ captures: {
908
+ "1": {
909
+ name: "entity.name.type.numeric.rust"
910
+ }
911
+ }
912
+ },
913
+ {
914
+ comment: "parameterized types",
915
+ begin: "\\b([A-Z][A-Za-z0-9]*)(<)",
916
+ beginCaptures: {
917
+ "1": {
918
+ name: "entity.name.type.rust"
919
+ },
920
+ "2": {
921
+ name: "punctuation.brackets.angle.rust"
922
+ }
923
+ },
924
+ end: ">",
925
+ endCaptures: {
926
+ "0": {
927
+ name: "punctuation.brackets.angle.rust"
928
+ }
929
+ },
930
+ patterns: [
931
+ {
932
+ include: "#block-comments"
933
+ },
934
+ {
935
+ include: "#comments"
936
+ },
937
+ {
938
+ include: "#keywords"
939
+ },
940
+ {
941
+ include: "#lvariables"
942
+ },
943
+ {
944
+ include: "#lifetimes"
945
+ },
946
+ {
947
+ include: "#punctuation"
948
+ },
949
+ {
950
+ include: "#types"
951
+ },
952
+ {
953
+ include: "#variables"
954
+ }
955
+ ]
956
+ },
957
+ {
958
+ comment: "primitive types",
959
+ name: "entity.name.type.primitive.rust",
960
+ match: "\\b(bool|char|str)\\b"
961
+ },
962
+ {
963
+ comment: "trait declarations",
964
+ match: "\\b(trait)\\s+([A-Z][A-Za-z0-9]*)\\b",
965
+ captures: {
966
+ "1": {
967
+ name: "keyword.declaration.trait.rust storage.type.rust"
968
+ },
969
+ "2": {
970
+ name: "entity.name.type.trait.rust"
971
+ }
972
+ }
973
+ },
974
+ {
975
+ comment: "struct declarations",
976
+ match: "\\b(struct)\\s+([A-Z][A-Za-z0-9]*)\\b",
977
+ captures: {
978
+ "1": {
979
+ name: "keyword.declaration.struct.rust storage.type.rust"
980
+ },
981
+ "2": {
982
+ name: "entity.name.type.struct.rust"
983
+ }
984
+ }
985
+ },
986
+ {
987
+ comment: "enum declarations",
988
+ match: "\\b(enum)\\s+([A-Z][A-Za-z0-9_]*)\\b",
989
+ captures: {
990
+ "1": {
991
+ name: "keyword.declaration.enum.rust storage.type.rust"
992
+ },
993
+ "2": {
994
+ name: "entity.name.type.enum.rust"
995
+ }
996
+ }
997
+ },
998
+ {
999
+ comment: "type declarations",
1000
+ match: "\\b(type)\\s+([A-Z][A-Za-z0-9_]*)\\b",
1001
+ captures: {
1002
+ "1": {
1003
+ name: "keyword.declaration.type.rust storage.type.rust"
1004
+ },
1005
+ "2": {
1006
+ name: "entity.name.type.declaration.rust"
1007
+ }
1008
+ }
1009
+ },
1010
+ {
1011
+ comment: "types",
1012
+ name: "entity.name.type.rust",
1013
+ match: "\\b[A-Z][A-Za-z0-9]*\\b(?!!)"
1014
+ }
1015
+ ]
1016
+ },
1017
+ gtypes: {
1018
+ patterns: [
1019
+ {
1020
+ comment: "option types",
1021
+ name: "entity.name.type.option.rust",
1022
+ match: "\\b(Some|None)\\b"
1023
+ },
1024
+ {
1025
+ comment: "result types",
1026
+ name: "entity.name.type.result.rust",
1027
+ match: "\\b(Ok|Err)\\b"
1028
+ }
1029
+ ]
1030
+ },
1031
+ punctuation: {
1032
+ patterns: [
1033
+ {
1034
+ comment: "comma",
1035
+ name: "punctuation.comma.rust",
1036
+ match: ","
1037
+ },
1038
+ {
1039
+ comment: "curly braces",
1040
+ name: "punctuation.brackets.curly.rust",
1041
+ match: "[{}]"
1042
+ },
1043
+ {
1044
+ comment: "parentheses, round brackets",
1045
+ name: "punctuation.brackets.round.rust",
1046
+ match: "[()]"
1047
+ },
1048
+ {
1049
+ comment: "semicolon",
1050
+ name: "punctuation.semi.rust",
1051
+ match: ";"
1052
+ },
1053
+ {
1054
+ comment: "square brackets",
1055
+ name: "punctuation.brackets.square.rust",
1056
+ match: "[\\[\\]]"
1057
+ },
1058
+ {
1059
+ comment: "angle brackets",
1060
+ name: "punctuation.brackets.angle.rust",
1061
+ match: "(?<!=)[<>]"
1062
+ }
1063
+ ]
1064
+ },
1065
+ strings: {
1066
+ patterns: [
1067
+ {
1068
+ comment: "double-quoted strings and byte strings",
1069
+ name: "string.quoted.double.rust",
1070
+ begin: "(b?)(\")",
1071
+ beginCaptures: {
1072
+ "1": {
1073
+ name: "string.quoted.byte.raw.rust"
1074
+ },
1075
+ "2": {
1076
+ name: "punctuation.definition.string.rust"
1077
+ }
1078
+ },
1079
+ end: "\"",
1080
+ endCaptures: {
1081
+ "0": {
1082
+ name: "punctuation.definition.string.rust"
1083
+ }
1084
+ },
1085
+ patterns: [
1086
+ {
1087
+ include: "#escapes"
1088
+ },
1089
+ {
1090
+ include: "#interpolations"
1091
+ }
1092
+ ]
1093
+ },
1094
+ {
1095
+ comment: "double-quoted raw strings and raw byte strings",
1096
+ name: "string.quoted.double.rust",
1097
+ begin: "(b?r)(#*)(\")",
1098
+ beginCaptures: {
1099
+ "1": {
1100
+ name: "string.quoted.byte.raw.rust"
1101
+ },
1102
+ "2": {
1103
+ name: "punctuation.definition.string.raw.rust"
1104
+ },
1105
+ "3": {
1106
+ name: "punctuation.definition.string.rust"
1107
+ }
1108
+ },
1109
+ end: "(\")(\\2)",
1110
+ endCaptures: {
1111
+ "1": {
1112
+ name: "punctuation.definition.string.rust"
1113
+ },
1114
+ "2": {
1115
+ name: "punctuation.definition.string.raw.rust"
1116
+ }
1117
+ }
1118
+ },
1119
+ {
1120
+ comment: "characters and bytes",
1121
+ name: "string.quoted.single.char.rust",
1122
+ begin: "(b)?(')",
1123
+ beginCaptures: {
1124
+ "1": {
1125
+ name: "string.quoted.byte.raw.rust"
1126
+ },
1127
+ "2": {
1128
+ name: "punctuation.definition.char.rust"
1129
+ }
1130
+ },
1131
+ end: "'",
1132
+ endCaptures: {
1133
+ "0": {
1134
+ name: "punctuation.definition.char.rust"
1135
+ }
1136
+ },
1137
+ patterns: [
1138
+ {
1139
+ include: "#escapes"
1140
+ }
1141
+ ]
1142
+ }
1143
+ ]
1144
+ },
1145
+ lvariables: {
1146
+ patterns: [
1147
+ {
1148
+ comment: "self",
1149
+ name: "variable.language.self.rust",
1150
+ match: "\\b[Ss]elf\\b"
1151
+ },
1152
+ {
1153
+ comment: "super",
1154
+ name: "variable.language.super.rust",
1155
+ match: "\\bsuper\\b"
1156
+ }
1157
+ ]
1158
+ },
1159
+ variables: {
1160
+ patterns: [
1161
+ {
1162
+ comment: "variables",
1163
+ name: "variable.other.rust",
1164
+ match: "\\b(?<!(?<!\\.)\\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\\b"
1165
+ }
1166
+ ]
1167
+ }
1168
+ };
1169
+ var rust_tmLanguage = {
1170
+ information_for_contributors: information_for_contributors,
1171
+ version: version,
1172
+ name: name,
1173
+ scopeName: scopeName,
1174
+ patterns: patterns,
1175
+ repository: repository
1176
+ };
1177
+
1178
+ export { rust_tmLanguage as default, information_for_contributors, name, patterns, repository, scopeName, version };