lots o fixes
This commit is contained in:
10
repl.go
10
repl.go
@@ -20,8 +20,9 @@ import (
|
||||
// Package repl implements the Read-Eval-Print-Loop or interactive console
|
||||
// by lexing, parsing and evaluating the input in the interpreter
|
||||
|
||||
func VmREPL(args []string, debug, trace bool) error {
|
||||
var state = vm.NewVMState()
|
||||
// REPL provides a read-eval-print loop for the monkey virtual machine.
|
||||
func REPL(args []string, debug, trace bool) error {
|
||||
var state = vm.NewState()
|
||||
|
||||
object.Args = args
|
||||
|
||||
@@ -142,9 +143,10 @@ func acceptUntil(t *term.Terminal, start, end string) (string, error) {
|
||||
return buf.String(), nil
|
||||
}
|
||||
|
||||
func SimpleVmREPL(args []string, debug, trace bool) {
|
||||
// SimpleREPL provides a simple read-eval-print loop for the monkey virtual machine.
|
||||
func SimpleREPL(args []string, debug, trace bool) {
|
||||
var (
|
||||
state = vm.NewVMState()
|
||||
state = vm.NewState()
|
||||
reader = bufio.NewReader(os.Stdin)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user