1
0
Fork 0

Add initial tests for type checker

This commit is contained in:
Vili Sinervä 2025-02-04 16:09:05 +02:00
parent 50bc35753a
commit b0420a9a5f
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996
5 changed files with 280 additions and 33 deletions

View file

@ -1,5 +1,13 @@
use std::fmt;
#[derive(PartialEq, Debug)]
pub enum Type {
Int,
Bool,
Func(Vec<Type>, Box<Type>),
Unit,
}
#[derive(PartialEq, PartialOrd, Debug, Copy, Clone)]
pub enum Value {
Int(i64),