|
|
|
@ -630,22 +630,18 @@ const javascript_visitors_runes = {
|
|
|
|
|
if (rune === '$effect.active') {
|
|
|
|
|
return b.literal(false);
|
|
|
|
|
}
|
|
|
|
|
if (rune === '$log' || rune === '$log.break' || rune === '$log.trace') {
|
|
|
|
|
if (state.options.dev) {
|
|
|
|
|
const args = /** @type {import('estree').Expression[]} */ (
|
|
|
|
|
node.arguments.map((arg) => visit(arg))
|
|
|
|
|
);
|
|
|
|
|
return b.call('console.log', ...args);
|
|
|
|
|
}
|
|
|
|
|
return b.unary('void', b.literal(0));
|
|
|
|
|
}
|
|
|
|
|
if (rune === '$log.table') {
|
|
|
|
|
if (state.options.dev) {
|
|
|
|
|
|
|
|
|
|
if (rune?.startsWith('$log')) {
|
|
|
|
|
if ((rune === '$log' || rune === '$log.table') && state.options.dev) {
|
|
|
|
|
const callee = rune === '$log' ? 'console.log' : 'console.table';
|
|
|
|
|
|
|
|
|
|
const args = /** @type {import('estree').Expression[]} */ (
|
|
|
|
|
node.arguments.map((arg) => visit(arg))
|
|
|
|
|
);
|
|
|
|
|
return b.call('console.table', ...args);
|
|
|
|
|
|
|
|
|
|
return b.call(callee, ...args);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return b.unary('void', b.literal(0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|