From 9cf524df8c94920d7c7058692f2f83a95a4006e0 Mon Sep 17 00:00:00 2001 From: Flavian Kaufmann Date: Tue, 20 May 2025 11:31:50 +0200 Subject: hashmap for context --- include/ast.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/ast.h') diff --git a/include/ast.h b/include/ast.h index 9c6b6bd..c619c72 100644 --- a/include/ast.h +++ b/include/ast.h @@ -1,6 +1,7 @@ #ifndef AST_H #define AST_H + typedef enum { NT_SKIP, NT_ASSIGN, NT_SEQ, NT_IF, NT_WHILE, NT_INT, NT_VAR, NT_AOP, NT_BOP, NT_NOT, NT_ROP @@ -26,6 +27,7 @@ typedef struct ASTNode { } u; } ASTNode; + ASTNode *ast_skip(void); ASTNode *ast_assign(ASTNode *var, ASTNode *aexp); ASTNode *ast_seq(ASTNode *stm1, ASTNode *stm2); @@ -38,7 +40,7 @@ ASTNode *ast_bop(BOp bop, ASTNode *bexp1, ASTNode *bexp2); ASTNode *ast_not(ASTNode *bexp); ASTNode *ast_rop(ROp rop, ASTNode *aexp1, ASTNode *aexp2); -void free_ast(ASTNode *node); +void ast_free(ASTNode *node); #endif -- cgit v1.2.3