aboutsummaryrefslogtreecommitdiff
path: root/environment.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-15 13:43:46 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-15 13:43:46 -0500
commit317b8f53193e5ec14c92e229c89bc84ca32b7810 (patch)
tree481ea31ebfedf6915bb59a24fd6c9cb0506abd20 /environment.h
parent0577469f9c49473fe95eedfa27b0f282ac9ffdb6 (diff)
Progress towards environments
Diffstat (limited to 'environment.h')
-rw-r--r--environment.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/environment.h b/environment.h
new file mode 100644
index 00000000..a03ccd42
--- /dev/null
+++ b/environment.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include <gc/cord.h>
+
+#include "types.h"
+#include "builtins/table.h"
+
+typedef struct {
+ table_t globals, types;
+ table_t *locals;
+ CORD imports;
+ CORD typedefs;
+ CORD typecode;
+ CORD staticdefs;
+ CORD funcs;
+ CORD main;
+} env_t;
+
+typedef struct {
+ CORD code;
+ type_t *type;
+} binding_t;
+
+env_t *new_environment(void);
+
+// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0