@codingame/monaco-vscode-textmate-service-override 11.0.1 → 11.1.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-textmate-service-override",
|
|
3
|
-
"version": "11.0
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"vscode": "npm:@codingame/monaco-vscode-api@11.0
|
|
32
|
+
"vscode": "npm:@codingame/monaco-vscode-api@11.1.0",
|
|
33
33
|
"vscode-oniguruma": "1.7.0",
|
|
34
34
|
"vscode-textmate": "9.1.0",
|
|
35
|
-
"@codingame/monaco-vscode-files-service-override": "11.0
|
|
35
|
+
"@codingame/monaco-vscode-files-service-override": "11.1.0"
|
|
36
36
|
}
|
|
37
37
|
}
|
package/vscode/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.js
CHANGED
|
@@ -165,7 +165,7 @@ let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disp
|
|
|
165
165
|
}
|
|
166
166
|
startDebugMode(printFn, onStop) {
|
|
167
167
|
if (this._debugMode) {
|
|
168
|
-
this._notificationService.error(( localize(
|
|
168
|
+
this._notificationService.error(( localize(3106, "Already Logging.")));
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
171
|
this._debugModePrintFunc = printFn;
|
|
@@ -173,15 +173,15 @@ let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disp
|
|
|
173
173
|
if (this._debugMode) {
|
|
174
174
|
this._progressService.withProgress({
|
|
175
175
|
location: 15 ,
|
|
176
|
-
buttons: [( localize(
|
|
176
|
+
buttons: [( localize(3107, "Stop"))]
|
|
177
177
|
}, (progress) => {
|
|
178
178
|
progress.report({
|
|
179
|
-
message: ( localize(
|
|
179
|
+
message: ( localize(3108, "Preparing to log TM Grammar parsing. Press Stop when finished."))
|
|
180
180
|
});
|
|
181
181
|
return this._getVSCodeOniguruma().then((vscodeOniguruma) => {
|
|
182
182
|
vscodeOniguruma.setDefaultDebugCall(true);
|
|
183
183
|
progress.report({
|
|
184
|
-
message: ( localize(
|
|
184
|
+
message: ( localize(3109, "Now logging TM Grammar parsing. Press Stop when finished."))
|
|
185
185
|
});
|
|
186
186
|
return (
|
|
187
187
|
(new Promise((resolve, reject) => { }))
|
|
@@ -388,7 +388,7 @@ function equalsTokenRules(a, b) {
|
|
|
388
388
|
function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _languageService) {
|
|
389
389
|
if (syntax.language && ((typeof syntax.language !== 'string') || !_languageService.isRegisteredLanguageId(syntax.language))) {
|
|
390
390
|
collector.error(( localize(
|
|
391
|
-
|
|
391
|
+
3110,
|
|
392
392
|
"Unknown language in `contributes.{0}.language`. Provided value: {1}",
|
|
393
393
|
grammarsExtPoint.name,
|
|
394
394
|
String(syntax.language)
|
|
@@ -397,7 +397,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
397
397
|
}
|
|
398
398
|
if (!syntax.scopeName || (typeof syntax.scopeName !== 'string')) {
|
|
399
399
|
collector.error(( localize(
|
|
400
|
-
|
|
400
|
+
3111,
|
|
401
401
|
"Expected string in `contributes.{0}.scopeName`. Provided value: {1}",
|
|
402
402
|
grammarsExtPoint.name,
|
|
403
403
|
String(syntax.scopeName)
|
|
@@ -406,7 +406,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
406
406
|
}
|
|
407
407
|
if (!syntax.path || (typeof syntax.path !== 'string')) {
|
|
408
408
|
collector.error(( localize(
|
|
409
|
-
|
|
409
|
+
3112,
|
|
410
410
|
"Expected string in `contributes.{0}.path`. Provided value: {1}",
|
|
411
411
|
grammarsExtPoint.name,
|
|
412
412
|
String(syntax.path)
|
|
@@ -415,7 +415,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
415
415
|
}
|
|
416
416
|
if (syntax.injectTo && (!Array.isArray(syntax.injectTo) || ( (syntax.injectTo.some(scope => typeof scope !== 'string'))))) {
|
|
417
417
|
collector.error(( localize(
|
|
418
|
-
|
|
418
|
+
3113,
|
|
419
419
|
"Invalid value in `contributes.{0}.injectTo`. Must be an array of language scope names. Provided value: {1}",
|
|
420
420
|
grammarsExtPoint.name,
|
|
421
421
|
JSON.stringify(syntax.injectTo)
|
|
@@ -424,7 +424,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
424
424
|
}
|
|
425
425
|
if (syntax.embeddedLanguages && !isObject(syntax.embeddedLanguages)) {
|
|
426
426
|
collector.error(( localize(
|
|
427
|
-
|
|
427
|
+
3114,
|
|
428
428
|
"Invalid value in `contributes.{0}.embeddedLanguages`. Must be an object map from scope name to language. Provided value: {1}",
|
|
429
429
|
grammarsExtPoint.name,
|
|
430
430
|
JSON.stringify(syntax.embeddedLanguages)
|
|
@@ -433,7 +433,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
433
433
|
}
|
|
434
434
|
if (syntax.tokenTypes && !isObject(syntax.tokenTypes)) {
|
|
435
435
|
collector.error(( localize(
|
|
436
|
-
|
|
436
|
+
3115,
|
|
437
437
|
"Invalid value in `contributes.{0}.tokenTypes`. Must be an object map from scope name to token type. Provided value: {1}",
|
|
438
438
|
grammarsExtPoint.name,
|
|
439
439
|
JSON.stringify(syntax.tokenTypes)
|
|
@@ -443,7 +443,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
443
443
|
const grammarLocation = joinPath(extensionLocation, syntax.path);
|
|
444
444
|
if (!isEqualOrParent(grammarLocation, extensionLocation)) {
|
|
445
445
|
collector.warn(( localize(
|
|
446
|
-
|
|
446
|
+
3116,
|
|
447
447
|
"Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.",
|
|
448
448
|
grammarsExtPoint.name,
|
|
449
449
|
grammarLocation.path,
|
|
@@ -9,26 +9,26 @@ const tokenClassificationRegistry = getTokenClassificationRegistry();
|
|
|
9
9
|
const tokenTypeExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
10
10
|
extensionPoint: 'semanticTokenTypes',
|
|
11
11
|
jsonSchema: {
|
|
12
|
-
description: ( localize(
|
|
12
|
+
description: ( localize(3117, 'Contributes semantic token types.')),
|
|
13
13
|
type: 'array',
|
|
14
14
|
items: {
|
|
15
15
|
type: 'object',
|
|
16
16
|
properties: {
|
|
17
17
|
id: {
|
|
18
18
|
type: 'string',
|
|
19
|
-
description: ( localize(
|
|
19
|
+
description: ( localize(3118, 'The identifier of the semantic token type')),
|
|
20
20
|
pattern: typeAndModifierIdPattern,
|
|
21
|
-
patternErrorMessage: ( localize(
|
|
21
|
+
patternErrorMessage: ( localize(3119, 'Identifiers should be in the form letterOrDigit[_-letterOrDigit]*')),
|
|
22
22
|
},
|
|
23
23
|
superType: {
|
|
24
24
|
type: 'string',
|
|
25
|
-
description: ( localize(
|
|
25
|
+
description: ( localize(3120, 'The super type of the semantic token type')),
|
|
26
26
|
pattern: typeAndModifierIdPattern,
|
|
27
|
-
patternErrorMessage: ( localize(
|
|
27
|
+
patternErrorMessage: ( localize(3121, 'Super types should be in the form letterOrDigit[_-letterOrDigit]*')),
|
|
28
28
|
},
|
|
29
29
|
description: {
|
|
30
30
|
type: 'string',
|
|
31
|
-
description: ( localize(
|
|
31
|
+
description: ( localize(3122, 'The description of the semantic token type')),
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -37,20 +37,20 @@ const tokenTypeExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
37
37
|
const tokenModifierExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
38
38
|
extensionPoint: 'semanticTokenModifiers',
|
|
39
39
|
jsonSchema: {
|
|
40
|
-
description: ( localize(
|
|
40
|
+
description: ( localize(3123, 'Contributes semantic token modifiers.')),
|
|
41
41
|
type: 'array',
|
|
42
42
|
items: {
|
|
43
43
|
type: 'object',
|
|
44
44
|
properties: {
|
|
45
45
|
id: {
|
|
46
46
|
type: 'string',
|
|
47
|
-
description: ( localize(
|
|
47
|
+
description: ( localize(3124, 'The identifier of the semantic token modifier')),
|
|
48
48
|
pattern: typeAndModifierIdPattern,
|
|
49
|
-
patternErrorMessage: ( localize(
|
|
49
|
+
patternErrorMessage: ( localize(3125, 'Identifiers should be in the form letterOrDigit[_-letterOrDigit]*'))
|
|
50
50
|
},
|
|
51
51
|
description: {
|
|
52
52
|
type: 'string',
|
|
53
|
-
description: ( localize(
|
|
53
|
+
description: ( localize(3126, 'The description of the semantic token modifier'))
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -59,18 +59,18 @@ const tokenModifierExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
59
59
|
const tokenStyleDefaultsExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
60
60
|
extensionPoint: 'semanticTokenScopes',
|
|
61
61
|
jsonSchema: {
|
|
62
|
-
description: ( localize(
|
|
62
|
+
description: ( localize(3127, 'Contributes semantic token scope maps.')),
|
|
63
63
|
type: 'array',
|
|
64
64
|
items: {
|
|
65
65
|
type: 'object',
|
|
66
66
|
properties: {
|
|
67
67
|
language: {
|
|
68
|
-
description: ( localize(
|
|
68
|
+
description: ( localize(3128, 'Lists the languge for which the defaults are.')),
|
|
69
69
|
type: 'string'
|
|
70
70
|
},
|
|
71
71
|
scopes: {
|
|
72
72
|
description: ( localize(
|
|
73
|
-
|
|
73
|
+
3129,
|
|
74
74
|
'Maps a semantic token (described by semantic token selector) to one or more textMate scopes used to represent that token.'
|
|
75
75
|
)),
|
|
76
76
|
type: 'object',
|
|
@@ -90,7 +90,7 @@ class TokenClassificationExtensionPoints {
|
|
|
90
90
|
function validateTypeOrModifier(contribution, extensionPoint, collector) {
|
|
91
91
|
if (typeof contribution.id !== 'string' || contribution.id.length === 0) {
|
|
92
92
|
collector.error(( localize(
|
|
93
|
-
|
|
93
|
+
3130,
|
|
94
94
|
"'configuration.{0}.id' must be defined and can not be empty",
|
|
95
95
|
extensionPoint
|
|
96
96
|
)));
|
|
@@ -98,7 +98,7 @@ class TokenClassificationExtensionPoints {
|
|
|
98
98
|
}
|
|
99
99
|
if (!contribution.id.match(typeAndModifierIdPattern)) {
|
|
100
100
|
collector.error(( localize(
|
|
101
|
-
|
|
101
|
+
3131,
|
|
102
102
|
"'configuration.{0}.id' must follow the pattern letterOrDigit[-_letterOrDigit]*",
|
|
103
103
|
extensionPoint
|
|
104
104
|
)));
|
|
@@ -107,7 +107,7 @@ class TokenClassificationExtensionPoints {
|
|
|
107
107
|
const superType = contribution.superType;
|
|
108
108
|
if (superType && !superType.match(typeAndModifierIdPattern)) {
|
|
109
109
|
collector.error(( localize(
|
|
110
|
-
|
|
110
|
+
3132,
|
|
111
111
|
"'configuration.{0}.superType' must follow the pattern letterOrDigit[-_letterOrDigit]*",
|
|
112
112
|
extensionPoint
|
|
113
113
|
)));
|
|
@@ -115,7 +115,7 @@ class TokenClassificationExtensionPoints {
|
|
|
115
115
|
}
|
|
116
116
|
if (typeof contribution.description !== 'string' || contribution.id.length === 0) {
|
|
117
117
|
collector.error(( localize(
|
|
118
|
-
|
|
118
|
+
3133,
|
|
119
119
|
"'configuration.{0}.description' must be defined and can not be empty",
|
|
120
120
|
extensionPoint
|
|
121
121
|
)));
|
|
@@ -128,7 +128,7 @@ class TokenClassificationExtensionPoints {
|
|
|
128
128
|
const extensionValue = extension.value;
|
|
129
129
|
const collector = extension.collector;
|
|
130
130
|
if (!extensionValue || !Array.isArray(extensionValue)) {
|
|
131
|
-
collector.error(( localize(
|
|
131
|
+
collector.error(( localize(3134, "'configuration.semanticTokenType' must be an array")));
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
134
|
for (const contribution of extensionValue) {
|
|
@@ -149,7 +149,7 @@ class TokenClassificationExtensionPoints {
|
|
|
149
149
|
const extensionValue = extension.value;
|
|
150
150
|
const collector = extension.collector;
|
|
151
151
|
if (!extensionValue || !Array.isArray(extensionValue)) {
|
|
152
|
-
collector.error(( localize(
|
|
152
|
+
collector.error(( localize(3135, "'configuration.semanticTokenModifier' must be an array")));
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
155
|
for (const contribution of extensionValue) {
|
|
@@ -170,17 +170,17 @@ class TokenClassificationExtensionPoints {
|
|
|
170
170
|
const extensionValue = extension.value;
|
|
171
171
|
const collector = extension.collector;
|
|
172
172
|
if (!extensionValue || !Array.isArray(extensionValue)) {
|
|
173
|
-
collector.error(( localize(
|
|
173
|
+
collector.error(( localize(3136, "'configuration.semanticTokenScopes' must be an array")));
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
176
|
for (const contribution of extensionValue) {
|
|
177
177
|
if (contribution.language && typeof contribution.language !== 'string') {
|
|
178
|
-
collector.error(( localize(
|
|
178
|
+
collector.error(( localize(3137, "'configuration.semanticTokenScopes.language' must be a string")));
|
|
179
179
|
continue;
|
|
180
180
|
}
|
|
181
181
|
if (!contribution.scopes || typeof contribution.scopes !== 'object') {
|
|
182
182
|
collector.error(( localize(
|
|
183
|
-
|
|
183
|
+
3138,
|
|
184
184
|
"'configuration.semanticTokenScopes.scopes' must be defined as an object"
|
|
185
185
|
)));
|
|
186
186
|
continue;
|
|
@@ -189,7 +189,7 @@ class TokenClassificationExtensionPoints {
|
|
|
189
189
|
const tmScopes = contribution.scopes[selectorString];
|
|
190
190
|
if (!Array.isArray(tmScopes) || ( (tmScopes.some(l => typeof l !== 'string')))) {
|
|
191
191
|
collector.error(( localize(
|
|
192
|
-
|
|
192
|
+
3139,
|
|
193
193
|
"'configuration.semanticTokenScopes.scopes' values must be an array of strings"
|
|
194
194
|
)));
|
|
195
195
|
continue;
|
|
@@ -200,7 +200,7 @@ class TokenClassificationExtensionPoints {
|
|
|
200
200
|
}
|
|
201
201
|
catch (e) {
|
|
202
202
|
collector.error(( localize(
|
|
203
|
-
|
|
203
|
+
3140,
|
|
204
204
|
"configuration.semanticTokenScopes.scopes': Problems parsing selector {0}.",
|
|
205
205
|
selectorString
|
|
206
206
|
)));
|