aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum/repl/repl_windows.go
diff options
context:
space:
mode:
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)
+}