|
@@ -1,8 +1,25 @@
|
|
|
package main
|
|
package main
|
|
|
|
|
|
|
|
|
|
+import (
|
|
|
|
|
+ "fmt"
|
|
|
|
|
+ "github/runnignwater/monkey/repl"
|
|
|
|
|
+ "os"
|
|
|
|
|
+ _user "os/user"
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @Author: simon
|
|
* @Author: simon
|
|
|
* @Author: ynwdlxm@163.com
|
|
* @Author: ynwdlxm@163.com
|
|
|
* @Date: 2022/10/2 上午10:55
|
|
* @Date: 2022/10/2 上午10:55
|
|
|
* @Desc:
|
|
* @Desc:
|
|
|
*/
|
|
*/
|
|
|
|
|
+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.Printf("Feel free to type in commands\n")
|
|
|
|
|
+ repl.Start(os.Stdin, os.Stdout)
|
|
|
|
|
+}
|