()
| 50 | } |
| 51 | |
| 52 | func (vm *VM) peekValue() *value { |
| 53 | item := vm.peek() |
| 54 | v, ok := item.(*value) |
| 55 | if !ok { |
| 56 | panic(errors.WithData(ErrType, "want", "Value", "got", fmt.Sprintf("%T", item))) |
| 57 | } |
| 58 | return v |
| 59 | } |
| 60 | |
| 61 | func opAmount(vm *VM) { |
| 62 | val := vm.peekValue() |