@vue/compiler-core 3.4.0-beta.4 → 3.4.0-rc.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.
|
@@ -2153,12 +2153,6 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
2153
2153
|
loc: getLoc(start - 1, end),
|
|
2154
2154
|
codegenNode: void 0
|
|
2155
2155
|
};
|
|
2156
|
-
if (tokenizer.inSFCRoot) {
|
|
2157
|
-
currentOpenTag.innerLoc = getLoc(
|
|
2158
|
-
end + fastForward(end) + 1,
|
|
2159
|
-
end
|
|
2160
|
-
);
|
|
2161
|
-
}
|
|
2162
2156
|
},
|
|
2163
2157
|
onopentagend(end) {
|
|
2164
2158
|
endOpenTag(end);
|
|
@@ -2486,6 +2480,9 @@ function getSlice(start, end) {
|
|
|
2486
2480
|
return currentInput.slice(start, end);
|
|
2487
2481
|
}
|
|
2488
2482
|
function endOpenTag(end) {
|
|
2483
|
+
if (tokenizer.inSFCRoot) {
|
|
2484
|
+
currentOpenTag.innerLoc = getLoc(end + 1, end + 1);
|
|
2485
|
+
}
|
|
2489
2486
|
addNode(currentOpenTag);
|
|
2490
2487
|
const { tag, ns } = currentOpenTag;
|
|
2491
2488
|
if (ns === 0 && currentOptions.isPreTag(tag)) {
|
|
@@ -2519,7 +2516,7 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
2519
2516
|
if (isImplied) {
|
|
2520
2517
|
setLocEnd(el.loc, backTrack(end, 60));
|
|
2521
2518
|
} else {
|
|
2522
|
-
setLocEnd(el.loc, end +
|
|
2519
|
+
setLocEnd(el.loc, end + 1);
|
|
2523
2520
|
}
|
|
2524
2521
|
if (tokenizer.inSFCRoot) {
|
|
2525
2522
|
if (el.children.length) {
|
|
@@ -2614,13 +2611,6 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
2614
2611
|
}
|
|
2615
2612
|
}
|
|
2616
2613
|
}
|
|
2617
|
-
function fastForward(start, c) {
|
|
2618
|
-
let offset = 0;
|
|
2619
|
-
while (currentInput.charCodeAt(start + offset) !== 62 && start + offset < currentInput.length) {
|
|
2620
|
-
offset++;
|
|
2621
|
-
}
|
|
2622
|
-
return offset;
|
|
2623
|
-
}
|
|
2624
2614
|
function backTrack(index, c) {
|
|
2625
2615
|
let i = index;
|
|
2626
2616
|
while (currentInput.charCodeAt(i) !== c && i >= 0)
|
|
@@ -2149,12 +2149,6 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
2149
2149
|
loc: getLoc(start - 1, end),
|
|
2150
2150
|
codegenNode: void 0
|
|
2151
2151
|
};
|
|
2152
|
-
if (tokenizer.inSFCRoot) {
|
|
2153
|
-
currentOpenTag.innerLoc = getLoc(
|
|
2154
|
-
end + fastForward(end) + 1,
|
|
2155
|
-
end
|
|
2156
|
-
);
|
|
2157
|
-
}
|
|
2158
2152
|
},
|
|
2159
2153
|
onopentagend(end) {
|
|
2160
2154
|
endOpenTag(end);
|
|
@@ -2482,6 +2476,9 @@ function getSlice(start, end) {
|
|
|
2482
2476
|
return currentInput.slice(start, end);
|
|
2483
2477
|
}
|
|
2484
2478
|
function endOpenTag(end) {
|
|
2479
|
+
if (tokenizer.inSFCRoot) {
|
|
2480
|
+
currentOpenTag.innerLoc = getLoc(end + 1, end + 1);
|
|
2481
|
+
}
|
|
2485
2482
|
addNode(currentOpenTag);
|
|
2486
2483
|
const { tag, ns } = currentOpenTag;
|
|
2487
2484
|
if (ns === 0 && currentOptions.isPreTag(tag)) {
|
|
@@ -2515,7 +2512,7 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
2515
2512
|
if (isImplied) {
|
|
2516
2513
|
setLocEnd(el.loc, backTrack(end, 60));
|
|
2517
2514
|
} else {
|
|
2518
|
-
setLocEnd(el.loc, end +
|
|
2515
|
+
setLocEnd(el.loc, end + 1);
|
|
2519
2516
|
}
|
|
2520
2517
|
if (tokenizer.inSFCRoot) {
|
|
2521
2518
|
if (el.children.length) {
|
|
@@ -2580,13 +2577,6 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
2580
2577
|
}
|
|
2581
2578
|
}
|
|
2582
2579
|
}
|
|
2583
|
-
function fastForward(start, c) {
|
|
2584
|
-
let offset = 0;
|
|
2585
|
-
while (currentInput.charCodeAt(start + offset) !== 62 && start + offset < currentInput.length) {
|
|
2586
|
-
offset++;
|
|
2587
|
-
}
|
|
2588
|
-
return offset;
|
|
2589
|
-
}
|
|
2590
2580
|
function backTrack(index, c) {
|
|
2591
2581
|
let i = index;
|
|
2592
2582
|
while (currentInput.charCodeAt(i) !== c && i >= 0)
|
|
@@ -1914,12 +1914,6 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
1914
1914
|
loc: getLoc(start - 1, end),
|
|
1915
1915
|
codegenNode: void 0
|
|
1916
1916
|
};
|
|
1917
|
-
if (tokenizer.inSFCRoot) {
|
|
1918
|
-
currentOpenTag.innerLoc = getLoc(
|
|
1919
|
-
end + fastForward(end) + 1,
|
|
1920
|
-
end
|
|
1921
|
-
);
|
|
1922
|
-
}
|
|
1923
1917
|
},
|
|
1924
1918
|
onopentagend(end) {
|
|
1925
1919
|
endOpenTag(end);
|
|
@@ -2244,6 +2238,9 @@ function getSlice(start, end) {
|
|
|
2244
2238
|
return currentInput.slice(start, end);
|
|
2245
2239
|
}
|
|
2246
2240
|
function endOpenTag(end) {
|
|
2241
|
+
if (tokenizer.inSFCRoot) {
|
|
2242
|
+
currentOpenTag.innerLoc = getLoc(end + 1, end + 1);
|
|
2243
|
+
}
|
|
2247
2244
|
addNode(currentOpenTag);
|
|
2248
2245
|
const { tag, ns } = currentOpenTag;
|
|
2249
2246
|
if (ns === 0 && currentOptions.isPreTag(tag)) {
|
|
@@ -2284,7 +2281,7 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
2284
2281
|
if (isImplied) {
|
|
2285
2282
|
setLocEnd(el.loc, backTrack(end, 60));
|
|
2286
2283
|
} else {
|
|
2287
|
-
setLocEnd(el.loc, end +
|
|
2284
|
+
setLocEnd(el.loc, end + 1);
|
|
2288
2285
|
}
|
|
2289
2286
|
if (tokenizer.inSFCRoot) {
|
|
2290
2287
|
if (el.children.length) {
|
|
@@ -2379,13 +2376,6 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
2379
2376
|
}
|
|
2380
2377
|
}
|
|
2381
2378
|
}
|
|
2382
|
-
function fastForward(start, c) {
|
|
2383
|
-
let offset = 0;
|
|
2384
|
-
while (currentInput.charCodeAt(start + offset) !== 62 && start + offset < currentInput.length) {
|
|
2385
|
-
offset++;
|
|
2386
|
-
}
|
|
2387
|
-
return offset;
|
|
2388
|
-
}
|
|
2389
2379
|
function backTrack(index, c) {
|
|
2390
2380
|
let i = index;
|
|
2391
2381
|
while (currentInput.charCodeAt(i) !== c && i >= 0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-core",
|
|
3
|
-
"version": "3.4.0-
|
|
3
|
+
"version": "3.4.0-rc.1",
|
|
4
4
|
"description": "@vue/compiler-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/compiler-core.esm-bundler.js",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@babel/parser": "^7.23.
|
|
35
|
+
"@babel/parser": "^7.23.6",
|
|
36
36
|
"entities": "^4.5.0",
|
|
37
37
|
"estree-walker": "^2.0.2",
|
|
38
38
|
"source-map-js": "^1.0.2",
|
|
39
|
-
"@vue/shared": "3.4.0-
|
|
39
|
+
"@vue/shared": "3.4.0-rc.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@babel/types": "^7.23.
|
|
42
|
+
"@babel/types": "^7.23.6"
|
|
43
43
|
}
|
|
44
44
|
}
|