Implement +, * and - primitives

This commit is contained in:
2025-08-10 14:52:38 +01:00
parent 472a682757
commit b20a6749f7
7 changed files with 238 additions and 2 deletions

View File

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

10
lib/include/prim.h Normal file
View File

@@ -0,0 +1,10 @@
#ifndef PRIM_H
#define PRIM_H
#include "am.h"
#include "expr.h"
#include "store.h"
void prim_load(am_t *am, store_t *store);
#endif