use crate::expr::{Boolean, Expr, Match};
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum SelectBy {
Get,
Sum,
Product,
}
#[derive(Clone, Debug, PartialEq)]
pub enum VarKind {
State(Option<Expr>, Option<Expr>),
Derived(Vec<(Boolean, Expr)>, Option<Expr>),
Select(SelectBy, Match),
}
#[derive(Clone, Debug, PartialEq)]
pub struct Variable {
pub name: String,
pub exposure: Option<String>,
pub dimension: String,
pub kind: VarKind,
}
impl Variable {
pub fn new(n: &str, e: &Option<String>, d: &str, k: &VarKind) -> Self {
Variable {
name: n.to_string(),
exposure: e.clone(),
dimension: d.to_string(),
kind: k.clone(),
}
}
}