Implement global bindings
[muddle-interpreter.git] / src / main.c
index c9876ce2c0a6067ad2f3eb6738eab1cffcecf016..126579f314f24eee260bf6863268df7456d606a3 100644 (file)
@@ -16,6 +16,7 @@ License along with this file. If not, see
 <http://www.gnu.org/licenses/>.
 */
 
+#include "atom.h"
 #include "read.h"
 #include "eval.h"
 #include "print.h"
@@ -31,6 +32,7 @@ pool_object *pool;
 pool_ptr ptop;
 object *vhp_base;
 heap_ptr vhp;
+vector_object globals;
 
 // oblists (move to ASOCs once implemented)
 uvector_object root;
@@ -54,6 +56,8 @@ enum
   READER_OBJCT = 64
 };
 
+void init_standard_env ();
+
 int
 main ()
 {
@@ -91,6 +95,8 @@ main ()
       ptop = 1;
       vhp = 1;
       root = oblist_create (13);
+      globals = vector_create (64);
+      init_standard_env ();
       // terminate input
       assert (buf[n - 1] == '\n');
       buf[n - 1] = '\0';