Skip to content

Commit 81e4201

Browse files
committed
fix test cases
1 parent 13dbec9 commit 81e4201

10 files changed

+273
-108
lines changed

tests/fixtures/parser/ast/svelte5/docs/snippets/10-typing-snippets-output.json

+56-20
Original file line numberDiff line numberDiff line change
@@ -1045,13 +1045,31 @@
10451045
"children": [
10461046
{
10471047
"type": "SvelteRenderTag",
1048-
"arguments": [],
1049-
"callee": {
1050-
"type": "Identifier",
1051-
"name": "children",
1048+
"expression": {
1049+
"type": "CallExpression",
1050+
"arguments": [],
1051+
"callee": {
1052+
"type": "Identifier",
1053+
"name": "children",
1054+
"range": [
1055+
227,
1056+
235
1057+
],
1058+
"loc": {
1059+
"start": {
1060+
"line": 14,
1061+
"column": 16
1062+
},
1063+
"end": {
1064+
"line": 14,
1065+
"column": 24
1066+
}
1067+
}
1068+
},
1069+
"optional": false,
10521070
"range": [
10531071
227,
1054-
235
1072+
237
10551073
],
10561074
"loc": {
10571075
"start": {
@@ -1060,7 +1078,7 @@
10601078
},
10611079
"end": {
10621080
"line": 14,
1063-
"column": 24
1081+
"column": 26
10641082
}
10651083
}
10661084
},
@@ -1341,32 +1359,50 @@
13411359
"children": [
13421360
{
13431361
"type": "SvelteRenderTag",
1344-
"arguments": [
1345-
{
1362+
"expression": {
1363+
"type": "CallExpression",
1364+
"arguments": [
1365+
{
1366+
"type": "Identifier",
1367+
"name": "d",
1368+
"range": [
1369+
311,
1370+
312
1371+
],
1372+
"loc": {
1373+
"start": {
1374+
"line": 19,
1375+
"column": 20
1376+
},
1377+
"end": {
1378+
"line": 19,
1379+
"column": 21
1380+
}
1381+
}
1382+
}
1383+
],
1384+
"callee": {
13461385
"type": "Identifier",
1347-
"name": "d",
1386+
"name": "row",
13481387
"range": [
1349-
311,
1350-
312
1388+
307,
1389+
310
13511390
],
13521391
"loc": {
13531392
"start": {
13541393
"line": 19,
1355-
"column": 20
1394+
"column": 16
13561395
},
13571396
"end": {
13581397
"line": 19,
1359-
"column": 21
1398+
"column": 19
13601399
}
13611400
}
1362-
}
1363-
],
1364-
"callee": {
1365-
"type": "Identifier",
1366-
"name": "row",
1401+
},
1402+
"optional": false,
13671403
"range": [
13681404
307,
1369-
310
1405+
313
13701406
],
13711407
"loc": {
13721408
"start": {
@@ -1375,7 +1411,7 @@
13751411
},
13761412
"end": {
13771413
"line": 19,
1378-
"column": 19
1414+
"column": 22
13791415
}
13801416
}
13811417
},

tests/fixtures/parser/ast/svelte5/docs/snippets/10-typing-snippets-scope-output.json

+32-14
Original file line numberDiff line numberDiff line change
@@ -3011,32 +3011,50 @@
30113011
"children": [
30123012
{
30133013
"type": "SvelteRenderTag",
3014-
"arguments": [
3015-
{
3014+
"expression": {
3015+
"type": "CallExpression",
3016+
"arguments": [
3017+
{
3018+
"type": "Identifier",
3019+
"name": "d",
3020+
"range": [
3021+
311,
3022+
312
3023+
],
3024+
"loc": {
3025+
"start": {
3026+
"line": 19,
3027+
"column": 20
3028+
},
3029+
"end": {
3030+
"line": 19,
3031+
"column": 21
3032+
}
3033+
}
3034+
}
3035+
],
3036+
"callee": {
30163037
"type": "Identifier",
3017-
"name": "d",
3038+
"name": "row",
30183039
"range": [
3019-
311,
3020-
312
3040+
307,
3041+
310
30213042
],
30223043
"loc": {
30233044
"start": {
30243045
"line": 19,
3025-
"column": 20
3046+
"column": 16
30263047
},
30273048
"end": {
30283049
"line": 19,
3029-
"column": 21
3050+
"column": 19
30303051
}
30313052
}
3032-
}
3033-
],
3034-
"callee": {
3035-
"type": "Identifier",
3036-
"name": "row",
3053+
},
3054+
"optional": false,
30373055
"range": [
30383056
307,
3039-
310
3057+
313
30403058
],
30413059
"loc": {
30423060
"start": {
@@ -3045,7 +3063,7 @@
30453063
},
30463064
"end": {
30473065
"line": 19,
3048-
"column": 19
3066+
"column": 22
30493067
}
30503068
}
30513069
},

tests/fixtures/parser/ast/svelte5/docs/snippets/10-typing-snippets-type-output.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
<table>
1212
{#if children} <!-- children: (this: void) => unique symbol & { _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\""; } -->
1313
<thead>
14-
<tr>{@render children()}</tr> <!-- children: (this: void) => unique symbol & { _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\""; } -->
14+
<tr>{@render children()}</tr> <!-- children(): unique symbol & { _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\""; } -->
1515
</thead>
1616
{/if}
1717
<tbody>
1818
{#each data as d} <!-- data: any[], d: any -->
19-
<tr>{@render row(d)}</tr> <!-- row: (this: void, args_0: any) => unique symbol & { _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\""; }, d: any -->
19+
<tr>{@render row(d)}</tr> <!-- row(d): unique symbol & { _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\""; } -->
2020
{/each}
2121
</tbody>
2222
</table>

tests/fixtures/parser/ast/svelte5/docs/snippets/11-typing-snippets-output.json

+56-20
Original file line numberDiff line numberDiff line change
@@ -1156,13 +1156,31 @@
11561156
"children": [
11571157
{
11581158
"type": "SvelteRenderTag",
1159-
"arguments": [],
1160-
"callee": {
1161-
"type": "Identifier",
1162-
"name": "children",
1159+
"expression": {
1160+
"type": "CallExpression",
1161+
"arguments": [],
1162+
"callee": {
1163+
"type": "Identifier",
1164+
"name": "children",
1165+
"range": [
1166+
236,
1167+
244
1168+
],
1169+
"loc": {
1170+
"start": {
1171+
"line": 14,
1172+
"column": 16
1173+
},
1174+
"end": {
1175+
"line": 14,
1176+
"column": 24
1177+
}
1178+
}
1179+
},
1180+
"optional": false,
11631181
"range": [
11641182
236,
1165-
244
1183+
246
11661184
],
11671185
"loc": {
11681186
"start": {
@@ -1171,7 +1189,7 @@
11711189
},
11721190
"end": {
11731191
"line": 14,
1174-
"column": 24
1192+
"column": 26
11751193
}
11761194
}
11771195
},
@@ -1452,32 +1470,50 @@
14521470
"children": [
14531471
{
14541472
"type": "SvelteRenderTag",
1455-
"arguments": [
1456-
{
1473+
"expression": {
1474+
"type": "CallExpression",
1475+
"arguments": [
1476+
{
1477+
"type": "Identifier",
1478+
"name": "d",
1479+
"range": [
1480+
320,
1481+
321
1482+
],
1483+
"loc": {
1484+
"start": {
1485+
"line": 19,
1486+
"column": 20
1487+
},
1488+
"end": {
1489+
"line": 19,
1490+
"column": 21
1491+
}
1492+
}
1493+
}
1494+
],
1495+
"callee": {
14571496
"type": "Identifier",
1458-
"name": "d",
1497+
"name": "row",
14591498
"range": [
1460-
320,
1461-
321
1499+
316,
1500+
319
14621501
],
14631502
"loc": {
14641503
"start": {
14651504
"line": 19,
1466-
"column": 20
1505+
"column": 16
14671506
},
14681507
"end": {
14691508
"line": 19,
1470-
"column": 21
1509+
"column": 19
14711510
}
14721511
}
1473-
}
1474-
],
1475-
"callee": {
1476-
"type": "Identifier",
1477-
"name": "row",
1512+
},
1513+
"optional": false,
14781514
"range": [
14791515
316,
1480-
319
1516+
322
14811517
],
14821518
"loc": {
14831519
"start": {
@@ -1486,7 +1522,7 @@
14861522
},
14871523
"end": {
14881524
"line": 19,
1489-
"column": 19
1525+
"column": 22
14901526
}
14911527
}
14921528
},

tests/fixtures/parser/ast/svelte5/docs/snippets/11-typing-snippets-scope-output.json

+32-14
Original file line numberDiff line numberDiff line change
@@ -3365,32 +3365,50 @@
33653365
"children": [
33663366
{
33673367
"type": "SvelteRenderTag",
3368-
"arguments": [
3369-
{
3368+
"expression": {
3369+
"type": "CallExpression",
3370+
"arguments": [
3371+
{
3372+
"type": "Identifier",
3373+
"name": "d",
3374+
"range": [
3375+
320,
3376+
321
3377+
],
3378+
"loc": {
3379+
"start": {
3380+
"line": 19,
3381+
"column": 20
3382+
},
3383+
"end": {
3384+
"line": 19,
3385+
"column": 21
3386+
}
3387+
}
3388+
}
3389+
],
3390+
"callee": {
33703391
"type": "Identifier",
3371-
"name": "d",
3392+
"name": "row",
33723393
"range": [
3373-
320,
3374-
321
3394+
316,
3395+
319
33753396
],
33763397
"loc": {
33773398
"start": {
33783399
"line": 19,
3379-
"column": 20
3400+
"column": 16
33803401
},
33813402
"end": {
33823403
"line": 19,
3383-
"column": 21
3404+
"column": 19
33843405
}
33853406
}
3386-
}
3387-
],
3388-
"callee": {
3389-
"type": "Identifier",
3390-
"name": "row",
3407+
},
3408+
"optional": false,
33913409
"range": [
33923410
316,
3393-
319
3411+
322
33943412
],
33953413
"loc": {
33963414
"start": {
@@ -3399,7 +3417,7 @@
33993417
},
34003418
"end": {
34013419
"line": 19,
3402-
"column": 19
3420+
"column": 22
34033421
}
34043422
}
34053423
},

0 commit comments

Comments
 (0)