error handling kickoff
This commit is contained in:
@@ -99,6 +99,8 @@ Expr_Kind :: enum u8 {
|
||||
Or,
|
||||
Range,
|
||||
Call,
|
||||
Try,
|
||||
Catch,
|
||||
}
|
||||
|
||||
Expr :: struct {
|
||||
@@ -109,6 +111,7 @@ Expr :: struct {
|
||||
name: symbol.Id,
|
||||
left: Expr_Id,
|
||||
right: Expr_Id,
|
||||
body: []Stmt_Id,
|
||||
diagnostic: source.Diagnostic_Id,
|
||||
parenthesized: bool,
|
||||
kind: Expr_Kind,
|
||||
@@ -204,6 +207,7 @@ Function :: struct {
|
||||
variadic: bool,
|
||||
params: []Param,
|
||||
result: Type_Syntax,
|
||||
error: Type_Syntax,
|
||||
body: []Stmt_Id,
|
||||
link_name: string,
|
||||
unsupported_reason: string,
|
||||
@@ -304,6 +308,7 @@ init_module :: proc(allocator := context.allocator) -> Module {
|
||||
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.captures, module.allocator)
|
||||
|
||||
Reference in New Issue
Block a user