aboutsummaryrefslogblamecommitdiffstats
path: root/ethereum/repl_windows.go
blob: 9d4787772f069d63e209bce694c1695da1f9a8c2 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                           
                                       







                                                               



                                                  
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)
}