deskc_dson/
lib.rs

1#[derive(Clone, Debug, PartialEq)]
2pub enum Literal {
3    String(String),
4    Int(i64),
5    Rational(i64, i64),
6    Float(f64),
7    Hole,
8}
9
10#[derive(Clone, Debug, PartialEq)]
11pub enum Dson {
12    Literal(Literal),
13    Product(Vec<Self>),
14    Array(Vec<Self>),
15    Set(Vec<Self>),
16    Attr { attr: Box<Self>, expr: Box<Self> },
17    Labeled { label: String, expr: Box<Self> },
18}