From 7e0195b0a753bd990307587926bfc0fe11927f77 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Sat, 11 Jan 2020 14:50:44 +0100 Subject: repl: support a simple REPL for some early testing The REPL reads the input, send it to the lexer, and prints the token to STDOUT. For now nothing else is done since we still don't parse the tokens. --- users/fcuny/exp/monkey/cmd/repl/main.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 users/fcuny/exp/monkey/cmd/repl/main.go (limited to 'users/fcuny/exp/monkey/cmd') diff --git a/users/fcuny/exp/monkey/cmd/repl/main.go b/users/fcuny/exp/monkey/cmd/repl/main.go new file mode 100644 index 0000000..46b865c --- /dev/null +++ b/users/fcuny/exp/monkey/cmd/repl/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "fmt" + "monkey/pkg/repl" + "os" +) + +func main() { + fmt.Printf("Welcome to monkey's REPL.") + repl.Start(os.Stdin, os.Stdout) +} -- cgit 1.4.1