use crate::catalog::CompSpec;
#[derive(Debug, Clone, PartialEq, Default)]
pub struct Doc {
pub directives: Vec<Directive>,
pub nodes: Vec<Node>,
}
#[derive(Debug, Clone, PartialEq)]
pub enum Directive {
Brand(Vec<BrandItem>),
BrandFile(String),
Title(String),
Lang(String),
}
#[derive(Debug, Clone, PartialEq)]
pub struct BrandItem {
pub key: String,
pub value: Option<String>,
}
#[derive(Debug, Clone, PartialEq)]
pub struct Node {
pub spec: &'static CompSpec,
pub args: Vec<Value>,
pub props: Vec<(&'static str, Value)>,
pub text: Option<String>,
pub children: Vec<Node>,
pub line: u32,
pub col: u32,
}
#[derive(Debug, Clone, PartialEq)]
pub enum Value {
Str(String),
Num(f64),
Bool(bool),
Pairs(Vec<(String, f64)>),
Nums(Vec<f64>),
Rows(Vec<Vec<String>>),
}