aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum/repl_windows.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-17 21:15:46 +0800
committerobscuren <geffobscura@gmail.com>2014-05-17 21:15:46 +0800
commit770808ce0d44cadfedbe01694c836be2eaf0e82c (patch)
treef79310a0ea409805897d738f2c2fb7aa5d597355 /ethereum/repl_windows.go
parent2ac292dc7ada20d64188b9d35f23600e4642021b (diff)
downloadgo-tangerine-770808ce0d44cadfedbe01694c836be2eaf0e82c.tar
go-tangerine-770808ce0d44cadfedbe01694c836be2eaf0e82c.tar.gz
go-tangerine-770808ce0d44cadfedbe01694c836be2eaf0e82c.tar.bz2
go-tangerine-770808ce0d44cadfedbe01694c836be2eaf0e82c.tar.lz
go-tangerine-770808ce0d44cadfedbe01694c836be2eaf0e82c.tar.xz
go-tangerine-770808ce0d44cadfedbe01694c836be2eaf0e82c.tar.zst
go-tangerine-770808ce0d44cadfedbe01694c836be2eaf0e82c.zip
Readline repl for linux & osx
Diffstat (limited to 'ethereum/repl_windows.go')
-rw-r--r--ethereum/repl_windows.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/ethereum/repl_windows.go b/ethereum/repl_windows.go
new file mode 100644
index 000000000..c65bb1cb4
--- /dev/null
+++ b/ethereum/repl_windows.go
@@ -0,0 +1,20 @@
+package main
+
+import (
+ "bufio"
+ "fmt"
+ "os"
+)
+
+func (self *JSRepl) read() {
+ reader := bufio.NewReader(os.Stdin)
+ for {
+ fmt.Printf("eth >>> ")
+ str, _, err := reader.ReadLine()
+ if err != nil {
+ fmt.Println("Error reading input", err)
+ } else {
+ self.parseInput(string(str))
+ }
+ }
+}