READ-EVALUATE-PRINT-LOOP now works and spits out tokens of input. YAY!!!
git-svn-id: https://svn.tlawal.org/svn/monkey@5 f6afcba9-9ef1-4bdd-9b72-7484f5705bac
This commit is contained in:
parent
ee8ab63809
commit
1ea1289b7a
20
main.go
Normal file
20
main.go
Normal file
@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/user"
|
||||
|
||||
"monkey/repl"
|
||||
)
|
||||
|
||||
// TODO(tijani): add quit command.
|
||||
func main() {
|
||||
user, err := user.Current()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
fmt.Printf("Hello %s! Welcome to the Monkey programming language!\n", user.Username)
|
||||
repl.Start(os.Stdin, os.Stdout)
|
||||
}
|
Loading…
Reference in New Issue
Block a user