Added multi-line support

This commit is contained in:
obscuren
2014-05-19 13:04:31 +02:00
parent 3b7707c3fd
commit 16421106d4
3 changed files with 35 additions and 9 deletions

View File

@@ -101,14 +101,15 @@ func (self *JSRE) Run(code string) (otto.Value, error) {
type JSRepl struct {
re *JSRE
prompt string
}
func NewJSRepl(ethereum *eth.Ethereum) *JSRepl {
return &JSRepl{re: NewJSRE(ethereum)}
return &JSRepl{re: NewJSRE(ethereum), prompt: "> "}
}
func (self *JSRepl) Start() {
fmt.Println("Eth JavaScript console")
self.read()
}