1
0
Fork 0

Add type-checking for the majority of language features

This commit is contained in:
Vili Sinervä 2025-02-04 17:07:41 +02:00
parent b0420a9a5f
commit dc9cfcd211
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996
4 changed files with 145 additions and 14 deletions

View file

@ -51,7 +51,9 @@ impl<'source> SymTab<'source, Type> {
(">", Func(vec![Int, Int], Box::new(Bool))),
(">=", Func(vec![Int, Int], Box::new(Bool))),
("not", Func(vec![Bool], Box::new(Bool))),
("neg", Func(vec![Bool], Box::new(Bool))),
("neg", Func(vec![Int], Box::new(Int))),
("or", Func(vec![Bool, Bool], Box::new(Bool))),
("and", Func(vec![Bool, Bool], Box::new(Bool))),
]);
SymTab {