From 0de2182acc4072610fa51d45efeee920603dfb4c Mon Sep 17 00:00:00 2001
From: ComputerGuy <63362464+Ocean-OS@users.noreply.github.com>
Date: Mon, 16 Jun 2025 21:14:04 -0700
Subject: [PATCH] `SelectorList`, ``
---
packages/svelte/src/compiler/print/index.js | 166 +++++++++++++++++++-
1 file changed, 165 insertions(+), 1 deletion(-)
diff --git a/packages/svelte/src/compiler/print/index.js b/packages/svelte/src/compiler/print/index.js
index 213fa3b1f8..ab5180fe6e 100644
--- a/packages/svelte/src/compiler/print/index.js
+++ b/packages/svelte/src/compiler/print/index.js
@@ -261,7 +261,7 @@ const visitors = {
ConstTag(node, context) {
context.write('{@const ');
- context.visit(node.declaration); // TODO does this work?
+ context.visit(node.declaration);
context.write('}');
},
@@ -477,6 +477,18 @@ const visitors = {
context.visit(node.block);
},
+ SelectorList(node, context) {
+ let started = false;
+ for (const selector of node.children) {
+ if (started) {
+ context.write(', ');
+ }
+
+ context.visit(selector);
+ started = true;
+ }
+ },
+
SlotElement(node, context) {
context.write('');
},
+ SvelteBoundary(node, context) {
+ context.write('');
+ context.visit(node.fragment);
+ context.write(``);
+ } else {
+ context.write('/>');
+ }
+ },
+
+ SvelteComponent(node, context) {
+ context.write('');
+ context.visit(node.fragment);
+ context.write(``);
+ } else {
+ context.write('/>');
+ }
+ },
+
+ SvelteDocument(node, context) {
+ context.write('');
+ context.visit(node.fragment);
+ context.write(``);
+ } else {
+ context.write('/>');
+ }
+ },
+
+ SvelteElement(node, context) {
+ context.write('');
+ context.visit(node.fragment);
+ context.write(``);
+ } else {
+ context.write('/>');
+ }
+ },
+
+ SvelteFragment(node, context) {
+ context.write('');
+ context.visit(node.fragment);
+ context.write(``);
+ } else {
+ context.write('/>');
+ }
+ },
+
+ SvelteHead(node, context) {
+ context.write('');
+ context.visit(node.fragment);
+ context.write(``);
+ } else {
+ context.write('/>');
+ }
+ },
+
+ SvelteSelf(node, context) {
+ context.write('');
+ context.visit(node.fragment);
+ context.write(``);
+ } else {
+ context.write('/>');
+ }
+ },
+
+ SvelteWindow(node, context) {
+ context.write('');
+ context.visit(node.fragment);
+ context.write(``);
+ } else {
+ context.write('/>');
+ }
+ },
+
Text(node, context) {
context.write(node.data);
},