@codingame/monaco-vscode-textmate-service-override 1.83.4 → 1.83.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-textmate-service-override",
3
- "version": "1.83.4",
3
+ "version": "1.83.6",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,7 +18,7 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@1.83.4",
21
+ "vscode": "npm:@codingame/monaco-vscode-api@1.83.6",
22
22
  "monaco-editor": "0.44.0",
23
23
  "vscode-oniguruma": "1.7.0",
24
24
  "vscode-textmate": "9.0.0"
@@ -162,7 +162,11 @@ let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disp
162
162
  }
163
163
  startDebugMode(printFn, onStop) {
164
164
  if (this._debugMode) {
165
- this._notificationService.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'alreadyDebugging', "Already Logging."));
165
+ this._notificationService.error(( nls.localizeWithPath(
166
+ 'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
167
+ 'alreadyDebugging',
168
+ "Already Logging."
169
+ )));
166
170
  return;
167
171
  }
168
172
  this._debugModePrintFunc = printFn;
@@ -170,15 +174,27 @@ let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disp
170
174
  if (this._debugMode) {
171
175
  this._progressService.withProgress({
172
176
  location: 15 ,
173
- buttons: [nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'stop', "Stop")]
177
+ buttons: [( nls.localizeWithPath(
178
+ 'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
179
+ 'stop',
180
+ "Stop"
181
+ ))]
174
182
  }, (progress) => {
175
183
  progress.report({
176
- message: nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'progress1', "Preparing to log TM Grammar parsing. Press Stop when finished.")
184
+ message: ( nls.localizeWithPath(
185
+ 'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
186
+ 'progress1',
187
+ "Preparing to log TM Grammar parsing. Press Stop when finished."
188
+ ))
177
189
  });
178
190
  return this._getVSCodeOniguruma().then((vscodeOniguruma) => {
179
191
  vscodeOniguruma.setDefaultDebugCall(true);
180
192
  progress.report({
181
- message: nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'progress2', "Now logging TM Grammar parsing. Press Stop when finished.")
193
+ message: ( nls.localizeWithPath(
194
+ 'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
195
+ 'progress2',
196
+ "Now logging TM Grammar parsing. Press Stop when finished."
197
+ ))
182
198
  });
183
199
  return ( new Promise((resolve, reject) => { }));
184
200
  });
@@ -382,32 +398,75 @@ function equalsTokenRules(a, b) {
382
398
  }
383
399
  function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _languageService) {
384
400
  if (syntax.language && ((typeof syntax.language !== 'string') || !_languageService.isRegisteredLanguageId(syntax.language))) {
385
- collector.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.language', "Unknown language in `contributes.{0}.language`. Provided value: {1}", grammarsExtPoint.name, String(syntax.language)));
401
+ collector.error(( nls.localizeWithPath(
402
+ 'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
403
+ 'invalid.language',
404
+ "Unknown language in `contributes.{0}.language`. Provided value: {1}",
405
+ grammarsExtPoint.name,
406
+ String(syntax.language)
407
+ )));
386
408
  return false;
387
409
  }
388
410
  if (!syntax.scopeName || (typeof syntax.scopeName !== 'string')) {
389
- collector.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.scopeName', "Expected string in `contributes.{0}.scopeName`. Provided value: {1}", grammarsExtPoint.name, String(syntax.scopeName)));
411
+ collector.error(( nls.localizeWithPath(
412
+ 'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
413
+ 'invalid.scopeName',
414
+ "Expected string in `contributes.{0}.scopeName`. Provided value: {1}",
415
+ grammarsExtPoint.name,
416
+ String(syntax.scopeName)
417
+ )));
390
418
  return false;
391
419
  }
392
420
  if (!syntax.path || (typeof syntax.path !== 'string')) {
393
- collector.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.path.0', "Expected string in `contributes.{0}.path`. Provided value: {1}", grammarsExtPoint.name, String(syntax.path)));
421
+ collector.error(( nls.localizeWithPath(
422
+ 'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
423
+ 'invalid.path.0',
424
+ "Expected string in `contributes.{0}.path`. Provided value: {1}",
425
+ grammarsExtPoint.name,
426
+ String(syntax.path)
427
+ )));
394
428
  return false;
395
429
  }
396
430
  if (syntax.injectTo && (!Array.isArray(syntax.injectTo) || ( syntax.injectTo.some(scope => typeof scope !== 'string')))) {
397
- collector.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.injectTo', "Invalid value in `contributes.{0}.injectTo`. Must be an array of language scope names. Provided value: {1}", grammarsExtPoint.name, JSON.stringify(syntax.injectTo)));
431
+ collector.error(( nls.localizeWithPath(
432
+ 'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
433
+ 'invalid.injectTo',
434
+ "Invalid value in `contributes.{0}.injectTo`. Must be an array of language scope names. Provided value: {1}",
435
+ grammarsExtPoint.name,
436
+ JSON.stringify(syntax.injectTo)
437
+ )));
398
438
  return false;
399
439
  }
400
440
  if (syntax.embeddedLanguages && !types.isObject(syntax.embeddedLanguages)) {
401
- collector.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.embeddedLanguages', "Invalid value in `contributes.{0}.embeddedLanguages`. Must be an object map from scope name to language. Provided value: {1}", grammarsExtPoint.name, JSON.stringify(syntax.embeddedLanguages)));
441
+ collector.error(( nls.localizeWithPath(
442
+ 'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
443
+ 'invalid.embeddedLanguages',
444
+ "Invalid value in `contributes.{0}.embeddedLanguages`. Must be an object map from scope name to language. Provided value: {1}",
445
+ grammarsExtPoint.name,
446
+ JSON.stringify(syntax.embeddedLanguages)
447
+ )));
402
448
  return false;
403
449
  }
404
450
  if (syntax.tokenTypes && !types.isObject(syntax.tokenTypes)) {
405
- collector.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.tokenTypes', "Invalid value in `contributes.{0}.tokenTypes`. Must be an object map from scope name to token type. Provided value: {1}", grammarsExtPoint.name, JSON.stringify(syntax.tokenTypes)));
451
+ collector.error(( nls.localizeWithPath(
452
+ 'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
453
+ 'invalid.tokenTypes',
454
+ "Invalid value in `contributes.{0}.tokenTypes`. Must be an object map from scope name to token type. Provided value: {1}",
455
+ grammarsExtPoint.name,
456
+ JSON.stringify(syntax.tokenTypes)
457
+ )));
406
458
  return false;
407
459
  }
408
460
  const grammarLocation = resources.joinPath(extensionLocation, syntax.path);
409
461
  if (!resources.isEqualOrParent(grammarLocation, extensionLocation)) {
410
- collector.warn(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.path.1', "Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.", grammarsExtPoint.name, grammarLocation.path, extensionLocation.path));
462
+ collector.warn(( nls.localizeWithPath(
463
+ 'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
464
+ 'invalid.path.1',
465
+ "Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.",
466
+ grammarsExtPoint.name,
467
+ grammarLocation.path,
468
+ extensionLocation.path
469
+ )));
411
470
  }
412
471
  return true;
413
472
  }
@@ -6,7 +6,11 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
6
6
  extensionPoint: 'grammars',
7
7
  deps: [languagesExtPoint],
8
8
  jsonSchema: {
9
- description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars', 'Contributes textmate tokenizers.'),
9
+ description: ( nls.localizeWithPath(
10
+ 'vs/workbench/services/textMate/common/TMGrammars',
11
+ 'vscode.extension.contributes.grammars',
12
+ 'Contributes textmate tokenizers.'
13
+ )),
10
14
  type: 'array',
11
15
  defaultSnippets: [{ body: [{ language: '${1:id}', scopeName: 'source.${2:id}', path: './syntaxes/${3:id}.tmLanguage.' }] }],
12
16
  items: {
@@ -14,37 +18,65 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
14
18
  defaultSnippets: [{ body: { language: '${1:id}', scopeName: 'source.${2:id}', path: './syntaxes/${3:id}.tmLanguage.' } }],
15
19
  properties: {
16
20
  language: {
17
- description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.language', 'Language identifier for which this syntax is contributed to.'),
21
+ description: ( nls.localizeWithPath(
22
+ 'vs/workbench/services/textMate/common/TMGrammars',
23
+ 'vscode.extension.contributes.grammars.language',
24
+ 'Language identifier for which this syntax is contributed to.'
25
+ )),
18
26
  type: 'string'
19
27
  },
20
28
  scopeName: {
21
- description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.scopeName', 'Textmate scope name used by the tmLanguage file.'),
29
+ description: ( nls.localizeWithPath(
30
+ 'vs/workbench/services/textMate/common/TMGrammars',
31
+ 'vscode.extension.contributes.grammars.scopeName',
32
+ 'Textmate scope name used by the tmLanguage file.'
33
+ )),
22
34
  type: 'string'
23
35
  },
24
36
  path: {
25
- description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.path', 'Path of the tmLanguage file. The path is relative to the extension folder and typically starts with \'./syntaxes/\'.'),
37
+ description: ( nls.localizeWithPath(
38
+ 'vs/workbench/services/textMate/common/TMGrammars',
39
+ 'vscode.extension.contributes.grammars.path',
40
+ 'Path of the tmLanguage file. The path is relative to the extension folder and typically starts with \'./syntaxes/\'.'
41
+ )),
26
42
  type: 'string'
27
43
  },
28
44
  embeddedLanguages: {
29
- description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.embeddedLanguages', 'A map of scope name to language id if this grammar contains embedded languages.'),
45
+ description: ( nls.localizeWithPath(
46
+ 'vs/workbench/services/textMate/common/TMGrammars',
47
+ 'vscode.extension.contributes.grammars.embeddedLanguages',
48
+ 'A map of scope name to language id if this grammar contains embedded languages.'
49
+ )),
30
50
  type: 'object'
31
51
  },
32
52
  tokenTypes: {
33
- description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.tokenTypes', 'A map of scope name to token types.'),
53
+ description: ( nls.localizeWithPath(
54
+ 'vs/workbench/services/textMate/common/TMGrammars',
55
+ 'vscode.extension.contributes.grammars.tokenTypes',
56
+ 'A map of scope name to token types.'
57
+ )),
34
58
  type: 'object',
35
59
  additionalProperties: {
36
60
  enum: ['string', 'comment', 'other']
37
61
  }
38
62
  },
39
63
  injectTo: {
40
- description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.injectTo', 'List of language scope names to which this grammar is injected to.'),
64
+ description: ( nls.localizeWithPath(
65
+ 'vs/workbench/services/textMate/common/TMGrammars',
66
+ 'vscode.extension.contributes.grammars.injectTo',
67
+ 'List of language scope names to which this grammar is injected to.'
68
+ )),
41
69
  type: 'array',
42
70
  items: {
43
71
  type: 'string'
44
72
  }
45
73
  },
46
74
  balancedBracketScopes: {
47
- description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.balancedBracketScopes', 'Defines which scope names contain balanced brackets.'),
75
+ description: ( nls.localizeWithPath(
76
+ 'vs/workbench/services/textMate/common/TMGrammars',
77
+ 'vscode.extension.contributes.grammars.balancedBracketScopes',
78
+ 'Defines which scope names contain balanced brackets.'
79
+ )),
48
80
  type: 'array',
49
81
  items: {
50
82
  type: 'string'
@@ -52,7 +84,11 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
52
84
  default: ['*'],
53
85
  },
54
86
  unbalancedBracketScopes: {
55
- description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.unbalancedBracketScopes', 'Defines which scope names do not contain balanced brackets.'),
87
+ description: ( nls.localizeWithPath(
88
+ 'vs/workbench/services/textMate/common/TMGrammars',
89
+ 'vscode.extension.contributes.grammars.unbalancedBracketScopes',
90
+ 'Defines which scope names do not contain balanced brackets.'
91
+ )),
56
92
  type: 'array',
57
93
  items: {
58
94
  type: 'string'