diff options
author | obscuren <geffobscura@gmail.com> | 2014-07-17 21:32:44 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-07-17 21:32:44 +0800 |
commit | c9517024237de781cdc450bca89907217e5a8cef (patch) | |
tree | 9ed398ca6ddbc019917b96a6e14988d89fbef15a /ethereum/repl/repl_windows.go | |
parent | fc8bd7229ee25e214130df98875ecc13e4650911 (diff) | |
parent | 7d64b589b4cf3f71125d5bd0f0a8f6a560e909db (diff) | |
download | go-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.go | 24 |
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) +} |