diff options
author | zelig <viktor.tron@gmail.com> | 2014-07-01 22:03:02 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-07-01 22:03:02 +0800 |
commit | 89630d2826300d119f2cdc9f8af6c94926f478a2 (patch) | |
tree | aa2addd061e2d2a8f3cdc0821260409f31ac3b09 /ethereum/repl_windows.go | |
parent | 12972b4b65a303dc3f9e135b0e2d97f8b7a661e2 (diff) | |
parent | 550407b0ec78b7026737d1abe28127da8c0c9063 (diff) | |
download | dexon-89630d2826300d119f2cdc9f8af6c94926f478a2.tar.gz dexon-89630d2826300d119f2cdc9f8af6c94926f478a2.tar.zst dexon-89630d2826300d119f2cdc9f8af6c94926f478a2.zip |
merge upstream
Diffstat (limited to 'ethereum/repl_windows.go')
-rw-r--r-- | ethereum/repl_windows.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ethereum/repl_windows.go b/ethereum/repl_windows.go new file mode 100644 index 000000000..9d4787772 --- /dev/null +++ b/ethereum/repl_windows.go @@ -0,0 +1,24 @@ +package main + +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) +} |