summaryrefslogtreecommitdiff
path: root/src/ast.rs
diff options
context:
space:
mode:
authorJJ2023-04-13 01:30:35 +0000
committerJJ2023-04-13 01:30:35 +0000
commit56f47bb2e5816de7630569a8825914d0620983cc (patch)
treecf413d589a389d3ddd8f9a9321aed7cb7d30c215 /src/ast.rs
parentfb1c4cd2b8e2efe4b03e8c93f2a69d712a96aff7 (diff)
subtyping wip
Diffstat (limited to 'src/ast.rs')
-rw-r--r--src/ast.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ast.rs b/src/ast.rs
index 0a2afdb..bf34d19 100644
--- a/src/ast.rs
+++ b/src/ast.rs
@@ -25,14 +25,15 @@ pub type Value = u64;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Type {
Empty,
+ Error,
Unit,
Boolean,
Natural,
Integer,
// Float,
// String,
- // Enum(Vec<Type>),
- // Record(Vec<Type>),
+ Enum(Vec<Type>),
+ Record(HashMap<Identifier, Type>),
Function{from: Box<Type>, to: Box<Type>},
}