Create environment module

This commit is contained in:
2025-08-10 02:05:16 +01:00
parent a03ef58eca
commit fade9395fa
6 changed files with 172 additions and 1 deletions

View File

@@ -6,7 +6,7 @@
#define AM_STACK_SIZE 128U
typedef struct {
expr_t *expr;
expr_t *env, *expr, *val;
expr_t **sp, *stack[AM_STACK_SIZE];
} am_t;

11
lib/include/env.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef ENV_H
#define ENV_H
#include "am.h"
#include "store.h"
void env_init(am_t *am, store_t *store);
void env_fetch(am_t *am);
void env_set(am_t *am, store_t *store);
#endif