fallible ergonomics
This commit is contained in:
@@ -129,6 +129,9 @@ Expr :: struct {
|
||||
type: types.Type,
|
||||
integer: i64,
|
||||
args: []Expr_Id,
|
||||
// `Catch` block handlers use `body` for the handler statements and `target`
|
||||
// for the optional captured error local.
|
||||
body: []Stmt_Id,
|
||||
target: Ref,
|
||||
left: Expr_Id,
|
||||
right: Expr_Id,
|
||||
@@ -269,6 +272,7 @@ init_module :: proc(selected := target.DEFAULT, allocator := context.allocator)
|
||||
destroy_module :: proc(module: ^Module) {
|
||||
for expr in module.exprs {
|
||||
delete(expr.args, module.allocator)
|
||||
delete(expr.body, module.allocator)
|
||||
}
|
||||
for statement in module.statements {
|
||||
delete(statement.unwraps, module.allocator)
|
||||
|
||||
Reference in New Issue
Block a user