aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum/repl/repl_windows.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2014-07-21 20:30:37 +0800
committerzelig <viktor.tron@gmail.com>2014-07-21 20:30:37 +0800
commit4d5a890b46a75fb644277bbf2a8c034cf2a13424 (patch)
tree7d37fddbcdbd218fe6e0e216aa3554380229d133 /ethereum/repl/repl_windows.go
parent75a7a4c97c350e911f4d721e940a59c0740ae967 (diff)
parentf702e27485981562ed7b88ecd3f8485af4c61b62 (diff)
downloadgo-tangerine-4d5a890b46a75fb644277bbf2a8c034cf2a13424.tar
go-tangerine-4d5a890b46a75fb644277bbf2a8c034cf2a13424.tar.gz
go-tangerine-4d5a890b46a75fb644277bbf2a8c034cf2a13424.tar.bz2
go-tangerine-4d5a890b46a75fb644277bbf2a8c034cf2a13424.tar.lz
go-tangerine-4d5a890b46a75fb644277bbf2a8c034cf2a13424.tar.xz
go-tangerine-4d5a890b46a75fb644277bbf2a8c034cf2a13424.tar.zst
go-tangerine-4d5a890b46a75fb644277bbf2a8c034cf2a13424.zip
merge upstream
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)
+}