Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
JavaScript
1234567891011121314151617181920212223242526272829303132333435// Verify the bundled source parses correctlyimport { parse } from './kidlisp-mini/eval.mjs';
const bundledSource = `fade:red-blue-black-blue-red(ink (? rainbow white 0) (1s... 24 64))(line w/2 0 w/2 h)(spin (2s... -1.125 1.125)) (zoom 1.1)(0.5s (contrast 1.05))(scroll (? -0.1 0 0.1) (? -0.1 0 0.1))(ink (? cyan yellow magenta) 8)(circle w/2 h/2 (? 2 4 8))`;
const ast = parse(bundledSource);console.log('=== PARSED AST ===');console.log('AST length:', ast.length);console.log('Top-level expressions:');ast.forEach((expr, i) => { if (Array.isArray(expr)) { console.log(` [${i}]: (${expr[0]} ...)`); } else if (typeof expr === 'object' && expr.type === 'fade') { console.log(` [${i}]: fade:${expr.colors.join('-')}`); } else { console.log(` [${i}]: ${expr}`); }});
console.log('\n=== FUNCTION CALLS ===');ast.forEach((expr, i) => { if (Array.isArray(expr) && typeof expr[0] === 'string') { const fn = expr[0]; const args = expr.slice(1).length; console.log(` ${fn}: ${args} args`); }});