aboutsummaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorFlavian Kaufmann <flavian@flaviankaufmann.ch>2025-05-20 08:22:29 +0200
committerFlavian Kaufmann <flavian@flaviankaufmann.ch>2025-05-20 08:22:29 +0200
commite2276bb3feba22cf131debbca881d3e4d0ba705d (patch)
treefd3170baf2c5398565fdd429b4f58a0cea0f6081 /ast.h
parent77339ce34a79a7b5a1818c1009d1db1252fe8ea6 (diff)
downloadimp-e2276bb3feba22cf131debbca881d3e4d0ba705d.tar.gz
imp-e2276bb3feba22cf131debbca881d3e4d0ba705d.zip
pass env to exec_stmt
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/ast.h b/ast.h
index 7a58372..7dd9697 100644
--- a/ast.h
+++ b/ast.h
@@ -38,9 +38,15 @@ ASTNode *ast_bop(BOp bop, ASTNode *bexp1, ASTNode *bexp2);
ASTNode *ast_not(ASTNode *bexp);
ASTNode *ast_rop(ROp rop, ASTNode *aexp1, ASTNode *aexp2);
-void exec_stmt(ASTNode *node);
+typedef struct Env {
+ char *name;
+ int val;
+ struct Env *next;
+} Env;
+
+void exec_stmt(Env **env, ASTNode *node);
void free_ast(ASTNode *node);
-void env_print(void);
+void env_print(Env *env);
#endif