From d471a41369690a9d2d9b8862ea5ff0ae9cbe40fc Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Tue, 1 Feb 2022 04:08:59 -0500 Subject: Add basic `defer` implementation. We don't have any closures yet, so it's essentially the same as just moving the statement after the `defer` keyword to the end of the block/ right before returning from the function. --- src/ast.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ast.h') diff --git a/src/ast.h b/src/ast.h index 39d1a4e..09d15d1 100644 --- a/src/ast.h +++ b/src/ast.h @@ -28,6 +28,7 @@ F(AST_CONDITIONAL, "conditional expression") \ F(AST_IF, "if statement") \ F(AST_WHILE, "while statement") \ + F(AST_DEFER, "defer statement") \ F(AST_FOR, "for statement") \ F(AST_VARDECL, "variable decl") \ F(AST_LOCAL_VAR, "local variable") \ -- cgit v1.2.3