X-Git-Url: https://code.kerkeslager.com/?p=fur;a=blobdiff_plain;f=c%2Fenvironment.h;fp=c%2Fenvironment.h;h=ee4f78483125d61f4fa39af80a877ee2fde61dd1;hp=0000000000000000000000000000000000000000;hb=0fcd43d2a64af300f2a7c86ba818600b26ed3b68;hpb=5e86faf919c4ee362af47f065112f010c72a7eb0 diff --git a/c/environment.h b/c/environment.h new file mode 100644 index 0000000..ee4f784 --- /dev/null +++ b/c/environment.h @@ -0,0 +1,23 @@ +#ifndef ENVIRONMENT_H +#define ENVIRONMENT_H + +#include +#include "symbol.h" +#include "object.h" + +struct Environment; +typedef struct Environment Environment; + +Environment* Environment_create(Environment*); + +struct EnvironmentGetResult; +typedef struct EnvironmentGetResult EnvironmentGetResult; +struct EnvironmentGetResult { + bool found; + Object* value; +}; + +EnvironmentGetResult Environment_get(Environment*, Symbol*); +bool Environment_set(Environment*, Symbol*, Object*); + +#endif