|
|
@ -16,7 +16,7 @@ export function print(ast) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** @type {Visitors<AST.SvelteNode | AST.CSS.Node, any>} */
|
|
|
|
/** @type {Visitors<AST.SvelteNode, any>} */
|
|
|
|
const visitors = {
|
|
|
|
const visitors = {
|
|
|
|
Root(node, context) {
|
|
|
|
Root(node, context) {
|
|
|
|
if (node.options) {
|
|
|
|
if (node.options) {
|
|
|
@ -354,6 +354,14 @@ const visitors = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KeyBlock(node, context) {
|
|
|
|
|
|
|
|
context.write('{#key ');
|
|
|
|
|
|
|
|
context.visit(node.expression);
|
|
|
|
|
|
|
|
context.write('}');
|
|
|
|
|
|
|
|
context.visit(node.fragment);
|
|
|
|
|
|
|
|
context.write('{/key}');
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
LetDirective(node, context) {
|
|
|
|
LetDirective(node, context) {
|
|
|
|
context.write(`let:${node.name}`);
|
|
|
|
context.write(`let:${node.name}`);
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|