mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-16 01:15:03 +01:00
error recovery!
This commit is contained in:
parent
c0c08488ba
commit
ef04f21100
18 changed files with 799 additions and 366 deletions
|
|
@ -51,6 +51,8 @@ function printItem(item: Item<AnyPhase>): string {
|
|||
)};`
|
||||
);
|
||||
}
|
||||
case "error":
|
||||
return "<ERROR>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -203,6 +205,8 @@ function printExpr(expr: Expr<AnyPhase>, indent: number): string {
|
|||
.map((expr) => printExpr(expr, indent))
|
||||
.join(", ")})`;
|
||||
}
|
||||
case "error":
|
||||
return "<ERROR>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -218,6 +222,8 @@ function printType(type: Type<AnyPhase>): string {
|
|||
return `*${printType(type.inner)}`;
|
||||
case "never":
|
||||
return "!";
|
||||
case "error":
|
||||
return "<ERROR>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -230,6 +236,9 @@ function printRes(res: Resolution): string {
|
|||
case "builtin": {
|
||||
return `#B`;
|
||||
}
|
||||
case "error": {
|
||||
return "#E";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -274,6 +283,8 @@ export function printTy(ty: Ty): string {
|
|||
case "never": {
|
||||
return "!";
|
||||
}
|
||||
case "error":
|
||||
return "<ERROR>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue