add basic repl

This commit is contained in:
Chuck Smith
2024-01-14 21:35:27 -05:00
parent 1e9bd34a84
commit d1e11bde19
2 changed files with 49 additions and 0 deletions

19
main.go Normal file
View File

@@ -0,0 +1,19 @@
package main
import (
"fmt"
"monkey/repl"
"os"
user2 "os/user"
)
func main() {
user, err := user2.Current()
if err != nil {
panic(err)
}
fmt.Printf("Hello %s! This is the Monkey programmig language!\n", user.Username)
fmt.Printf("Feel free to type in commands\n")
repl.Start(os.Stdin, os.Stdout)
}