Fixing lots of stuff. pretty printer. saving to localStorage again. store stuff. can't remember now

This commit is contained in:
Dustin Swan 2026-02-11 16:57:51 -07:00
parent 01d8a6d67c
commit b1696499e5
No known key found for this signature in database
GPG key ID: 30D46587E2100467
9 changed files with 300 additions and 102 deletions

View file

@ -227,7 +227,7 @@ export function prettyPrint(ast: AST, indent = 0): string {
? `...${prettyPrint(entry.expr, )}`
: `${entry.key} = ${prettyPrint(entry.value, 0)}`
);
return `{ ${parts.join(', ') }`;
return `{ ${parts.join(', ')} }`;
case 'lambda': {
const params = ast.params.join(' ');
@ -264,7 +264,7 @@ export function prettyPrint(ast: AST, indent = 0): string {
return `...${prettyPrint(ast.spread, 0)}`;
case 'definition':
return `${ast.name} = ${prettyPrint(ast.body, indent)}`;
return `${ast.name} = ${prettyPrint(ast.body, indent)};`;
default:
return `Unknown AST kind: ${i}${(ast as any).kind}`