lots o fixes
Some checks failed
Build / build (push) Successful in 9m50s
Publish Image / publish (push) Failing after 49s
Test / build (push) Successful in 10m55s

This commit is contained in:
2024-04-01 18:18:45 -04:00
parent fe33fda0ab
commit 862119e90e
44 changed files with 326 additions and 170 deletions

10
repl.go
View File

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