Change let

This commit is contained in:
nora 2023-07-29 17:03:38 +02:00
parent 40543b501c
commit 7c2faaecb8
9 changed files with 200 additions and 100 deletions

View file

@ -53,10 +53,10 @@ function printExpr(expr: Expr, indent: number): string {
case "let": {
const type = expr.type ? `: ${printType(expr.type)}` : "";
return `let ${expr.name}${type} = ${printExpr(
return `let ${expr.name.name}${type} = ${printExpr(
expr.rhs,
indent + 1
)} in${linebreak(indent)}${printExpr(expr.after, indent)}`;
)}`;
}
case "block": {
const exprs = expr.exprs.map((expr) => printExpr(expr, indent + 1));