aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum/repl/repl_windows.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-17 21:32:44 +0800
committerobscuren <geffobscura@gmail.com>2014-07-17 21:32:44 +0800
commitc9517024237de781cdc450bca89907217e5a8cef (patch)
tree9ed398ca6ddbc019917b96a6e14988d89fbef15a /ethereum/repl/repl_windows.go
parentfc8bd7229ee25e214130df98875ecc13e4650911 (diff)
parent7d64b589b4cf3f71125d5bd0f0a8f6a560e909db (diff)
downloadgo-tangerine-0.5.17.tar
go-tangerine-0.5.17.tar.gz
go-tangerine-0.5.17.tar.bz2
go-tangerine-0.5.17.tar.lz
go-tangerine-0.5.17.tar.xz
go-tangerine-0.5.17.tar.zst
go-tangerine-0.5.17.zip
Merge branch 'develop'0.5.17
Diffstat (limited to 'ethereum/repl/repl_windows.go')
-rw-r--r--ethereum/repl/repl_windows.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/ethereum/repl/repl_windows.go b/ethereum/repl/repl_windows.go
new file mode 100644
index 000000000..4106c89bc
--- /dev/null
+++ b/ethereum/repl/repl_windows.go
@@ -0,0 +1,24 @@
+package ethrepl
+
+import (
+ "bufio"
+ "fmt"
+ "os"
+)
+
+func (self *JSRepl) read() {
+ reader := bufio.NewReader(os.Stdin)
+ for {
+ fmt.Printf(self.prompt)
+ str, _, err := reader.ReadLine()
+ if err != nil {
+ fmt.Println("Error reading input", err)
+ } else {
+ self.parseInput(string(str))
+ }
+ }
+}
+
+func (self *JSRepl) PrintValue(value otto.Value) {
+ fmt.Println(value)
+}