compiler-in-go/cmd/repl/main.go

20 lines
337 B
Go
Raw Normal View History

package main
import (
"fmt"
"os"
"os/user"
"code.jmug.me/jmug/interpreter-in-go/pkg/repl"
)
func main() {
user, err := user.Current()
if err != nil {
panic(err)
}
fmt.Printf("Hello %s, this is the Monkey programming language!\n", user.Username)
fmt.Println("Go ahead, type something :)")
repl.Start(os.Stdin, os.Stdout)
}