aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum/repl_windows.go
blob: c42fd6e6a320c6015814f90a7de9c45f3af63b0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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))
        }
    }
}