Clean up
This commit is contained in:
parent
302bc9ce6c
commit
69458a138d
@ -1,6 +1,6 @@
|
|||||||
use std::io::{self, stdout, Write};
|
use std::io::{self, stdout, Write};
|
||||||
|
|
||||||
use crate::{Instruction, NativeFunctionError, Span, Value, Vm, VmError};
|
use crate::{Instruction, NativeFunctionError, Value, Vm, VmError};
|
||||||
|
|
||||||
pub fn panic(vm: &Vm, instruction: Instruction) -> Result<Option<Value>, VmError> {
|
pub fn panic(vm: &Vm, instruction: Instruction) -> Result<Option<Value>, VmError> {
|
||||||
let argument_count = instruction.c();
|
let argument_count = instruction.c();
|
||||||
|
@ -251,7 +251,7 @@ impl Clone for Value {
|
|||||||
Value::Function(function) => Value::Function(function.clone()),
|
Value::Function(function) => Value::Function(function.clone()),
|
||||||
Value::Integer(integer) => Value::Integer(*integer),
|
Value::Integer(integer) => Value::Integer(*integer),
|
||||||
Value::List(list) => Value::List(list.clone()),
|
Value::List(list) => Value::List(list.clone()),
|
||||||
Value::Range(range) => Value::Range(range.clone()),
|
Value::Range(range) => Value::Range(*range),
|
||||||
Value::String(string) => Value::String(string.clone()),
|
Value::String(string) => Value::String(string.clone()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -616,7 +616,7 @@ impl<'a> Vm<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
enum Register {
|
pub enum Register {
|
||||||
Empty,
|
Empty,
|
||||||
Value(Value),
|
Value(Value),
|
||||||
Pointer(Pointer),
|
Pointer(Pointer),
|
||||||
|
Loading…
Reference in New Issue
Block a user