diff options
author | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2025-05-20 08:22:29 +0200 |
---|---|---|
committer | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2025-05-20 08:22:29 +0200 |
commit | e2276bb3feba22cf131debbca881d3e4d0ba705d (patch) | |
tree | fd3170baf2c5398565fdd429b4f58a0cea0f6081 /ast.h | |
parent | 77339ce34a79a7b5a1818c1009d1db1252fe8ea6 (diff) | |
download | imp-e2276bb3feba22cf131debbca881d3e4d0ba705d.tar.gz imp-e2276bb3feba22cf131debbca881d3e4d0ba705d.zip |
pass env to exec_stmt
Diffstat (limited to 'ast.h')
-rw-r--r-- | ast.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |