@codingame/monaco-vscode-textmate-service-override 10.0.2 → 10.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": "10.0
|
|
3
|
+
"version": "10.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@10.0
|
|
32
|
+
"vscode": "npm:@codingame/monaco-vscode-api@10.1.0",
|
|
33
33
|
"vscode-oniguruma": "1.7.0",
|
|
34
34
|
"vscode-textmate": "9.1.0",
|
|
35
|
-
"@codingame/monaco-vscode-files-service-override": "10.0
|
|
35
|
+
"@codingame/monaco-vscode-files-service-override": "10.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(3082, "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(3083, "Stop"))]
|
|
177
177
|
}, (progress) => {
|
|
178
178
|
progress.report({
|
|
179
|
-
message: ( localize(
|
|
179
|
+
message: ( localize(3084, "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(3085, "Now logging TM Grammar parsing. Press Stop when finished."))
|
|
185
185
|
});
|
|
186
186
|
return (
|
|
187
187
|
(new Promise((resolve, reject) => { }))
|
|
@@ -389,7 +389,7 @@ function equalsTokenRules(a, b) {
|
|
|
389
389
|
function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _languageService) {
|
|
390
390
|
if (syntax.language && ((typeof syntax.language !== 'string') || !_languageService.isRegisteredLanguageId(syntax.language))) {
|
|
391
391
|
collector.error(( localize(
|
|
392
|
-
|
|
392
|
+
3086,
|
|
393
393
|
"Unknown language in `contributes.{0}.language`. Provided value: {1}",
|
|
394
394
|
grammarsExtPoint.name,
|
|
395
395
|
String(syntax.language)
|
|
@@ -398,7 +398,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
398
398
|
}
|
|
399
399
|
if (!syntax.scopeName || (typeof syntax.scopeName !== 'string')) {
|
|
400
400
|
collector.error(( localize(
|
|
401
|
-
|
|
401
|
+
3087,
|
|
402
402
|
"Expected string in `contributes.{0}.scopeName`. Provided value: {1}",
|
|
403
403
|
grammarsExtPoint.name,
|
|
404
404
|
String(syntax.scopeName)
|
|
@@ -407,7 +407,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
407
407
|
}
|
|
408
408
|
if (!syntax.path || (typeof syntax.path !== 'string')) {
|
|
409
409
|
collector.error(( localize(
|
|
410
|
-
|
|
410
|
+
3088,
|
|
411
411
|
"Expected string in `contributes.{0}.path`. Provided value: {1}",
|
|
412
412
|
grammarsExtPoint.name,
|
|
413
413
|
String(syntax.path)
|
|
@@ -416,7 +416,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
416
416
|
}
|
|
417
417
|
if (syntax.injectTo && (!Array.isArray(syntax.injectTo) || ( (syntax.injectTo.some(scope => typeof scope !== 'string'))))) {
|
|
418
418
|
collector.error(( localize(
|
|
419
|
-
|
|
419
|
+
3089,
|
|
420
420
|
"Invalid value in `contributes.{0}.injectTo`. Must be an array of language scope names. Provided value: {1}",
|
|
421
421
|
grammarsExtPoint.name,
|
|
422
422
|
JSON.stringify(syntax.injectTo)
|
|
@@ -425,7 +425,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
425
425
|
}
|
|
426
426
|
if (syntax.embeddedLanguages && !isObject(syntax.embeddedLanguages)) {
|
|
427
427
|
collector.error(( localize(
|
|
428
|
-
|
|
428
|
+
3090,
|
|
429
429
|
"Invalid value in `contributes.{0}.embeddedLanguages`. Must be an object map from scope name to language. Provided value: {1}",
|
|
430
430
|
grammarsExtPoint.name,
|
|
431
431
|
JSON.stringify(syntax.embeddedLanguages)
|
|
@@ -434,7 +434,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
434
434
|
}
|
|
435
435
|
if (syntax.tokenTypes && !isObject(syntax.tokenTypes)) {
|
|
436
436
|
collector.error(( localize(
|
|
437
|
-
|
|
437
|
+
3091,
|
|
438
438
|
"Invalid value in `contributes.{0}.tokenTypes`. Must be an object map from scope name to token type. Provided value: {1}",
|
|
439
439
|
grammarsExtPoint.name,
|
|
440
440
|
JSON.stringify(syntax.tokenTypes)
|
|
@@ -444,7 +444,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
444
444
|
const grammarLocation = joinPath(extensionLocation, syntax.path);
|
|
445
445
|
if (!isEqualOrParent(grammarLocation, extensionLocation)) {
|
|
446
446
|
collector.warn(( localize(
|
|
447
|
-
|
|
447
|
+
3092,
|
|
448
448
|
"Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.",
|
|
449
449
|
grammarsExtPoint.name,
|
|
450
450
|
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(3093, '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(3094, 'The identifier of the semantic token type')),
|
|
20
20
|
pattern: typeAndModifierIdPattern,
|
|
21
|
-
patternErrorMessage: ( localize(
|
|
21
|
+
patternErrorMessage: ( localize(3095, 'Identifiers should be in the form letterOrDigit[_-letterOrDigit]*')),
|
|
22
22
|
},
|
|
23
23
|
superType: {
|
|
24
24
|
type: 'string',
|
|
25
|
-
description: ( localize(
|
|
25
|
+
description: ( localize(3096, 'The super type of the semantic token type')),
|
|
26
26
|
pattern: typeAndModifierIdPattern,
|
|
27
|
-
patternErrorMessage: ( localize(
|
|
27
|
+
patternErrorMessage: ( localize(3097, 'Super types should be in the form letterOrDigit[_-letterOrDigit]*')),
|
|
28
28
|
},
|
|
29
29
|
description: {
|
|
30
30
|
type: 'string',
|
|
31
|
-
description: ( localize(
|
|
31
|
+
description: ( localize(3098, '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(3099, '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(3100, 'The identifier of the semantic token modifier')),
|
|
48
48
|
pattern: typeAndModifierIdPattern,
|
|
49
|
-
patternErrorMessage: ( localize(
|
|
49
|
+
patternErrorMessage: ( localize(3101, 'Identifiers should be in the form letterOrDigit[_-letterOrDigit]*'))
|
|
50
50
|
},
|
|
51
51
|
description: {
|
|
52
52
|
type: 'string',
|
|
53
|
-
description: ( localize(
|
|
53
|
+
description: ( localize(3102, '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(3103, '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(3104, 'Lists the languge for which the defaults are.')),
|
|
69
69
|
type: 'string'
|
|
70
70
|
},
|
|
71
71
|
scopes: {
|
|
72
72
|
description: ( localize(
|
|
73
|
-
|
|
73
|
+
3105,
|
|
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
|
+
3106,
|
|
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
|
+
3107,
|
|
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
|
+
3108,
|
|
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
|
+
3109,
|
|
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(3110, "'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(3111, "'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(3112, "'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(3113, "'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
|
+
3114,
|
|
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
|
+
3115,
|
|
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
|
+
3116,
|
|
204
204
|
"configuration.semanticTokenScopes.scopes': Problems parsing selector {0}.",
|
|
205
205
|
selectorString
|
|
206
206
|
)));
|