@codingame/monaco-vscode-textmate-service-override 1.85.4 → 2.0.0-rework-ci.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/package.json +5 -5
- package/textmate.js +4 -4
- package/vscode/src/vs/workbench/services/textMate/browser/arrayOperation.js +1 -1
- package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/textMateWorkerTokenizerController.js +8 -7
- package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/threadedBackgroundTokenizerFactory.js +12 -12
- package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker.js +1 -1
- package/vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateWorkerTokenizer.js +8 -8
- package/vscode/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.js +37 -37
- package/vscode/src/vs/workbench/services/textMate/browser/tokenizationSupport/textMateTokenizationSupport.js +5 -5
- package/vscode/src/vs/workbench/services/textMate/browser/tokenizationSupport/tokenizationSupportWithLineLimit.js +3 -3
- package/vscode/src/vs/workbench/services/textMate/common/TMGrammarFactory.js +1 -1
- package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +10 -10
- package/vscode/src/vs/workbench/services/textMate/common/TMScopeRegistry.js +2 -2
- package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +25 -25
- package/workers/textmate.worker.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-textmate-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-rework-ci.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "git
|
|
12
|
+
"url": "git@github.com:CodinGame/monaco-vscode-api.git"
|
|
13
13
|
},
|
|
14
14
|
"type": "module",
|
|
15
15
|
"private": false,
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
22
|
-
"
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@2.0.0-rework-ci.1",
|
|
22
|
+
"vscode-marked": "npm:marked@=3.0.2",
|
|
23
23
|
"vscode-oniguruma": "1.7.0",
|
|
24
24
|
"vscode-textmate": "9.0.0",
|
|
25
|
-
"@codingame/monaco-vscode-files-service-override": "
|
|
25
|
+
"@codingame/monaco-vscode-files-service-override": "2.0.0-rework-ci.1"
|
|
26
26
|
},
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
package/textmate.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { __decorate, __param } from './external/tslib/tslib.es6.js';
|
|
2
|
-
import { StandaloneServices } from '
|
|
2
|
+
import { StandaloneServices } from 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
|
|
3
3
|
import { ITextMateTokenizationService } from 'vscode/vscode/vs/workbench/services/textMate/browser/textMateTokenizationFeature';
|
|
4
4
|
export { ITextMateTokenizationService } from 'vscode/vscode/vs/workbench/services/textMate/browser/textMateTokenizationFeature';
|
|
5
|
-
import { SyncDescriptor } from '
|
|
5
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
6
6
|
import { TextMateTokenizationFeature } from './vscode/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.js';
|
|
7
7
|
import { TokenClassificationExtensionPoints } from './vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js';
|
|
8
8
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
9
|
-
import { Registry } from '
|
|
9
|
+
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
10
10
|
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
11
|
-
import { IInstantiationService } from '
|
|
11
|
+
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
12
12
|
import getServiceOverride$1 from '@codingame/monaco-vscode-files-service-override';
|
|
13
13
|
import { registerServiceInitializeParticipant } from 'vscode/lifecycle';
|
|
14
14
|
import { registerAssets } from 'vscode/assets';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { Disposable } from '
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { ContiguousMultilineTokensBuilder } from 'monaco-editor/esm/vs/editor/common/tokens/contiguousMultilineTokensBuilder.js';
|
|
1
|
+
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
2
|
+
import { countEOL } from 'vscode/vscode/vs/editor/common/core/eolCounter';
|
|
3
|
+
import { LineRange } from 'vscode/vscode/vs/editor/common/core/lineRange';
|
|
4
|
+
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
5
|
+
import { TokenizationStateStore } from 'vscode/vscode/vs/editor/common/model/textModelTokens';
|
|
6
|
+
import { ContiguousMultilineTokensBuilder } from 'vscode/vscode/vs/editor/common/tokens/contiguousMultilineTokensBuilder';
|
|
8
7
|
import { MonotonousIndexTransformer, ArrayEdit, SingleArrayEdit } from '../arrayOperation.js';
|
|
9
8
|
import { applyStateStackDiff, INITIAL } from 'vscode-textmate';
|
|
9
|
+
import { keepObserved, observableFromEvent } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
10
|
+
import { autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
10
11
|
|
|
11
12
|
class TextMateWorkerTokenizerController extends Disposable {
|
|
12
13
|
static { this._id = 0; }
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { DisposableStore, toDisposable } from '
|
|
3
|
-
import { FileAccess, nodeModulesPath, nodeModulesAsarPath } from '
|
|
4
|
-
import { isWeb } from '
|
|
5
|
-
import { URI } from '
|
|
6
|
-
import { createWebWorker } from '
|
|
7
|
-
import { ILanguageService } from '
|
|
8
|
-
import { ILanguageConfigurationService } from '
|
|
9
|
-
import { IModelService } from '
|
|
10
|
-
import { IConfigurationService } from '
|
|
11
|
-
import { IEnvironmentService } from '
|
|
2
|
+
import { DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
+
import { FileAccess, nodeModulesPath, nodeModulesAsarPath } from 'vscode/vscode/vs/base/common/network';
|
|
4
|
+
import { isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
5
|
+
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
6
|
+
import { createWebWorker } from 'vscode/vscode/vs/editor/browser/services/webWorker';
|
|
7
|
+
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
8
|
+
import { ILanguageConfigurationService } from 'vscode/vscode/vs/editor/common/languages/languageConfigurationRegistry';
|
|
9
|
+
import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
10
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
11
|
+
import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/common/environment';
|
|
12
12
|
import { IExtensionResourceLoaderService } from 'vscode/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader';
|
|
13
|
-
import { INotificationService } from '
|
|
14
|
-
import { ITelemetryService } from '
|
|
13
|
+
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
14
|
+
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
15
15
|
import { TextMateWorkerTokenizerController } from './textMateWorkerTokenizerController.js';
|
|
16
16
|
|
|
17
17
|
var ThreadedBackgroundTokenizerFactory_1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { URI } from '
|
|
1
|
+
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
2
2
|
import { TMGrammarFactory } from '../../../common/TMGrammarFactory.js';
|
|
3
3
|
import { TextMateWorkerTokenizer } from './textMateWorkerTokenizer.js';
|
|
4
4
|
import * as vscodeTextmate from 'vscode-textmate';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { RunOnceScheduler } from '
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { LineTokens } from 'monaco-editor/esm/vs/editor/common/tokens/lineTokens.js';
|
|
1
|
+
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
2
|
+
import { setTimeout0 } from 'vscode/vscode/vs/base/common/platform';
|
|
3
|
+
import { LineRange } from 'vscode/vscode/vs/editor/common/core/lineRange';
|
|
4
|
+
import { MirrorTextModel } from 'vscode/vscode/vs/editor/common/model/mirrorTextModel';
|
|
5
|
+
import { TokenizerWithStateStore } from 'vscode/vscode/vs/editor/common/model/textModelTokens';
|
|
6
|
+
import { ContiguousMultilineTokensBuilder } from 'vscode/vscode/vs/editor/common/tokens/contiguousMultilineTokensBuilder';
|
|
7
|
+
import { LineTokens } from 'vscode/vscode/vs/editor/common/tokens/lineTokens';
|
|
9
8
|
import { TextMateTokenizationSupport } from '../../tokenizationSupport/textMateTokenizationSupport.js';
|
|
10
9
|
import { TokenizationSupportWithLineLimit } from '../../tokenizationSupport/tokenizationSupportWithLineLimit.js';
|
|
11
10
|
import { diffStateStacksRefEq } from 'vscode-textmate';
|
|
11
|
+
import { observableValue } from 'vscode/vscode/vs/base/common/observableInternal/base';
|
|
12
12
|
|
|
13
13
|
class TextMateWorkerTokenizer extends MirrorTextModel {
|
|
14
14
|
constructor(uri, lines, eol, versionId, _host, _languageId, _encodedLanguageId, maxTokenizationLineLength) {
|
package/vscode/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import
|
|
3
|
-
import { equals } from '
|
|
4
|
-
import { Color } from '
|
|
5
|
-
import { onUnexpectedError } from '
|
|
6
|
-
import { Disposable, DisposableStore } from '
|
|
7
|
-
import { FileAccess, nodeModulesAsarUnpackedPath, nodeModulesPath } from '
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
2
|
+
import { createStyleSheet } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
|
+
import { equals } from 'vscode/vscode/vs/base/common/arrays';
|
|
4
|
+
import { Color } from 'vscode/vscode/vs/base/common/color';
|
|
5
|
+
import { onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
|
|
6
|
+
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { FileAccess, nodeModulesAsarUnpackedPath, nodeModulesPath } from 'vscode/vscode/vs/base/common/network';
|
|
8
|
+
import { isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
9
|
+
import { joinPath, isEqualOrParent } from 'vscode/vscode/vs/base/common/resources';
|
|
10
|
+
import { isObject } from 'vscode/vscode/vs/base/common/types';
|
|
11
|
+
import { LazyTokenizationSupport, TokenizationRegistry } from 'vscode/vscode/vs/editor/common/languages';
|
|
12
|
+
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
13
|
+
import { generateTokensCSSForColorMap } from 'vscode/vscode/vs/editor/common/languages/supports/tokenization';
|
|
14
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
15
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
17
16
|
import { IExtensionResourceLoaderService } from 'vscode/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader';
|
|
18
|
-
import { IInstantiationService } from '
|
|
19
|
-
import { ILogService } from '
|
|
20
|
-
import { INotificationService } from '
|
|
21
|
-
import { IProgressService } from '
|
|
22
|
-
import { ITelemetryService } from '
|
|
17
|
+
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
18
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
19
|
+
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
20
|
+
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
21
|
+
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
23
22
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
|
|
24
23
|
import { TextMateTokenizationSupport } from './tokenizationSupport/textMateTokenizationSupport.js';
|
|
25
24
|
import { TokenizationSupportWithLineLimit } from './tokenizationSupport/tokenizationSupportWithLineLimit.js';
|
|
@@ -29,6 +28,7 @@ import { grammarsExtPoint } from '../common/TMGrammars.js';
|
|
|
29
28
|
import { IWorkbenchThemeService } from 'vscode/vscode/vs/workbench/services/themes/common/workbenchThemeService';
|
|
30
29
|
import * as vscodeTextmate from 'vscode-textmate';
|
|
31
30
|
import * as vscodeOniguruma from 'vscode-oniguruma';
|
|
31
|
+
import { observableFromEvent } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
32
32
|
|
|
33
33
|
var TextMateTokenizationFeature_1;
|
|
34
34
|
let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disposable {
|
|
@@ -57,7 +57,7 @@ let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disp
|
|
|
57
57
|
this._currentTokenColorMap = null;
|
|
58
58
|
this._threadedBackgroundTokenizerFactory = this._instantiationService.createInstance(ThreadedBackgroundTokenizerFactory, (timeMs, languageId, sourceExtensionId, lineLength, isRandomSample) => this._reportTokenizationTime(timeMs, languageId, sourceExtensionId, lineLength, true, isRandomSample), () => this.getAsyncTokenizationEnabled());
|
|
59
59
|
this._vscodeOniguruma = null;
|
|
60
|
-
this._styleElement =
|
|
60
|
+
this._styleElement = createStyleSheet();
|
|
61
61
|
this._styleElement.className = 'vscode-tokens-styles';
|
|
62
62
|
grammarsExtPoint.setHandler((extensions) => this._handleGrammarsExtPoint(extensions));
|
|
63
63
|
this._updateTheme(this._themeService.getColorTheme(), true);
|
|
@@ -105,7 +105,7 @@ let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disp
|
|
|
105
105
|
if (!validateGrammarExtensionPoint(extension.description.extensionLocation, grammar, extension.collector, this._languageService)) {
|
|
106
106
|
return null;
|
|
107
107
|
}
|
|
108
|
-
const grammarLocation =
|
|
108
|
+
const grammarLocation = joinPath(extension.description.extensionLocation, grammar.path);
|
|
109
109
|
const embeddedLanguages = Object.create(null);
|
|
110
110
|
if (grammar.embeddedLanguages) {
|
|
111
111
|
const scopes = ( Object.keys(grammar.embeddedLanguages));
|
|
@@ -162,7 +162,7 @@ let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disp
|
|
|
162
162
|
}
|
|
163
163
|
startDebugMode(printFn, onStop) {
|
|
164
164
|
if (this._debugMode) {
|
|
165
|
-
this._notificationService.error((
|
|
165
|
+
this._notificationService.error(( localizeWithPath(
|
|
166
166
|
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
|
|
167
167
|
'alreadyDebugging',
|
|
168
168
|
"Already Logging."
|
|
@@ -174,14 +174,14 @@ let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disp
|
|
|
174
174
|
if (this._debugMode) {
|
|
175
175
|
this._progressService.withProgress({
|
|
176
176
|
location: 15 ,
|
|
177
|
-
buttons: [(
|
|
177
|
+
buttons: [( localizeWithPath(
|
|
178
178
|
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
|
|
179
179
|
'stop',
|
|
180
180
|
"Stop"
|
|
181
181
|
))]
|
|
182
182
|
}, (progress) => {
|
|
183
183
|
progress.report({
|
|
184
|
-
message: (
|
|
184
|
+
message: ( localizeWithPath(
|
|
185
185
|
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
|
|
186
186
|
'progress1',
|
|
187
187
|
"Preparing to log TM Grammar parsing. Press Stop when finished."
|
|
@@ -190,7 +190,7 @@ let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disp
|
|
|
190
190
|
return this._getVSCodeOniguruma().then((vscodeOniguruma) => {
|
|
191
191
|
vscodeOniguruma.setDefaultDebugCall(true);
|
|
192
192
|
progress.report({
|
|
193
|
-
message: (
|
|
193
|
+
message: ( localizeWithPath(
|
|
194
194
|
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
|
|
195
195
|
'progress2',
|
|
196
196
|
"Now logging TM Grammar parsing. Press Stop when finished."
|
|
@@ -398,7 +398,7 @@ function equalsTokenRules(a, b) {
|
|
|
398
398
|
}
|
|
399
399
|
function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _languageService) {
|
|
400
400
|
if (syntax.language && ((typeof syntax.language !== 'string') || !_languageService.isRegisteredLanguageId(syntax.language))) {
|
|
401
|
-
collector.error((
|
|
401
|
+
collector.error(( localizeWithPath(
|
|
402
402
|
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
|
|
403
403
|
'invalid.language',
|
|
404
404
|
"Unknown language in `contributes.{0}.language`. Provided value: {1}",
|
|
@@ -408,7 +408,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
408
408
|
return false;
|
|
409
409
|
}
|
|
410
410
|
if (!syntax.scopeName || (typeof syntax.scopeName !== 'string')) {
|
|
411
|
-
collector.error((
|
|
411
|
+
collector.error(( localizeWithPath(
|
|
412
412
|
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
|
|
413
413
|
'invalid.scopeName',
|
|
414
414
|
"Expected string in `contributes.{0}.scopeName`. Provided value: {1}",
|
|
@@ -418,7 +418,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
418
418
|
return false;
|
|
419
419
|
}
|
|
420
420
|
if (!syntax.path || (typeof syntax.path !== 'string')) {
|
|
421
|
-
collector.error((
|
|
421
|
+
collector.error(( localizeWithPath(
|
|
422
422
|
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
|
|
423
423
|
'invalid.path.0',
|
|
424
424
|
"Expected string in `contributes.{0}.path`. Provided value: {1}",
|
|
@@ -428,7 +428,7 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
428
428
|
return false;
|
|
429
429
|
}
|
|
430
430
|
if (syntax.injectTo && (!Array.isArray(syntax.injectTo) || ( syntax.injectTo.some(scope => typeof scope !== 'string')))) {
|
|
431
|
-
collector.error((
|
|
431
|
+
collector.error(( localizeWithPath(
|
|
432
432
|
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
|
|
433
433
|
'invalid.injectTo',
|
|
434
434
|
"Invalid value in `contributes.{0}.injectTo`. Must be an array of language scope names. Provided value: {1}",
|
|
@@ -437,8 +437,8 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
437
437
|
)));
|
|
438
438
|
return false;
|
|
439
439
|
}
|
|
440
|
-
if (syntax.embeddedLanguages && !
|
|
441
|
-
collector.error((
|
|
440
|
+
if (syntax.embeddedLanguages && !isObject(syntax.embeddedLanguages)) {
|
|
441
|
+
collector.error(( localizeWithPath(
|
|
442
442
|
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
|
|
443
443
|
'invalid.embeddedLanguages',
|
|
444
444
|
"Invalid value in `contributes.{0}.embeddedLanguages`. Must be an object map from scope name to language. Provided value: {1}",
|
|
@@ -447,8 +447,8 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
447
447
|
)));
|
|
448
448
|
return false;
|
|
449
449
|
}
|
|
450
|
-
if (syntax.tokenTypes && !
|
|
451
|
-
collector.error((
|
|
450
|
+
if (syntax.tokenTypes && !isObject(syntax.tokenTypes)) {
|
|
451
|
+
collector.error(( localizeWithPath(
|
|
452
452
|
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
|
|
453
453
|
'invalid.tokenTypes',
|
|
454
454
|
"Invalid value in `contributes.{0}.tokenTypes`. Must be an object map from scope name to token type. Provided value: {1}",
|
|
@@ -457,9 +457,9 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
|
|
|
457
457
|
)));
|
|
458
458
|
return false;
|
|
459
459
|
}
|
|
460
|
-
const grammarLocation =
|
|
461
|
-
if (!
|
|
462
|
-
collector.warn((
|
|
460
|
+
const grammarLocation = joinPath(extensionLocation, syntax.path);
|
|
461
|
+
if (!isEqualOrParent(grammarLocation, extensionLocation)) {
|
|
462
|
+
collector.warn(( localizeWithPath(
|
|
463
463
|
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl',
|
|
464
464
|
'invalid.path.1',
|
|
465
465
|
"Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Emitter } from '
|
|
2
|
-
import { Disposable } from '
|
|
3
|
-
import { StopWatch } from '
|
|
4
|
-
import { TokenMetadata } from '
|
|
5
|
-
import { EncodedTokenizationResult } from '
|
|
1
|
+
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
2
|
+
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
+
import { StopWatch } from 'vscode/vscode/vs/base/common/stopwatch';
|
|
4
|
+
import { TokenMetadata } from 'vscode/vscode/vs/editor/common/encodedTokenAttributes';
|
|
5
|
+
import { EncodedTokenizationResult } from 'vscode/vscode/vs/editor/common/languages';
|
|
6
6
|
|
|
7
7
|
class TextMateTokenizationSupport extends Disposable {
|
|
8
8
|
constructor(_grammar, _initialState, _containsEmbeddedLanguages, _createBackgroundTokenizer, _backgroundTokenizerShouldOnlyVerifyTokens, _reportTokenizationTime, _reportSlowTokenization) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { nullTokenizeEncoded } from '
|
|
2
|
-
import { Disposable } from '
|
|
3
|
-
import { keepObserved } from '
|
|
1
|
+
import { nullTokenizeEncoded } from 'vscode/vscode/vs/editor/common/languages/nullTokenize';
|
|
2
|
+
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
+
import { keepObserved } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
4
4
|
|
|
5
5
|
class TokenizationSupportWithLineLimit extends Disposable {
|
|
6
6
|
get backgroundTokenizerShouldOnlyVerifyTokens() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Disposable } from '
|
|
1
|
+
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
2
2
|
import { TMScopeRegistry } from './TMScopeRegistry.js';
|
|
3
3
|
|
|
4
4
|
const missingTMGrammarErrorMessage = 'No TM Grammar registered for this language.';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
2
|
import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
3
3
|
import { languagesExtPoint } from 'vscode/vscode/vs/workbench/services/language/common/languageService';
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
6
6
|
extensionPoint: 'grammars',
|
|
7
7
|
deps: [languagesExtPoint],
|
|
8
8
|
jsonSchema: {
|
|
9
|
-
description: (
|
|
9
|
+
description: ( localizeWithPath(
|
|
10
10
|
'vs/workbench/services/textMate/common/TMGrammars',
|
|
11
11
|
'vscode.extension.contributes.grammars',
|
|
12
12
|
'Contributes textmate tokenizers.'
|
|
@@ -18,7 +18,7 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
18
18
|
defaultSnippets: [{ body: { language: '${1:id}', scopeName: 'source.${2:id}', path: './syntaxes/${3:id}.tmLanguage.' } }],
|
|
19
19
|
properties: {
|
|
20
20
|
language: {
|
|
21
|
-
description: (
|
|
21
|
+
description: ( localizeWithPath(
|
|
22
22
|
'vs/workbench/services/textMate/common/TMGrammars',
|
|
23
23
|
'vscode.extension.contributes.grammars.language',
|
|
24
24
|
'Language identifier for which this syntax is contributed to.'
|
|
@@ -26,7 +26,7 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
26
26
|
type: 'string'
|
|
27
27
|
},
|
|
28
28
|
scopeName: {
|
|
29
|
-
description: (
|
|
29
|
+
description: ( localizeWithPath(
|
|
30
30
|
'vs/workbench/services/textMate/common/TMGrammars',
|
|
31
31
|
'vscode.extension.contributes.grammars.scopeName',
|
|
32
32
|
'Textmate scope name used by the tmLanguage file.'
|
|
@@ -34,7 +34,7 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
34
34
|
type: 'string'
|
|
35
35
|
},
|
|
36
36
|
path: {
|
|
37
|
-
description: (
|
|
37
|
+
description: ( localizeWithPath(
|
|
38
38
|
'vs/workbench/services/textMate/common/TMGrammars',
|
|
39
39
|
'vscode.extension.contributes.grammars.path',
|
|
40
40
|
'Path of the tmLanguage file. The path is relative to the extension folder and typically starts with \'./syntaxes/\'.'
|
|
@@ -42,7 +42,7 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
42
42
|
type: 'string'
|
|
43
43
|
},
|
|
44
44
|
embeddedLanguages: {
|
|
45
|
-
description: (
|
|
45
|
+
description: ( localizeWithPath(
|
|
46
46
|
'vs/workbench/services/textMate/common/TMGrammars',
|
|
47
47
|
'vscode.extension.contributes.grammars.embeddedLanguages',
|
|
48
48
|
'A map of scope name to language id if this grammar contains embedded languages.'
|
|
@@ -50,7 +50,7 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
50
50
|
type: 'object'
|
|
51
51
|
},
|
|
52
52
|
tokenTypes: {
|
|
53
|
-
description: (
|
|
53
|
+
description: ( localizeWithPath(
|
|
54
54
|
'vs/workbench/services/textMate/common/TMGrammars',
|
|
55
55
|
'vscode.extension.contributes.grammars.tokenTypes',
|
|
56
56
|
'A map of scope name to token types.'
|
|
@@ -61,7 +61,7 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
injectTo: {
|
|
64
|
-
description: (
|
|
64
|
+
description: ( localizeWithPath(
|
|
65
65
|
'vs/workbench/services/textMate/common/TMGrammars',
|
|
66
66
|
'vscode.extension.contributes.grammars.injectTo',
|
|
67
67
|
'List of language scope names to which this grammar is injected to.'
|
|
@@ -72,7 +72,7 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
balancedBracketScopes: {
|
|
75
|
-
description: (
|
|
75
|
+
description: ( localizeWithPath(
|
|
76
76
|
'vs/workbench/services/textMate/common/TMGrammars',
|
|
77
77
|
'vscode.extension.contributes.grammars.balancedBracketScopes',
|
|
78
78
|
'Defines which scope names contain balanced brackets.'
|
|
@@ -84,7 +84,7 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
84
84
|
default: ['*'],
|
|
85
85
|
},
|
|
86
86
|
unbalancedBracketScopes: {
|
|
87
|
-
description: (
|
|
87
|
+
description: ( localizeWithPath(
|
|
88
88
|
'vs/workbench/services/textMate/common/TMGrammars',
|
|
89
89
|
'vscode.extension.contributes.grammars.unbalancedBracketScopes',
|
|
90
90
|
'Defines which scope names do not contain balanced brackets.'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
2
2
|
|
|
3
3
|
class TMScopeRegistry {
|
|
4
4
|
constructor() {
|
|
@@ -10,7 +10,7 @@ class TMScopeRegistry {
|
|
|
10
10
|
register(def) {
|
|
11
11
|
if (this._scopeNameToLanguageRegistration[def.scopeName]) {
|
|
12
12
|
const existingRegistration = this._scopeNameToLanguageRegistration[def.scopeName];
|
|
13
|
-
if (!
|
|
13
|
+
if (!isEqual(existingRegistration.location, def.location)) {
|
|
14
14
|
console.warn(`Overwriting grammar scope name to file mapping for scope ${def.scopeName}.\n` +
|
|
15
15
|
`Old grammar file: ${( existingRegistration.location.toString())}.\n` +
|
|
16
16
|
`New grammar file: ${( def.location.toString())}`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
2
|
import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
3
3
|
import { getTokenClassificationRegistry, typeAndModifierIdPattern } from 'vscode/vscode/vs/platform/theme/common/tokenClassificationRegistry';
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ const tokenClassificationRegistry = getTokenClassificationRegistry();
|
|
|
6
6
|
const tokenTypeExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
7
7
|
extensionPoint: 'semanticTokenTypes',
|
|
8
8
|
jsonSchema: {
|
|
9
|
-
description: (
|
|
9
|
+
description: ( localizeWithPath(
|
|
10
10
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
11
11
|
'contributes.semanticTokenTypes',
|
|
12
12
|
'Contributes semantic token types.'
|
|
@@ -17,13 +17,13 @@ const tokenTypeExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
17
17
|
properties: {
|
|
18
18
|
id: {
|
|
19
19
|
type: 'string',
|
|
20
|
-
description: (
|
|
20
|
+
description: ( localizeWithPath(
|
|
21
21
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
22
22
|
'contributes.semanticTokenTypes.id',
|
|
23
23
|
'The identifier of the semantic token type'
|
|
24
24
|
)),
|
|
25
25
|
pattern: typeAndModifierIdPattern,
|
|
26
|
-
patternErrorMessage: (
|
|
26
|
+
patternErrorMessage: ( localizeWithPath(
|
|
27
27
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
28
28
|
'contributes.semanticTokenTypes.id.format',
|
|
29
29
|
'Identifiers should be in the form letterOrDigit[_-letterOrDigit]*'
|
|
@@ -31,13 +31,13 @@ const tokenTypeExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
31
31
|
},
|
|
32
32
|
superType: {
|
|
33
33
|
type: 'string',
|
|
34
|
-
description: (
|
|
34
|
+
description: ( localizeWithPath(
|
|
35
35
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
36
36
|
'contributes.semanticTokenTypes.superType',
|
|
37
37
|
'The super type of the semantic token type'
|
|
38
38
|
)),
|
|
39
39
|
pattern: typeAndModifierIdPattern,
|
|
40
|
-
patternErrorMessage: (
|
|
40
|
+
patternErrorMessage: ( localizeWithPath(
|
|
41
41
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
42
42
|
'contributes.semanticTokenTypes.superType.format',
|
|
43
43
|
'Super types should be in the form letterOrDigit[_-letterOrDigit]*'
|
|
@@ -45,7 +45,7 @@ const tokenTypeExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
45
45
|
},
|
|
46
46
|
description: {
|
|
47
47
|
type: 'string',
|
|
48
|
-
description: (
|
|
48
|
+
description: ( localizeWithPath(
|
|
49
49
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
50
50
|
'contributes.color.description',
|
|
51
51
|
'The description of the semantic token type'
|
|
@@ -58,7 +58,7 @@ const tokenTypeExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
58
58
|
const tokenModifierExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
59
59
|
extensionPoint: 'semanticTokenModifiers',
|
|
60
60
|
jsonSchema: {
|
|
61
|
-
description: (
|
|
61
|
+
description: ( localizeWithPath(
|
|
62
62
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
63
63
|
'contributes.semanticTokenModifiers',
|
|
64
64
|
'Contributes semantic token modifiers.'
|
|
@@ -69,13 +69,13 @@ const tokenModifierExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
69
69
|
properties: {
|
|
70
70
|
id: {
|
|
71
71
|
type: 'string',
|
|
72
|
-
description: (
|
|
72
|
+
description: ( localizeWithPath(
|
|
73
73
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
74
74
|
'contributes.semanticTokenModifiers.id',
|
|
75
75
|
'The identifier of the semantic token modifier'
|
|
76
76
|
)),
|
|
77
77
|
pattern: typeAndModifierIdPattern,
|
|
78
|
-
patternErrorMessage: (
|
|
78
|
+
patternErrorMessage: ( localizeWithPath(
|
|
79
79
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
80
80
|
'contributes.semanticTokenModifiers.id.format',
|
|
81
81
|
'Identifiers should be in the form letterOrDigit[_-letterOrDigit]*'
|
|
@@ -83,7 +83,7 @@ const tokenModifierExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
83
83
|
},
|
|
84
84
|
description: {
|
|
85
85
|
type: 'string',
|
|
86
|
-
description: (
|
|
86
|
+
description: ( localizeWithPath(
|
|
87
87
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
88
88
|
'contributes.semanticTokenModifiers.description',
|
|
89
89
|
'The description of the semantic token modifier'
|
|
@@ -96,7 +96,7 @@ const tokenModifierExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
96
96
|
const tokenStyleDefaultsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
97
97
|
extensionPoint: 'semanticTokenScopes',
|
|
98
98
|
jsonSchema: {
|
|
99
|
-
description: (
|
|
99
|
+
description: ( localizeWithPath(
|
|
100
100
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
101
101
|
'contributes.semanticTokenScopes',
|
|
102
102
|
'Contributes semantic token scope maps.'
|
|
@@ -106,7 +106,7 @@ const tokenStyleDefaultsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
106
106
|
type: 'object',
|
|
107
107
|
properties: {
|
|
108
108
|
language: {
|
|
109
|
-
description: (
|
|
109
|
+
description: ( localizeWithPath(
|
|
110
110
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
111
111
|
'contributes.semanticTokenScopes.languages',
|
|
112
112
|
'Lists the languge for which the defaults are.'
|
|
@@ -114,7 +114,7 @@ const tokenStyleDefaultsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
114
114
|
type: 'string'
|
|
115
115
|
},
|
|
116
116
|
scopes: {
|
|
117
|
-
description: (
|
|
117
|
+
description: ( localizeWithPath(
|
|
118
118
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
119
119
|
'contributes.semanticTokenScopes.scopes',
|
|
120
120
|
'Maps a semantic token (described by semantic token selector) to one or more textMate scopes used to represent that token.'
|
|
@@ -135,7 +135,7 @@ class TokenClassificationExtensionPoints {
|
|
|
135
135
|
constructor() {
|
|
136
136
|
function validateTypeOrModifier(contribution, extensionPoint, collector) {
|
|
137
137
|
if (typeof contribution.id !== 'string' || contribution.id.length === 0) {
|
|
138
|
-
collector.error((
|
|
138
|
+
collector.error(( localizeWithPath(
|
|
139
139
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
140
140
|
'invalid.id',
|
|
141
141
|
"'configuration.{0}.id' must be defined and can not be empty",
|
|
@@ -144,7 +144,7 @@ class TokenClassificationExtensionPoints {
|
|
|
144
144
|
return false;
|
|
145
145
|
}
|
|
146
146
|
if (!contribution.id.match(typeAndModifierIdPattern)) {
|
|
147
|
-
collector.error((
|
|
147
|
+
collector.error(( localizeWithPath(
|
|
148
148
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
149
149
|
'invalid.id.format',
|
|
150
150
|
"'configuration.{0}.id' must follow the pattern letterOrDigit[-_letterOrDigit]*",
|
|
@@ -154,7 +154,7 @@ class TokenClassificationExtensionPoints {
|
|
|
154
154
|
}
|
|
155
155
|
const superType = contribution.superType;
|
|
156
156
|
if (superType && !superType.match(typeAndModifierIdPattern)) {
|
|
157
|
-
collector.error((
|
|
157
|
+
collector.error(( localizeWithPath(
|
|
158
158
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
159
159
|
'invalid.superType.format',
|
|
160
160
|
"'configuration.{0}.superType' must follow the pattern letterOrDigit[-_letterOrDigit]*",
|
|
@@ -163,7 +163,7 @@ class TokenClassificationExtensionPoints {
|
|
|
163
163
|
return false;
|
|
164
164
|
}
|
|
165
165
|
if (typeof contribution.description !== 'string' || contribution.id.length === 0) {
|
|
166
|
-
collector.error((
|
|
166
|
+
collector.error(( localizeWithPath(
|
|
167
167
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
168
168
|
'invalid.description',
|
|
169
169
|
"'configuration.{0}.description' must be defined and can not be empty",
|
|
@@ -178,7 +178,7 @@ class TokenClassificationExtensionPoints {
|
|
|
178
178
|
const extensionValue = extension.value;
|
|
179
179
|
const collector = extension.collector;
|
|
180
180
|
if (!extensionValue || !Array.isArray(extensionValue)) {
|
|
181
|
-
collector.error((
|
|
181
|
+
collector.error(( localizeWithPath(
|
|
182
182
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
183
183
|
'invalid.semanticTokenTypeConfiguration',
|
|
184
184
|
"'configuration.semanticTokenType' must be an array"
|
|
@@ -203,7 +203,7 @@ class TokenClassificationExtensionPoints {
|
|
|
203
203
|
const extensionValue = extension.value;
|
|
204
204
|
const collector = extension.collector;
|
|
205
205
|
if (!extensionValue || !Array.isArray(extensionValue)) {
|
|
206
|
-
collector.error((
|
|
206
|
+
collector.error(( localizeWithPath(
|
|
207
207
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
208
208
|
'invalid.semanticTokenModifierConfiguration',
|
|
209
209
|
"'configuration.semanticTokenModifier' must be an array"
|
|
@@ -228,7 +228,7 @@ class TokenClassificationExtensionPoints {
|
|
|
228
228
|
const extensionValue = extension.value;
|
|
229
229
|
const collector = extension.collector;
|
|
230
230
|
if (!extensionValue || !Array.isArray(extensionValue)) {
|
|
231
|
-
collector.error((
|
|
231
|
+
collector.error(( localizeWithPath(
|
|
232
232
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
233
233
|
'invalid.semanticTokenScopes.configuration',
|
|
234
234
|
"'configuration.semanticTokenScopes' must be an array"
|
|
@@ -237,7 +237,7 @@ class TokenClassificationExtensionPoints {
|
|
|
237
237
|
}
|
|
238
238
|
for (const contribution of extensionValue) {
|
|
239
239
|
if (contribution.language && typeof contribution.language !== 'string') {
|
|
240
|
-
collector.error((
|
|
240
|
+
collector.error(( localizeWithPath(
|
|
241
241
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
242
242
|
'invalid.semanticTokenScopes.language',
|
|
243
243
|
"'configuration.semanticTokenScopes.language' must be a string"
|
|
@@ -245,7 +245,7 @@ class TokenClassificationExtensionPoints {
|
|
|
245
245
|
continue;
|
|
246
246
|
}
|
|
247
247
|
if (!contribution.scopes || typeof contribution.scopes !== 'object') {
|
|
248
|
-
collector.error((
|
|
248
|
+
collector.error(( localizeWithPath(
|
|
249
249
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
250
250
|
'invalid.semanticTokenScopes.scopes',
|
|
251
251
|
"'configuration.semanticTokenScopes.scopes' must be defined as an object"
|
|
@@ -255,7 +255,7 @@ class TokenClassificationExtensionPoints {
|
|
|
255
255
|
for (const selectorString in contribution.scopes) {
|
|
256
256
|
const tmScopes = contribution.scopes[selectorString];
|
|
257
257
|
if (!Array.isArray(tmScopes) || ( tmScopes.some(l => typeof l !== 'string'))) {
|
|
258
|
-
collector.error((
|
|
258
|
+
collector.error(( localizeWithPath(
|
|
259
259
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
260
260
|
'invalid.semanticTokenScopes.scopes.value',
|
|
261
261
|
"'configuration.semanticTokenScopes.scopes' values must be an array of strings"
|
|
@@ -267,7 +267,7 @@ class TokenClassificationExtensionPoints {
|
|
|
267
267
|
tokenClassificationRegistry.registerTokenStyleDefault(selector, { scopesToProbe: ( tmScopes.map(s => s.split(' '))) });
|
|
268
268
|
}
|
|
269
269
|
catch (e) {
|
|
270
|
-
collector.error((
|
|
270
|
+
collector.error(( localizeWithPath(
|
|
271
271
|
'vs/workbench/services/themes/common/tokenClassificationExtensionPoint',
|
|
272
272
|
'invalid.semanticTokenScopes.scopes.selector',
|
|
273
273
|
"configuration.semanticTokenScopes.scopes': Problems parsing selector {0}.",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TextMateTokenizationWorker } from '../vscode/src/vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker.js';
|
|
2
|
-
import { initialize } from '
|
|
2
|
+
import { initialize } from 'vscode/vscode/vs/editor/editor.worker';
|
|
3
3
|
|
|
4
4
|
initialize((ctx, createData) => new TextMateTokenizationWorker(ctx, createData));
|