@volar/language-core 2.2.0-alpha.8 → 2.2.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/index.d.ts +0 -1
- package/index.js +29 -27
- package/lib/editorFeatures.js +9 -9
- package/lib/types.d.ts +10 -10
- package/package.json +3 -3
- package/lib/fileRegistry.d.ts +0 -17
- package/lib/fileRegistry.js +0 -137
package/index.d.ts
CHANGED
|
@@ -9,4 +9,3 @@ import type { CodeInformation, Language, LanguagePlugin, VirtualCode } from './l
|
|
|
9
9
|
export declare function createLanguage(plugins: LanguagePlugin[], caseSensitive: boolean, sync: (id: string) => void): Language;
|
|
10
10
|
export declare function updateVirtualCodeMapOfMap(virtualCode: VirtualCode, mapOfMap: Map<string, [ts.IScriptSnapshot, SourceMap<CodeInformation>]>, getSourceSnapshot: (id: string | undefined) => [string, ts.IScriptSnapshot] | undefined): void;
|
|
11
11
|
export declare function forEachEmbeddedCode(virtualCode: VirtualCode): Generator<VirtualCode>;
|
|
12
|
-
export declare function resolveCommonLanguageId(fileNameOrUri: string): string;
|
package/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.forEachEmbeddedCode = exports.updateVirtualCodeMapOfMap = exports.createLanguage = void 0;
|
|
18
18
|
__exportStar(require("@volar/source-map"), exports);
|
|
19
19
|
__exportStar(require("./lib/editorFeatures"), exports);
|
|
20
20
|
__exportStar(require("./lib/linkedCodeMap"), exports);
|
|
@@ -35,26 +35,45 @@ function createLanguage(plugins, caseSensitive, sync) {
|
|
|
35
35
|
sync(id);
|
|
36
36
|
return sourceScripts.get(id);
|
|
37
37
|
},
|
|
38
|
-
set(id,
|
|
38
|
+
set(id, snapshot, languageId, _plugins = plugins) {
|
|
39
|
+
if (!languageId) {
|
|
40
|
+
for (const plugin of plugins) {
|
|
41
|
+
languageId = plugin.getLanguageId?.(id);
|
|
42
|
+
if (languageId) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (!languageId) {
|
|
48
|
+
console.warn(`languageId not found for ${id}`);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
39
51
|
if (sourceScripts.has(id)) {
|
|
40
52
|
const sourceScript = sourceScripts.get(id);
|
|
41
53
|
if (sourceScript.languageId !== languageId) {
|
|
42
54
|
// languageId changed
|
|
43
55
|
this.delete(id);
|
|
44
|
-
return this.set(id,
|
|
56
|
+
return this.set(id, snapshot, languageId);
|
|
45
57
|
}
|
|
46
58
|
else if (sourceScript.snapshot !== snapshot) {
|
|
47
59
|
// snapshot updated
|
|
48
60
|
sourceScript.snapshot = snapshot;
|
|
49
61
|
if (sourceScript.generated) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
sourceScript.generated.
|
|
62
|
+
const newVirtualCode = sourceScript.generated.languagePlugin.updateVirtualCode?.(id, sourceScript.generated.root, snapshot);
|
|
63
|
+
if (newVirtualCode) {
|
|
64
|
+
sourceScript.generated.root = newVirtualCode;
|
|
65
|
+
sourceScript.generated.embeddedCodes.clear();
|
|
66
|
+
for (const code of forEachEmbeddedCode(sourceScript.generated.root)) {
|
|
67
|
+
virtualCodeToSourceFileMap.set(code, sourceScript);
|
|
68
|
+
sourceScript.generated.embeddedCodes.set(code.id, code);
|
|
69
|
+
}
|
|
70
|
+
return sourceScript;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
this.delete(id);
|
|
74
|
+
return;
|
|
55
75
|
}
|
|
56
76
|
}
|
|
57
|
-
return sourceScript;
|
|
58
77
|
}
|
|
59
78
|
else {
|
|
60
79
|
// not changed
|
|
@@ -66,7 +85,7 @@ function createLanguage(plugins, caseSensitive, sync) {
|
|
|
66
85
|
const sourceScript = { id, languageId, snapshot };
|
|
67
86
|
sourceScripts.set(id, sourceScript);
|
|
68
87
|
for (const languagePlugin of _plugins) {
|
|
69
|
-
const virtualCode = languagePlugin.createVirtualCode(id, languageId, snapshot);
|
|
88
|
+
const virtualCode = languagePlugin.createVirtualCode?.(id, languageId, snapshot);
|
|
70
89
|
if (virtualCode) {
|
|
71
90
|
sourceScript.generated = {
|
|
72
91
|
root: virtualCode,
|
|
@@ -172,21 +191,4 @@ function* forEachEmbeddedCode(virtualCode) {
|
|
|
172
191
|
}
|
|
173
192
|
}
|
|
174
193
|
exports.forEachEmbeddedCode = forEachEmbeddedCode;
|
|
175
|
-
function resolveCommonLanguageId(fileNameOrUri) {
|
|
176
|
-
const ext = fileNameOrUri.split('.').pop();
|
|
177
|
-
switch (ext) {
|
|
178
|
-
case 'js': return 'javascript';
|
|
179
|
-
case 'cjs': return 'javascript';
|
|
180
|
-
case 'mjs': return 'javascript';
|
|
181
|
-
case 'ts': return 'typescript';
|
|
182
|
-
case 'cts': return 'typescript';
|
|
183
|
-
case 'mts': return 'typescript';
|
|
184
|
-
case 'jsx': return 'javascriptreact';
|
|
185
|
-
case 'tsx': return 'typescriptreact';
|
|
186
|
-
case 'pug': return 'jade';
|
|
187
|
-
case 'md': return 'markdown';
|
|
188
|
-
}
|
|
189
|
-
return ext;
|
|
190
|
-
}
|
|
191
|
-
exports.resolveCommonLanguageId = resolveCommonLanguageId;
|
|
192
194
|
//# sourceMappingURL=index.js.map
|
package/lib/editorFeatures.js
CHANGED
|
@@ -16,7 +16,7 @@ exports.isCodeLensEnabled = isCodeLensEnabled;
|
|
|
16
16
|
function isSemanticTokensEnabled(info) {
|
|
17
17
|
return typeof info.semantic === 'object'
|
|
18
18
|
? info.semantic.shouldHighlight?.() ?? true
|
|
19
|
-
: info.semantic;
|
|
19
|
+
: !!info.semantic;
|
|
20
20
|
}
|
|
21
21
|
exports.isSemanticTokensEnabled = isSemanticTokensEnabled;
|
|
22
22
|
function isCallHierarchyEnabled(info) {
|
|
@@ -48,27 +48,27 @@ function isHighlightEnabled(info) {
|
|
|
48
48
|
}
|
|
49
49
|
exports.isHighlightEnabled = isHighlightEnabled;
|
|
50
50
|
function isSymbolsEnabled(info) {
|
|
51
|
-
return info.structure;
|
|
51
|
+
return !!info.structure;
|
|
52
52
|
}
|
|
53
53
|
exports.isSymbolsEnabled = isSymbolsEnabled;
|
|
54
54
|
function isFoldingRangesEnabled(info) {
|
|
55
|
-
return info.structure;
|
|
55
|
+
return !!info.structure;
|
|
56
56
|
}
|
|
57
57
|
exports.isFoldingRangesEnabled = isFoldingRangesEnabled;
|
|
58
58
|
function isSelectionRangesEnabled(info) {
|
|
59
|
-
return info.structure;
|
|
59
|
+
return !!info.structure;
|
|
60
60
|
}
|
|
61
61
|
exports.isSelectionRangesEnabled = isSelectionRangesEnabled;
|
|
62
62
|
function isLinkedEditingEnabled(info) {
|
|
63
|
-
return info.structure;
|
|
63
|
+
return !!info.structure;
|
|
64
64
|
}
|
|
65
65
|
exports.isLinkedEditingEnabled = isLinkedEditingEnabled;
|
|
66
66
|
function isColorEnabled(info) {
|
|
67
|
-
return info.structure;
|
|
67
|
+
return !!info.structure;
|
|
68
68
|
}
|
|
69
69
|
exports.isColorEnabled = isColorEnabled;
|
|
70
70
|
function isDocumentLinkEnabled(info) {
|
|
71
|
-
return info.structure;
|
|
71
|
+
return !!info.structure;
|
|
72
72
|
}
|
|
73
73
|
exports.isDocumentLinkEnabled = isDocumentLinkEnabled;
|
|
74
74
|
function isDiagnosticsEnabled(info) {
|
|
@@ -80,7 +80,7 @@ function isCodeActionsEnabled(info) {
|
|
|
80
80
|
}
|
|
81
81
|
exports.isCodeActionsEnabled = isCodeActionsEnabled;
|
|
82
82
|
function isFormattingEnabled(info) {
|
|
83
|
-
return info.format;
|
|
83
|
+
return !!info.format;
|
|
84
84
|
}
|
|
85
85
|
exports.isFormattingEnabled = isFormattingEnabled;
|
|
86
86
|
function isCompletionEnabled(info) {
|
|
@@ -99,7 +99,7 @@ exports.isSignatureHelpEnabled = isSignatureHelpEnabled;
|
|
|
99
99
|
function shouldReportDiagnostics(info) {
|
|
100
100
|
return typeof info.verification === 'object'
|
|
101
101
|
? info.verification.shouldReport?.() ?? true
|
|
102
|
-
: info.verification;
|
|
102
|
+
: !!info.verification;
|
|
103
103
|
}
|
|
104
104
|
exports.shouldReportDiagnostics = shouldReportDiagnostics;
|
|
105
105
|
// resolve...
|
package/lib/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export interface Language {
|
|
|
5
5
|
plugins: LanguagePlugin[];
|
|
6
6
|
scripts: {
|
|
7
7
|
get(id: string): SourceScript | undefined;
|
|
8
|
-
set(id: string,
|
|
8
|
+
set(id: string, snapshot: ts.IScriptSnapshot, languageId?: string, plugins?: LanguagePlugin[]): SourceScript | undefined;
|
|
9
9
|
delete(id: string): void;
|
|
10
10
|
};
|
|
11
11
|
maps: {
|
|
@@ -46,28 +46,28 @@ export interface VirtualCode {
|
|
|
46
46
|
}
|
|
47
47
|
export interface CodeInformation {
|
|
48
48
|
/** virtual code is expected to support verification */
|
|
49
|
-
verification
|
|
49
|
+
verification?: boolean | {
|
|
50
50
|
shouldReport?(): boolean;
|
|
51
51
|
};
|
|
52
52
|
/** virtual code is expected to support assisted completion */
|
|
53
|
-
completion
|
|
53
|
+
completion?: boolean | {
|
|
54
54
|
isAdditional?: boolean;
|
|
55
55
|
onlyImport?: boolean;
|
|
56
56
|
};
|
|
57
57
|
/** virtual code is expected correctly reflect semantic of the source code */
|
|
58
|
-
semantic
|
|
58
|
+
semantic?: boolean | {
|
|
59
59
|
shouldHighlight?(): boolean;
|
|
60
60
|
};
|
|
61
61
|
/** virtual code is expected correctly reflect reference relationships of the source code */
|
|
62
|
-
navigation
|
|
62
|
+
navigation?: boolean | {
|
|
63
63
|
shouldRename?(): boolean;
|
|
64
64
|
resolveRenameNewName?(newName: string): string;
|
|
65
65
|
resolveRenameEditText?(newText: string): string;
|
|
66
66
|
};
|
|
67
67
|
/** virtual code is expected correctly reflect the structural information of the source code */
|
|
68
|
-
structure
|
|
68
|
+
structure?: boolean;
|
|
69
69
|
/** virtual code is expected correctly reflect the format information of the source code */
|
|
70
|
-
format
|
|
70
|
+
format?: boolean;
|
|
71
71
|
}
|
|
72
72
|
export interface ServiceScript {
|
|
73
73
|
code: VirtualCode;
|
|
@@ -78,8 +78,9 @@ export interface ExtraServiceScript extends ServiceScript {
|
|
|
78
78
|
fileName: string;
|
|
79
79
|
}
|
|
80
80
|
export interface LanguagePlugin<T extends VirtualCode = VirtualCode> {
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
getLanguageId(scriptId: string): string | undefined;
|
|
82
|
+
createVirtualCode?(scriptId: string, languageId: string, snapshot: ts.IScriptSnapshot): T | undefined;
|
|
83
|
+
updateVirtualCode?(scriptId: string, virtualCode: T, newSnapshot: ts.IScriptSnapshot): T | undefined;
|
|
83
84
|
disposeVirtualCode?(scriptId: string, virtualCode: T): void;
|
|
84
85
|
typescript?: {
|
|
85
86
|
/**
|
|
@@ -102,7 +103,6 @@ export interface LanguagePlugin<T extends VirtualCode = VirtualCode> {
|
|
|
102
103
|
}
|
|
103
104
|
export interface TypeScriptProjectHost extends ts.System, Pick<ts.LanguageServiceHost, 'getLocalizedDiagnosticMessages' | 'getCompilationSettings' | 'getProjectReferences' | 'getCurrentDirectory' | 'getScriptFileNames' | 'getProjectVersion' | 'getScriptSnapshot'> {
|
|
104
105
|
configFileName: string | undefined;
|
|
105
|
-
getLanguageId(scriptId: string): string;
|
|
106
106
|
getSystemVersion?(): number;
|
|
107
107
|
syncSystem?(): Promise<number>;
|
|
108
108
|
scriptIdToFileName(scriptId: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-core",
|
|
3
|
-
"version": "2.2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"directory": "packages/language-core"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@volar/source-map": "2.2.0
|
|
15
|
+
"@volar/source-map": "2.2.0"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "c6e8d2765bbd2ec4a37374fd3a3a31c02661e8b3"
|
|
18
18
|
}
|
package/lib/fileRegistry.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SourceMap } from '@volar/source-map';
|
|
2
|
-
import type * as ts from 'typescript';
|
|
3
|
-
import { LinkedCodeMap } from './linkedCodeMap';
|
|
4
|
-
import type { CodeInformation, LanguagePlugin, SourceFile, VirtualCode } from './types';
|
|
5
|
-
export type FileRegistry = ReturnType<typeof createFileRegistry>;
|
|
6
|
-
export declare function createFileRegistry(languagePlugins: LanguagePlugin[], caseSensitive: boolean, sync: (id: string) => void): {
|
|
7
|
-
languagePlugins: LanguagePlugin<VirtualCode>[];
|
|
8
|
-
set(id: string, languageId: string, snapshot: ts.IScriptSnapshot, plugins?: LanguagePlugin<VirtualCode>[]): SourceFile;
|
|
9
|
-
delete(id: string): void;
|
|
10
|
-
get(id: string): SourceFile | undefined;
|
|
11
|
-
getByVirtualCode(virtualCode: VirtualCode): SourceFile;
|
|
12
|
-
getLinkedCodeMap(virtualCode: VirtualCode): LinkedCodeMap | undefined;
|
|
13
|
-
getMaps(virtualCode: VirtualCode): Map<string, [ts.IScriptSnapshot, SourceMap<CodeInformation>]>;
|
|
14
|
-
getVirtualCode(sourceFileId: string, virtualCodeId: string): readonly [VirtualCode, SourceFile] | readonly [undefined, undefined];
|
|
15
|
-
};
|
|
16
|
-
export declare function updateVirtualCodeMaps(virtualCode: VirtualCode, getSourceSnapshot: (sourceUri: string | undefined) => [string, ts.IScriptSnapshot] | undefined, map?: Map<string, [ts.IScriptSnapshot, SourceMap<CodeInformation>]>): Map<string, [ts.IScriptSnapshot, SourceMap<CodeInformation>]>;
|
|
17
|
-
export declare function forEachEmbeddedCode(code: VirtualCode): Generator<VirtualCode>;
|
package/lib/fileRegistry.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.forEachEmbeddedCode = exports.updateVirtualCodeMaps = exports.createFileRegistry = void 0;
|
|
4
|
-
const source_map_1 = require("@volar/source-map");
|
|
5
|
-
const linkedCodeMap_1 = require("./linkedCodeMap");
|
|
6
|
-
const utils_1 = require("./utils");
|
|
7
|
-
function createFileRegistry(languagePlugins, caseSensitive, sync) {
|
|
8
|
-
const sourceFiles = new utils_1.FileMap(caseSensitive);
|
|
9
|
-
const virtualCodeToSourceFileMap = new WeakMap();
|
|
10
|
-
const virtualCodeToMaps = new WeakMap();
|
|
11
|
-
const virtualCodeToLinkedCodeMap = new WeakMap();
|
|
12
|
-
return {
|
|
13
|
-
languagePlugins,
|
|
14
|
-
set(id, languageId, snapshot, plugins = languagePlugins) {
|
|
15
|
-
const value = sourceFiles.get(id);
|
|
16
|
-
if (value) {
|
|
17
|
-
if (value.languageId !== languageId) {
|
|
18
|
-
// languageId changed
|
|
19
|
-
this.delete(id);
|
|
20
|
-
return this.set(id, languageId, snapshot);
|
|
21
|
-
}
|
|
22
|
-
else if (value.snapshot !== snapshot) {
|
|
23
|
-
// snapshot updated
|
|
24
|
-
value.snapshot = snapshot;
|
|
25
|
-
if (value.generated) {
|
|
26
|
-
value.generated.code = value.generated.languagePlugin.updateVirtualCode(id, value.generated.code, snapshot, this);
|
|
27
|
-
for (const code of forEachEmbeddedCode(value.generated.code)) {
|
|
28
|
-
virtualCodeToSourceFileMap.set(code, value);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return value;
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
// not changed
|
|
35
|
-
return value;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
// created
|
|
39
|
-
const sourceFile = { id, languageId, snapshot };
|
|
40
|
-
sourceFiles.set(id, sourceFile);
|
|
41
|
-
for (const languagePlugin of plugins) {
|
|
42
|
-
const virtualCode = languagePlugin.createVirtualCode(id, languageId, snapshot, this);
|
|
43
|
-
if (virtualCode) {
|
|
44
|
-
sourceFile.generated = {
|
|
45
|
-
code: virtualCode,
|
|
46
|
-
languagePlugin,
|
|
47
|
-
};
|
|
48
|
-
for (const code of forEachEmbeddedCode(virtualCode)) {
|
|
49
|
-
virtualCodeToSourceFileMap.set(code, sourceFile);
|
|
50
|
-
}
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return sourceFile;
|
|
55
|
-
},
|
|
56
|
-
delete(id) {
|
|
57
|
-
const value = sourceFiles.get(id);
|
|
58
|
-
if (value) {
|
|
59
|
-
if (value.generated) {
|
|
60
|
-
value.generated.languagePlugin.disposeVirtualCode?.(id, value.generated.code, this);
|
|
61
|
-
}
|
|
62
|
-
sourceFiles.delete(id);
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
get(id) {
|
|
66
|
-
sync(id);
|
|
67
|
-
return sourceFiles.get(id);
|
|
68
|
-
},
|
|
69
|
-
getByVirtualCode(virtualCode) {
|
|
70
|
-
return virtualCodeToSourceFileMap.get(virtualCode);
|
|
71
|
-
},
|
|
72
|
-
getLinkedCodeMap(virtualCode) {
|
|
73
|
-
if (!virtualCodeToLinkedCodeMap.has(virtualCode.snapshot)) {
|
|
74
|
-
virtualCodeToLinkedCodeMap.set(virtualCode.snapshot, virtualCode.linkedCodeMappings
|
|
75
|
-
? new linkedCodeMap_1.LinkedCodeMap(virtualCode.linkedCodeMappings)
|
|
76
|
-
: undefined);
|
|
77
|
-
}
|
|
78
|
-
return virtualCodeToLinkedCodeMap.get(virtualCode.snapshot);
|
|
79
|
-
},
|
|
80
|
-
getMaps(virtualCode) {
|
|
81
|
-
if (!virtualCodeToMaps.has(virtualCode.snapshot)) {
|
|
82
|
-
virtualCodeToMaps.set(virtualCode.snapshot, new Map());
|
|
83
|
-
}
|
|
84
|
-
updateVirtualCodeMaps(virtualCode, sourceFileId => {
|
|
85
|
-
if (sourceFileId) {
|
|
86
|
-
const sourceFile = sourceFiles.get(sourceFileId);
|
|
87
|
-
return [sourceFileId, sourceFile.snapshot];
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
const sourceFile = virtualCodeToSourceFileMap.get(virtualCode);
|
|
91
|
-
return [sourceFile.id, sourceFile.snapshot];
|
|
92
|
-
}
|
|
93
|
-
}, virtualCodeToMaps.get(virtualCode.snapshot));
|
|
94
|
-
return virtualCodeToMaps.get(virtualCode.snapshot);
|
|
95
|
-
},
|
|
96
|
-
getVirtualCode(sourceFileId, virtualCodeId) {
|
|
97
|
-
const sourceFile = this.get(sourceFileId);
|
|
98
|
-
if (sourceFile?.generated) {
|
|
99
|
-
for (const code of forEachEmbeddedCode(sourceFile.generated.code)) {
|
|
100
|
-
if (code.id === virtualCodeId) {
|
|
101
|
-
return [code, sourceFile];
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return [undefined, undefined];
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
exports.createFileRegistry = createFileRegistry;
|
|
110
|
-
function updateVirtualCodeMaps(virtualCode, getSourceSnapshot, map = new Map()) {
|
|
111
|
-
const sources = new Set();
|
|
112
|
-
for (const mapping of virtualCode.mappings) {
|
|
113
|
-
if (sources.has(mapping.source)) {
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
sources.add(mapping.source);
|
|
117
|
-
const source = getSourceSnapshot(mapping.source);
|
|
118
|
-
if (!source) {
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
if (!map.has(source[0]) || map.get(source[0])[0] !== source[1]) {
|
|
122
|
-
map.set(source[0], [source[1], new source_map_1.SourceMap(virtualCode.mappings.filter(mapping2 => mapping2.source === mapping.source))]);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return map;
|
|
126
|
-
}
|
|
127
|
-
exports.updateVirtualCodeMaps = updateVirtualCodeMaps;
|
|
128
|
-
function* forEachEmbeddedCode(code) {
|
|
129
|
-
yield code;
|
|
130
|
-
if (code.embeddedCodes) {
|
|
131
|
-
for (const embeddedCode of code.embeddedCodes) {
|
|
132
|
-
yield* forEachEmbeddedCode(embeddedCode);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
exports.forEachEmbeddedCode = forEachEmbeddedCode;
|
|
137
|
-
//# sourceMappingURL=fileRegistry.js.map
|