start structs

This commit is contained in:
nora 2023-07-31 23:39:52 +02:00
parent 924236532c
commit b0b92dae0f
8 changed files with 331 additions and 30 deletions

View file

@ -187,7 +187,7 @@ function printExpr(expr: Expr<AnyPhase>, indent: number): string {
}
case "structLiteral": {
return `${printIdent(expr.name)} { ${expr.fields
.map(([name, expr]) => `${name.name}: ${printExpr(expr, indent + 1)}`)
.map(({ name, expr }) => `${name.name}: ${printExpr(expr, indent + 1)}`)
.join(", ")} }`;
}
case "tupleLiteral": {