pub fn to_opcode(value: u8) -> OpCode {
    match value {
        1 => OpCode::Constant,
        2 => OpCode::Add,
        3 => OpCode::Subtract,
        4 => OpCode::Multiply,
        5 => OpCode::Divide,
        6 => OpCode::EndFn,
        7 => OpCode::Call,
        8 => OpCode::CallImplicit,
        9 => OpCode::Function,
        10 => OpCode::Var,
        11 => OpCode::SetVar,
        12 => OpCode::GetVar,
        13 => OpCode::SetLocalVar,
        14 => OpCode::GetLocalVar,
        15 => OpCode::PopLocalVar,
        16 => OpCode::Jump,
        17 => OpCode::JumpNe,
        18 => OpCode::JumpNeR,
        19 => OpCode::Eq,
        20 => OpCode::Gt,
        21 => OpCode::Lt,
        22 => OpCode::Print,
        23 => OpCode::Dup,
        24 => OpCode::Swap,
        25 => OpCode::Drop,
        26 => OpCode::Rot,
        27 => OpCode::Over,
        28 => OpCode::Depth,
        29 => OpCode::Clear,
        30 => OpCode::StartList,
        31 => OpCode::EndList,
        32 => OpCode::StartHash,
        33 => OpCode::Shift,
        34 => OpCode::Yield,
        35 => OpCode::IsNull,
        36 => OpCode::IsList,
        37 => OpCode::IsCallable,
        38 => OpCode::IsShiftable,
        39 => OpCode::Open,
        40 => OpCode::Readline,
        41 => OpCode::Error,
        42 => OpCode::Return,
        43 => OpCode::Str,
        44 => OpCode::Int,
        45 => OpCode::Flt,
        46 => OpCode::Rand,
        255 => OpCode::Unknown,
        _ => OpCode::Unknown,
    }
}
/// Convert a byte to an opcode value.
Convert a byte to an opcode value.
Convert a byte to an opcode value .
pub fn to_opcode(value: u8) -> OpCode {
    match value {
        1 => OpCode::Constant,
        2 => OpCode::Add,
        3 => OpCode::Subtract,
        4 => OpCode::Multiply,
        5 => OpCode::Divide,
        6 => OpCode::EndFn,
        7 => OpCode::Call,
        8 => OpCode::CallImplicit,
        9 => OpCode::Function,
        10 => OpCode::Var,
        11 => OpCode::SetVar,
        12 => OpCode::GetVar,
        13 => OpCode::SetLocalVar,
        14 => OpCode::GetLocalVar,
        15 => OpCode::PopLocalVar,
        16 => OpCode::Jump,
        17 => OpCode::JumpNe,
        18 => OpCode::JumpNeR,
        19 => OpCode::Eq,
        20 => OpCode::Gt,
        21 => OpCode::Lt,
        22 => OpCode::Print,
        23 => OpCode::Dup,
        24 => OpCode::Swap,
        25 => OpCode::Drop,
        26 => OpCode::Rot,
        27 => OpCode::Over,
        28 => OpCode::Depth,
        29 => OpCode::Clear,
        30 => OpCode::StartList,
        31 => OpCode::EndList,
        32 => OpCode::StartHash,
        33 => OpCode::Shift,
        34 => OpCode::Yield,
        35 => OpCode::IsNull,
        36 => OpCode::IsList,
        37 => OpCode::IsCallable,
        38 => OpCode::IsShiftable,
        39 => OpCode::Open,
        40 => OpCode::Readline,
        41 => OpCode::Error,
        42 => OpCode::Return,
        43 => OpCode::Str,
        44 => OpCode::Int,
        45 => OpCode::Flt,
        46 => OpCode::Rand,
        255 => OpCode::Unknown,
        _ => OpCode::Unknown,
    }
}
pub fn to_opcode ( value : u8 ) -> OpCode { match value { 1 => OpCode :: Constant , 2 => OpCode :: Add , 3 => OpCode :: Subtract , 4 => OpCode :: Multiply , 5 => OpCode :: Divide , 6 => OpCode :: EndFn , 7 => OpCode :: Call , 8 => OpCode :: CallImplicit , 9 => OpCode :: Function , 10 => OpCode :: Var , 11 => OpCode :: SetVar , 12 => OpCode :: GetVar , 13 => OpCode :: SetLocalVar , 14 => OpCode :: GetLocalVar , 15 => OpCode :: PopLocalVar , 16 => OpCode :: Jump , 17 => OpCode :: JumpNe , 18 => OpCode :: JumpNeR , 19 => OpCode :: Eq , 20 => OpCode :: Gt , 21 => OpCode :: Lt , 22 => OpCode :: Print , 23 => OpCode :: Dup , 24 => OpCode :: Swap , 25 => OpCode :: Drop , 26 => OpCode :: Rot , 27 => OpCode :: Over , 28 => OpCode :: Depth , 29 => OpCode :: Clear , 30 => OpCode :: StartList , 31 => OpCode :: EndList , 32 => OpCode :: StartHash , 33 => OpCode :: Shift , 34 => OpCode :: Yield , 35 => OpCode :: IsNull , 36 => OpCode :: IsList , 37 => OpCode :: IsCallable , 38 => OpCode :: IsShiftable , 39 => OpCode :: Open , 40 => OpCode :: Readline , 41 => OpCode :: Error , 42 => OpCode :: Return , 43 => OpCode :: Str , 44 => OpCode :: Int , 45 => OpCode :: Flt , 46 => OpCode :: Rand , 255 => OpCode :: Unknown , _ => OpCode :: Unknown , } }
Convert a byte to an opcode value.
Convert a byte to an opcode value .
value
u8