stackr-rs 0.1.14

A stack-based interpreter to be embedded in your application. Heavily inspired by Forth.
Documentation
use super::*;

#[derive(Debug, PartialEq, Clone)]
pub enum StackValue {
    Address(Address),
    Value(Value),
}
impl From<f32> for StackValue {
    fn from(value: f32) -> Self {
        StackValue::Value(Value::Number(value))
    }
}
impl From<Address> for StackValue {
    fn from(value: Address) -> Self {
        StackValue::Address(value)
    }
}

impl From<&Address> for StackValue {
    fn from(value: &Address) -> Self {
        StackValue::Address(value.clone())
    }
}
impl From<Value> for StackValue {
    fn from(value: Value) -> Self {
        StackValue::Value(value)
    }
}