dkernel_card/flat_node.rs
1use std::collections::HashMap;
2
3use hir::expr::Expr;
4use uuid::Uuid;
5
6use crate::{content::Content, AttributeKey};
7
8pub type Attributes = HashMap<AttributeKey, Expr>;
9
10#[derive(Clone, Debug, PartialEq, Eq)]
11pub struct FlatNode {
12 /// The content of the node.
13 pub content: Content,
14 pub children: Vec<NodeRef>,
15 pub attributes: Attributes,
16}
17
18#[derive(Clone, Debug, PartialEq, Eq)]
19pub enum NodeRef {
20 Hole,
21 Node(Uuid),
22}