Skip to content

Commit 371f118

Browse files
committed
add to legacy ast
1 parent 75a01a5 commit 371f118

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/svelte/src/compiler/legacy.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,20 @@ export function convert(source, ast) {
389389
children: node.body.nodes.map((child) => visit(child))
390390
};
391391
},
392+
// @ts-expect-error
393+
SvelteBoundary(node, { visit }) {
394+
remove_surrounding_whitespace_nodes(node.fragment.nodes);
395+
return {
396+
type: 'SvelteBoundary',
397+
name: 'svelte:boundary',
398+
start: node.start,
399+
end: node.end,
400+
attributes: node.attributes.map(
401+
(child) => /** @type {Legacy.LegacyAttributeLike} */ (visit(child))
402+
),
403+
children: node.fragment.nodes.map((child) => visit(child))
404+
};
405+
},
392406
RegularElement(node, { visit }) {
393407
return {
394408
type: 'Element',

0 commit comments

Comments
 (0)