#![doc = include_str!("readme.md")]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AplRoot {
pub items: Vec<AplItem>,
}
impl AplRoot {
pub fn new(items: Vec<AplItem>) -> Self {
Self { items }
}
pub fn items(&self) -> &[AplItem] {
&self.items
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum AplItem {
Assignment(AplAssignment),
Expression(String),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AplAssignment {
pub name: String,
pub expression: String,
}
impl AplAssignment {
pub fn new(name: String, expression: String) -> Self {
Self { name, expression }
}
}