aboutsummaryrefslogtreecommitdiff
path: root/src/cmonkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmonkey.c')
-rw-r--r--src/cmonkey.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cmonkey.c b/src/cmonkey.c
new file mode 100644
index 0000000..64e61d6
--- /dev/null
+++ b/src/cmonkey.c
@@ -0,0 +1,16 @@
+#include "repl.h"
+
+#include <stdio.h>
+
+int
+main(int argc, char *argv[])
+{
+ /* TODO: read from file, interpret and exit
+ if (argc > 1) {
+ FILE *in = fopen(argv[1], "r");
+ }
+ */
+ printf("Welcome to the CMonkey interpreter of the Monkey language!\n");
+ printf("Enter any commands to begin\n");
+ repl_start(stdin, stdout);
+}