summaryrefslogtreecommitdiff
path: root/src/ast/mod.rs
blob: 1fa7d23cecfa109c6a2bbc2b2b6047c97c9a12e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub mod convert;

type Ident = String;

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum Term {
    Epsilon,
    Bottom,
    Literal(String),
    Cat(Box<Term>, Box<Term>),
    Alt(Box<Term>, Box<Term>),
    Fix(Box<Term>), // Uses de Bruijn indices
    Variable(usize),
    Call(Ident, Vec<Term>),
}