Exemple #1
0
func New() kit.ReplServer {

	return &server{
		interp: interp.New(),
		buf:    new(bytes.Buffer),
	}
}
Exemple #2
0
func TestInterpEval(t *testing.T) {

	interp := interp.New()
	interp.EvalAndWait(bytes.NewBufferString("1 2 `test` 2 dup true {1 2 3} rot"))
	interp.PrintStack()
	fmt.Println("stdout: ", interp.StdoutString())
	interp.EvalAndWait(bytes.NewBufferString(".s"))
}