Skip to content

Commit 87f7d66

Browse files
committed
Start implementing types
1 parent bd41490 commit 87f7d66

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use pest_derive::Parser;
44

55
pub mod path;
66
pub mod expr;
7+
pub mod types;
78
pub mod report;
89

910
#[derive(Parser)]

src/types.rs

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
use crate::path::RzPath;
2+
3+
pub enum TypeExpr {
4+
Top,
5+
Bottom,
6+
7+
Bool,
8+
9+
Int,
10+
U(usize, bool),
11+
S(usize, bool),
12+
13+
Arr(Box<TypeExpr>, Box<TypeExpr>),
14+
Str(Box<TypeExpr>),
15+
// Seq(Box<TypeExpr>),
16+
17+
And(Vec<TypeExpr>),
18+
Or(Vec<TypeExpr>),
19+
20+
Ref(RzPath),
21+
22+
Liq(Box<TypeExpr>, Vec<Pred>),
23+
Size(Box<TypeExpr>),
24+
Val(Value, Box<TypeExpr>),
25+
}
26+
27+
pub enum Pred { }
28+
29+
pub enum Value { }

0 commit comments

Comments
 (0)