summaryrefslogtreecommitdiff
path: root/main.odin
blob: 8a4e1cb52539c4bcbb9ddb7df00b2694005fcd20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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))
}