blob: dbd2c1e16f1c6c3b6ef12d01973cc218e9a37134 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package main
import "core:fmt"
import "core:os"
import "repl"
import "token"
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))
}
|