#ifndef ENVIRONMENT_H #define ENVIRONMENT_H #include "object.h" struct Environment; struct Environment { char** strings; Object* objects; struct Environment* outer; int capacity; int refs; }; struct Dictionary { int structCount; int structCapacity; struct StructDef* structDefs; }; struct Environment* global(); void setGlobal(struct Environment* env); Object fetchFromEnvironment(const char* name, struct Environment* env); struct Environment envForLambda(const Object* params, const Object* arg_forms, int paramCount, struct Environment* outer); void addToEnv(struct Environment* env, const char* name, Object obj); void printEnv(struct Environment* env); void addFunc(const char* name, Object (* func)(Object*, int, struct Environment*), struct Environment* env, int i); void deleteEnv(struct Environment* e); void shredDictionary(); struct Environment defaultEnv(); int getStructIndex(const char* name); struct StructDef* getStructAt(int i); void addStructDef(struct StructDef def); void printColored(const char* code); int runTests(int detailed); #endif