use crate::attribute::Attribute;
use syn::{punctuated::Punctuated, token, Expr, Ident, Pat, Path};
pub struct Node {
pub name: Path,
pub args: Punctuated<Expr, token::Comma>,
pub attributes: Vec<Attribute>,
pub style: Option<Expr>,
pub children: Vec<Content>,
}
pub enum Content {
Widget(Node),
Slot(Ident, Box<Self>),
If(IfBlock),
For(ForBlock),
Expr(Expr),
}
pub struct IfBlock {
pub condition: Expr,
pub then_branch: Vec<Content>,
pub else_branch: Option<Vec<Content>>,
}
pub struct ForBlock {
pub pat: Pat,
pub expr: Expr,
pub body: Vec<Content>,
}
pub struct Markup {
pub root: Node,
}