errdefer and try/defer fix

This commit is contained in:
2026-07-13 19:20:22 +02:00
parent 9e75549d02
commit 6de4d9f9f3
23 changed files with 113190 additions and 105482 deletions
+3 -1
View File
@@ -169,6 +169,7 @@ Stmt :: struct {
immutable: bool,
value_control_flow: bool,
pointer_capture: bool,
error_only: bool,
// Assignments store the lvalue in `target`, the right-hand side in `expr`,
// and the source operator in `assignment_op`. `Set` is ordinary `=`;
// the arithmetic variants are `+=`, `-=`, `*=`, and `/=`.
@@ -187,7 +188,8 @@ Stmt :: struct {
// distinguish `|@item|` from copy capture.
// `Block` statements (a bare `{ ... }` scope) use `body` as their statements.
// `Defer` statements use `update` as the deferred statement (which may itself
// be a `Block`).
// be a `Block`), `error_only` for `errdefer`, and `captures` for its optional
// error capture.
// `Match` statements use `expr` as the subject and `body` as the list of arm
// statements (each a `Match_Arm`). A `Match_Arm` uses `patterns` as its pattern
// list (empty marks the `else` arm; more than one is a multi-pattern arm),