var type checking, fix importing, fix creating empty lists, repl command, dynamic stacks
This commit is contained in:
parent
f633a02c32
commit
5bcab07681
11 changed files with 407 additions and 284 deletions
|
|
@ -826,6 +826,10 @@ func (vm *VM) Call(v Value, args []Value) (Value, error) {
|
|||
return nil, errors.New(fmt.Sprintf("value is not a function (%s)", v.DebugString()))
|
||||
}
|
||||
|
||||
func (vm *VM) SetChunk(c *Chunk) {
|
||||
vm.chunk = c
|
||||
}
|
||||
|
||||
func (vm *VM) TryNextByte() (Bytecode, error) {
|
||||
if !vm.HasNext() {
|
||||
return 0, errors.New("there are no more instructions")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue