|
|
|
|
@ -5,7 +5,6 @@
|
|
|
|
|
* @returns {import("C:/repos/svelte/svelte/node_modules/.pnpm/@types+estree@1.0.0/node_modules/@types/estree/index").TemplateLiteral}
|
|
|
|
|
*/
|
|
|
|
|
export function nodes_to_template_literal(value) {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @type {TemplateLiteral}
|
|
|
|
|
*/
|
|
|
|
|
@ -26,8 +25,7 @@ export function nodes_to_template_literal(value) {
|
|
|
|
|
value.forEach((node) => {
|
|
|
|
|
if (node.type === 'Text') {
|
|
|
|
|
quasi.value.raw += node.raw;
|
|
|
|
|
}
|
|
|
|
|
else if (node.type === 'MustacheTag') {
|
|
|
|
|
} else if (node.type === 'MustacheTag') {
|
|
|
|
|
literal.quasis.push(quasi);
|
|
|
|
|
literal.expressions.push(node.expression);
|
|
|
|
|
quasi = {
|
|
|
|
|
@ -41,7 +39,3 @@ export function nodes_to_template_literal(value) {
|
|
|
|
|
literal.quasis.push(quasi);
|
|
|
|
|
return literal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|