Fixing type checking

This commit is contained in:
Krzosa Karol
2022-06-06 22:14:30 +02:00
parent d042251c21
commit 729e7aee86
6 changed files with 219 additions and 205 deletions

View File

@@ -68,10 +68,17 @@ cast(expr: type)
convert between typed to other typed
check if types compatible
Stmt:
Return - Expression should match lambda return type
Expr:
Lambda - Arguments, default values should match type
ArrayT - Should match type int and be constant or not at all
Call - Arguments should match type
@todo
[ ] - Fix casting
[ ] - Make sure pointer arithmetic works
[ ] - Passing down program to compile through command line
[ ] - More for loop variations
[ ] - Write up on order independent declarations
@@ -160,7 +167,7 @@ int main(){
String result = {};
#if 0
#if 1
result = compile_file("globals.kl"_s);
printf("%s", result.str);
result = compile_file("enums.kl"_s);