parsing lambdas

This commit is contained in:
Dustin Swan 2026-02-01 01:01:48 -07:00
parent 0f0371461d
commit 6e8b5afd3b
No known key found for this signature in database
GPG key ID: 30D46587E2100467
3 changed files with 43 additions and 52 deletions

View file

@ -154,6 +154,10 @@ export function prettyPrint(ast: AST, indent = 0): string {
.join(', ');
return `${i}{${fields}}`;
case 'lambda':
const params = ast.params.join(', ')
return `${i}(${params}) => ${prettyPrint(ast.body)}`
default:
return `${i}${ast.kind}`
}