Introduce notion of RuntimeValue
This commit is contained in:
parent
ec8ae05018
commit
0a2f06f598
@ -127,6 +127,24 @@ impl MemoryValue {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum RuntimeValue {
|
||||
Expression(Expression),
|
||||
Evaluated(Primitive),
|
||||
}
|
||||
|
||||
impl From<Expression> for RuntimeValue {
|
||||
fn from(expr: Expression) -> Self {
|
||||
Self::Expression(expr)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Primitive> for RuntimeValue {
|
||||
fn from(prim: Primitive) -> Self {
|
||||
Self::Evaluated(prim)
|
||||
}
|
||||
}
|
||||
|
||||
/// A fully-reduced value
|
||||
#[derive(Debug, Clone)]
|
||||
enum Primitive {
|
||||
|
Loading…
Reference in New Issue
Block a user