Skip to content

Commit

Permalink
Start implementing types
Browse files Browse the repository at this point in the history
  • Loading branch information
suhr committed Jan 20, 2020
1 parent bd41490 commit 87f7d66
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use pest_derive::Parser;

pub mod path;
pub mod expr;
pub mod types;
pub mod report;

#[derive(Parser)]
Expand Down
29 changes: 29 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
use crate::path::RzPath;

pub enum TypeExpr {
Top,
Bottom,

Bool,

Int,
U(usize, bool),
S(usize, bool),

Arr(Box<TypeExpr>, Box<TypeExpr>),
Str(Box<TypeExpr>),
// Seq(Box<TypeExpr>),

And(Vec<TypeExpr>),
Or(Vec<TypeExpr>),

Ref(RzPath),

Liq(Box<TypeExpr>, Vec<Pred>),
Size(Box<TypeExpr>),
Val(Value, Box<TypeExpr>),
}

pub enum Pred { }

pub enum Value { }

0 comments on commit 87f7d66

Please sign in to comment.