|
|
@ -205,6 +205,15 @@ const visitors = {
|
|
|
|
context.write('}');
|
|
|
|
context.write('}');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ClassDirective(node, context) {
|
|
|
|
|
|
|
|
context.write(`class:${node.name}`);
|
|
|
|
|
|
|
|
if (node.expression !== null) {
|
|
|
|
|
|
|
|
context.write('={');
|
|
|
|
|
|
|
|
context.visit(node.expression);
|
|
|
|
|
|
|
|
context.write('}');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
ClassSelector(node, context) {
|
|
|
|
ClassSelector(node, context) {
|
|
|
|
context.write(`.${node.name}`);
|
|
|
|
context.write(`.${node.name}`);
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -288,6 +297,15 @@ const visitors = {
|
|
|
|
context.write('{/if}');
|
|
|
|
context.write('{/if}');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LetDirective(node, context) {
|
|
|
|
|
|
|
|
context.write(`let:${node.name}`);
|
|
|
|
|
|
|
|
if (node.expression !== null) {
|
|
|
|
|
|
|
|
context.write('={');
|
|
|
|
|
|
|
|
context.visit(node.expression);
|
|
|
|
|
|
|
|
context.write('}');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
Nth(node, context) {
|
|
|
|
Nth(node, context) {
|
|
|
|
context.write(node.value); // TODO is this right?
|
|
|
|
context.write(node.value); // TODO is this right?
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -425,6 +443,18 @@ const visitors = {
|
|
|
|
context.write('{/snippet}');
|
|
|
|
context.write('{/snippet}');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StyleDirective(node, context) {
|
|
|
|
|
|
|
|
context.write(`style:${node.name}`);
|
|
|
|
|
|
|
|
for (const modifier of node.modifiers) {
|
|
|
|
|
|
|
|
context.write(`|${modifier}`);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (node.expression !== null) {
|
|
|
|
|
|
|
|
context.write('={');
|
|
|
|
|
|
|
|
context.visit(node.expression);
|
|
|
|
|
|
|
|
context.write('}');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
StyleSheet(node, context) {
|
|
|
|
StyleSheet(node, context) {
|
|
|
|
context.write('<style');
|
|
|
|
context.write('<style');
|
|
|
|
|
|
|
|
|
|
|
|