about summary refs log tree commit diff
path: root/users/fcuny/exp/monkey/pkg/repl
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-10-27 19:24:57 -0700
committerFranck Cuny <franck@fcuny.net>2022-10-27 19:24:57 -0700
commita5679641aa0eb9e872605b70c263c3e950132647 (patch)
tree7f4a9670365f8f13152d1070e5d5803f3618aa91 /users/fcuny/exp/monkey/pkg/repl
parentfeat(ops/github): archive notes.fcuny.net (diff)
downloadworld-a5679641aa0eb9e872605b70c263c3e950132647.tar.gz
ref(users/fcuny): and just like that ...
Diffstat (limited to 'users/fcuny/exp/monkey/pkg/repl')
-rw-r--r--users/fcuny/exp/monkey/pkg/repl/repl.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/users/fcuny/exp/monkey/pkg/repl/repl.go b/users/fcuny/exp/monkey/pkg/repl/repl.go
deleted file mode 100644
index 5e7b1d1..0000000
--- a/users/fcuny/exp/monkey/pkg/repl/repl.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Package repl provides a REPL to the monkey language.
-package repl
-
-import (
-	"bufio"
-	"fmt"
-	"io"
-	lexer "monkey/pkg/lexer"
-	token "monkey/pkg/token"
-)
-
-const PROMPT = ">> "
-
-func Start(in io.Reader, out io.Writer) {
-	scanner := bufio.NewScanner(in)
-	for {
-		fmt.Print(PROMPT)
-		scanned := scanner.Scan()
-
-		if !scanned {
-			return
-		}
-
-		line := scanner.Text()
-		l := lexer.New(line)
-		for tok := l.NextToken(); tok.Type != token.EOF; tok = l.NextToken() {
-			fmt.Printf("%+v\n", tok)
-		}
-	}
-}