package shell
import (
)
type editor interface {
ReadCode() (string, error)
RunAfterCommandHooks(src parse.Source, duration float64, err error)
}
type minEditor struct {
in *bufio.Reader
out io.Writer
}
func (, *os.File) *minEditor {
return &minEditor{bufio.NewReader(), }
}
func ( *minEditor) ( parse.Source, float64, error) {
}
func ( *minEditor) () (string, error) {
, := os.Getwd()
if != nil {
= "?"
}
fmt.Fprintf(.out, "%s> ", )
, := .in.ReadString('\n')
return strutil.ChopLineEnding(),
}