@codingame/monaco-vscode-rust-default-extension 1.83.16 → 1.85.0-next.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.
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { registerExtension } from 'vscode/extensions';
2
2
 
3
- var manifest = {name:"rust",displayName:"%displayName%",description:"%description%",version:"1.0.0",publisher:"vscode",license:"MIT",engines:{vscode:"*"},scripts:{"update-grammar":"node ../node_modules/vscode-grammar-updater/bin dustypomerleau/rust-syntax syntaxes/rust.tmLanguage.json ./syntaxes/rust.tmLanguage.json"},contributes:{languages:[{id:"rust",extensions:[".rs"],aliases:["Rust","rust"],configuration:"./language-configuration.json"}],grammars:[{language:"rust",path:"./syntaxes/rust.tmLanguage.json",scopeName:"source.rust"}]},repository:{type:"git",url:"https://github.com/microsoft/vscode.git"},main:undefined};
3
+ var manifest = {name:"rust",displayName:"%displayName%",description:"%description%",version:"1.0.0",publisher:"vscode",license:"MIT",engines:{vscode:"*"},scripts:{"update-grammar":"node ./build/update-grammar.mjs"},contributes:{languages:[{id:"rust",extensions:[".rs"],aliases:["Rust","rust"],configuration:"./language-configuration.json"}],grammars:[{language:"rust",path:"./syntaxes/rust.tmLanguage.json",scopeName:"source.rust"}]},repository:{type:"git",url:"https://github.com/microsoft/vscode.git"},main:undefined};
4
4
 
5
5
  const { registerFileUrl, whenReady } = registerExtension(manifest);
6
6
  registerFileUrl('./syntaxes/rust.tmLanguage.json', new URL('./rust.tmLanguage.json', import.meta.url).toString(), 'application/json');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-rust-default-extension",
3
- "version": "1.83.16",
3
+ "version": "1.85.0-next.1",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,6 +18,6 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@1.83.16"
21
+ "vscode": "npm:@codingame/monaco-vscode-api@1.85.0-next.1"
22
22
  }
23
23
  }
@@ -4,7 +4,7 @@
4
4
  "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5
5
  "Once accepted there, we are happy to receive an update request."
6
6
  ],
7
- "version": "https://github.com/dustypomerleau/rust-syntax/commit/20462d50ff97338f42c6b64c3f421c634fd60734",
7
+ "version": "https://github.com/dustypomerleau/rust-syntax/commit/20730dff3c367cb40a7edd278fdaf0239ea50833",
8
8
  "name": "Rust",
9
9
  "scopeName": "source.rust",
10
10
  "patterns": [
@@ -119,54 +119,6 @@
119
119
  }
120
120
  }
121
121
  },
122
- {
123
- "comment": "attributes",
124
- "name": "meta.attribute.rust",
125
- "begin": "(#)(\\!?)(\\[)",
126
- "beginCaptures": {
127
- "1": {
128
- "name": "punctuation.definition.attribute.rust"
129
- },
130
- "2": {
131
- "name": "keyword.operator.attribute.inner.rust"
132
- },
133
- "3": {
134
- "name": "punctuation.brackets.attribute.rust"
135
- }
136
- },
137
- "end": "\\]",
138
- "endCaptures": {
139
- "0": {
140
- "name": "punctuation.brackets.attribute.rust"
141
- }
142
- },
143
- "patterns": [
144
- {
145
- "include": "#block-comments"
146
- },
147
- {
148
- "include": "#comments"
149
- },
150
- {
151
- "include": "#keywords"
152
- },
153
- {
154
- "include": "#lifetimes"
155
- },
156
- {
157
- "include": "#punctuation"
158
- },
159
- {
160
- "include": "#strings"
161
- },
162
- {
163
- "include": "#gtypes"
164
- },
165
- {
166
- "include": "#types"
167
- }
168
- ]
169
- },
170
122
  {
171
123
  "comment": "modules",
172
124
  "match": "(mod)\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)",
@@ -257,6 +209,9 @@
257
209
  {
258
210
  "include": "#comments"
259
211
  },
212
+ {
213
+ "include": "#attributes"
214
+ },
260
215
  {
261
216
  "include": "#lvariables"
262
217
  },
@@ -362,7 +317,7 @@
362
317
  {
363
318
  "comment": "decimal integers and floats",
364
319
  "name": "constant.numeric.decimal.rust",
365
- "match": "\\b\\d[\\d_]*(\\.?)[\\d_]*(?:(E)([+-])([\\d_]+))?(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
320
+ "match": "\\b\\d[\\d_]*(\\.?)[\\d_]*(?:(E|e)([+-]?)([\\d_]+))?(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b",
366
321
  "captures": {
367
322
  "1": {
368
323
  "name": "punctuation.separator.dot.decimal.rust"
@@ -421,7 +376,7 @@
421
376
  "escapes": {
422
377
  "comment": "escapes: ASCII, byte, Unicode, quote, regex",
423
378
  "name": "constant.character.escape.rust",
424
- "match": "(\\\\)(?:(?:(x[0-7][0-7a-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))",
379
+ "match": "(\\\\)(?:(?:(x[0-7][\\da-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))",
425
380
  "captures": {
426
381
  "1": {
427
382
  "name": "constant.character.escape.backslash.rust"
@@ -440,6 +395,51 @@
440
395
  }
441
396
  }
442
397
  },
398
+ "attributes": {
399
+ "comment": "attributes",
400
+ "name": "meta.attribute.rust",
401
+ "begin": "(#)(\\!?)(\\[)",
402
+ "beginCaptures": {
403
+ "1": {
404
+ "name": "punctuation.definition.attribute.rust"
405
+ },
406
+ "3": {
407
+ "name": "punctuation.brackets.attribute.rust"
408
+ }
409
+ },
410
+ "end": "\\]",
411
+ "endCaptures": {
412
+ "0": {
413
+ "name": "punctuation.brackets.attribute.rust"
414
+ }
415
+ },
416
+ "patterns": [
417
+ {
418
+ "include": "#block-comments"
419
+ },
420
+ {
421
+ "include": "#comments"
422
+ },
423
+ {
424
+ "include": "#keywords"
425
+ },
426
+ {
427
+ "include": "#lifetimes"
428
+ },
429
+ {
430
+ "include": "#punctuation"
431
+ },
432
+ {
433
+ "include": "#strings"
434
+ },
435
+ {
436
+ "include": "#gtypes"
437
+ },
438
+ {
439
+ "include": "#types"
440
+ }
441
+ ]
442
+ },
443
443
  "functions": {
444
444
  "patterns": [
445
445
  {
@@ -548,6 +548,9 @@
548
548
  {
549
549
  "include": "#comments"
550
550
  },
551
+ {
552
+ "include": "#attributes"
553
+ },
551
554
  {
552
555
  "include": "#keywords"
553
556
  },
@@ -608,6 +611,9 @@
608
611
  {
609
612
  "include": "#comments"
610
613
  },
614
+ {
615
+ "include": "#attributes"
616
+ },
611
617
  {
612
618
  "include": "#keywords"
613
619
  },
@@ -888,7 +894,7 @@
888
894
  "patterns": [
889
895
  {
890
896
  "comment": "namespace (non-type, non-function path segment)",
891
- "match": "(?<![A-Za-z0-9_])([a-z0-9_]+)((?<!super|self)::)",
897
+ "match": "(?<![A-Za-z0-9_])([A-Za-z0-9_]+)((?<!super|self)::)",
892
898
  "captures": {
893
899
  "1": {
894
900
  "name": "entity.name.namespace.rust"
@@ -913,7 +919,7 @@
913
919
  },
914
920
  {
915
921
  "comment": "parameterized types",
916
- "begin": "\\b([A-Z][A-Za-z0-9]*)(<)",
922
+ "begin": "\\b(_?[A-Z][A-Za-z0-9_]*)(<)",
917
923
  "beginCaptures": {
918
924
  "1": {
919
925
  "name": "entity.name.type.rust"
@@ -962,7 +968,7 @@
962
968
  },
963
969
  {
964
970
  "comment": "trait declarations",
965
- "match": "\\b(trait)\\s+([A-Z][A-Za-z0-9]*)\\b",
971
+ "match": "\\b(trait)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b",
966
972
  "captures": {
967
973
  "1": {
968
974
  "name": "keyword.declaration.trait.rust storage.type.rust"
@@ -974,7 +980,7 @@
974
980
  },
975
981
  {
976
982
  "comment": "struct declarations",
977
- "match": "\\b(struct)\\s+([A-Z][A-Za-z0-9]*)\\b",
983
+ "match": "\\b(struct)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b",
978
984
  "captures": {
979
985
  "1": {
980
986
  "name": "keyword.declaration.struct.rust storage.type.rust"
@@ -986,7 +992,7 @@
986
992
  },
987
993
  {
988
994
  "comment": "enum declarations",
989
- "match": "\\b(enum)\\s+([A-Z][A-Za-z0-9_]*)\\b",
995
+ "match": "\\b(enum)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b",
990
996
  "captures": {
991
997
  "1": {
992
998
  "name": "keyword.declaration.enum.rust storage.type.rust"
@@ -998,7 +1004,7 @@
998
1004
  },
999
1005
  {
1000
1006
  "comment": "type declarations",
1001
- "match": "\\b(type)\\s+([A-Z][A-Za-z0-9_]*)\\b",
1007
+ "match": "\\b(type)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b",
1002
1008
  "captures": {
1003
1009
  "1": {
1004
1010
  "name": "keyword.declaration.type.rust storage.type.rust"
@@ -1011,7 +1017,7 @@
1011
1017
  {
1012
1018
  "comment": "types",
1013
1019
  "name": "entity.name.type.rust",
1014
- "match": "\\b[A-Z][A-Za-z0-9]*\\b(?!!)"
1020
+ "match": "\\b_?[A-Z][A-Za-z0-9_]*\\b(?!!)"
1015
1021
  }
1016
1022
  ]
1017
1023
  },