summaryrefslogtreecommitdiff
path: root/main.odin
diff options
context:
space:
mode:
Diffstat (limited to 'main.odin')
-rw-r--r--main.odin17
1 files changed, 17 insertions, 0 deletions
diff --git a/main.odin b/main.odin
new file mode 100644
index 0000000..8a4e1cb
--- /dev/null
+++ b/main.odin
@@ -0,0 +1,17 @@
+package main
+
+import "core:fmt"
+import "core:os"
+import "repl"
+
+main :: proc() {
+ user, ok := os.lookup_env_alloc("USER", context.allocator)
+ if !ok {
+ fmt.eprintln("Could not determine username")
+ return
+ }
+
+ fmt.printf("Hello %s! This is the Monkey programming language!\n", user)
+ fmt.println("Feel free to type in commands")
+ repl.start(os.to_stream(os.stdin), os.to_stream(os.stdout))
+}