mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-15 00:45:04 +01:00
implement field accesses
This commit is contained in:
parent
7f65dc0277
commit
2da011caf4
7 changed files with 224 additions and 96 deletions
|
|
@ -140,6 +140,9 @@ function printExpr(expr: Expr, indent: number): string {
|
|||
);
|
||||
}
|
||||
}
|
||||
case "fieldAccess": {
|
||||
return `${printExpr(expr.lhs, indent)}.${expr.field.value}`;
|
||||
}
|
||||
case "if": {
|
||||
const elsePart = expr.else
|
||||
? ` else ${printExpr(expr.else, indent + 1)}`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue