Documentation ¶
Index ¶
Constants ¶
View Source
const MonkeyFace = `` /* 273-byte string literal not displayed */
MonkeyFace is the REPL's face of shock and horror when you encounter a parser error :D
View Source
const PROMPT = ">> "
PROMPT is the REPL prompt displayed for each input
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type REPL ¶
type REPL struct {
// contains filtered or unexported fields
}
func (*REPL) Eval ¶
func (r *REPL) Eval(f io.Reader) (env *object.Environment)
Eval parses and evalulates the program given by f and returns the resulting environment, any errors are printed to stderr
func (*REPL) Exec ¶
Exec parses, compiles and executes the program given by f and returns the resulting virtual machine, any errors are printed to stderr
func (*REPL) StartEvalLoop ¶
StartEvalLoop starts the REPL in a continious eval loop
type VMState ¶
type VMState struct {
// contains filtered or unexported fields
}
func NewVMState ¶
func NewVMState() *VMState
Click to show internal directories.
Click to hide internal directories.