1#![doc = include_str!("readme.md")]
2#[derive(Debug, Clone, PartialEq, Eq)]
4pub struct AplRoot {
5 pub items: Vec<AplItem>,
7}
8
9impl AplRoot {
10 pub fn new(items: Vec<AplItem>) -> Self {
12 Self { items }
13 }
14
15 pub fn items(&self) -> &[AplItem] {
17 &self.items
18 }
19}
20
21#[derive(Debug, Clone, PartialEq, Eq)]
23pub enum AplItem {
24 Assignment(AplAssignment),
26 Expression(String),
28}
29
30#[derive(Debug, Clone, PartialEq, Eq)]
32pub struct AplAssignment {
33 pub name: String,
35 pub expression: String,
37}
38
39impl AplAssignment {
40 pub fn new(name: String, expression: String) -> Self {
42 Self { name, expression }
43 }
44}