bug fixes

This commit is contained in:
2026-07-13 23:34:14 +02:00
parent 0eeacc2e37
commit 0b0b00a050
6 changed files with 114 additions and 17 deletions
+7 -3
View File
@@ -132,6 +132,10 @@ Expr_Kind :: enum u8 {
Call,
}
CATCH_EXPRESSION :: i64(0)
CATCH_BLOCK :: i64(1)
CATCH_VOID_FALLTHROUGH :: i64(2)
Expr :: struct {
span: source.Span,
type: types.Type,
@@ -140,9 +144,9 @@ Expr :: struct {
// encoded as Expr_Id because it otherwise has no args.
args: []Expr_Id,
// `Catch` block handlers use `body` for the handler statements and `target`
// for the optional captured error local. A missing `right` means the handler
// exits on every path and therefore has no fallback value. `Try` uses `body`
// for active error-exit cleanup.
// for the optional captured error local. `integer` selects the catch mode;
// a missing `right` means the block exits or completes with void. `Try` uses
// `body` for active error-exit cleanup.
body: []Stmt_Id,
target: Ref,
left: Expr_Id,