@volar/language-core 2.3.2 → 2.3.3
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.js +0 -9
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -86,7 +86,6 @@ function createLanguage(plugins, scriptRegistry, sync) {
|
|
|
86
86
|
? updateVirtualCode(id, sourceScript.generated.root, snapshot, codegenCtx)
|
|
87
87
|
: createVirtualCode?.(id, languageId, snapshot, codegenCtx);
|
|
88
88
|
if (newVirtualCode) {
|
|
89
|
-
verifyVirtualCode(newVirtualCode);
|
|
90
89
|
sourceScript.generated.root = newVirtualCode;
|
|
91
90
|
sourceScript.generated.embeddedCodes.clear();
|
|
92
91
|
for (const code of forEachEmbeddedCode(sourceScript.generated.root)) {
|
|
@@ -124,7 +123,6 @@ function createLanguage(plugins, scriptRegistry, sync) {
|
|
|
124
123
|
for (const languagePlugin of _plugins) {
|
|
125
124
|
const virtualCode = languagePlugin.createVirtualCode?.(id, languageId, snapshot, prepareCreateVirtualCode(sourceScript));
|
|
126
125
|
if (virtualCode) {
|
|
127
|
-
verifyVirtualCode(virtualCode);
|
|
128
126
|
sourceScript.generated = {
|
|
129
127
|
root: virtualCode,
|
|
130
128
|
languagePlugin,
|
|
@@ -224,13 +222,6 @@ function createLanguage(plugins, scriptRegistry, sync) {
|
|
|
224
222
|
};
|
|
225
223
|
}
|
|
226
224
|
}
|
|
227
|
-
function verifyVirtualCode(virtualCode) {
|
|
228
|
-
for (const code of forEachEmbeddedCode(virtualCode)) {
|
|
229
|
-
if (code.id !== code.id.toLowerCase()) {
|
|
230
|
-
throw new Error(`VirtualCode id must be lowercase: ${code.id}`);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
225
|
function* forEachEmbeddedCode(virtualCode) {
|
|
235
226
|
yield virtualCode;
|
|
236
227
|
if (virtualCode.embeddedCodes) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-core",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
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.3.
|
|
15
|
+
"@volar/source-map": "2.3.3"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "08802f144de6ff05a86b99df1f55a5ba243cc926"
|
|
18
18
|
}
|