added unit function

This commit is contained in:
Andrew Segavac
2021-05-30 10:02:58 -06:00
parent b82566f710
commit 318745ddf3
2 changed files with 10 additions and 1 deletions

View File

@@ -23,6 +23,10 @@ fn i_hate_this(a: F64): F64 {
}; };
} }
fn unit_function() {
let a: I32 = 4;
}
fn main(): I32 { fn main(): I32 {
add(4, subtract(5, 2)) add(4, subtract(5, 2))
} }

View File

@@ -28,14 +28,19 @@ class TypeUsage:
arguments: Optional[List[Type]] # Specified if it is a function, this is how you tell if it's a function arguments: Optional[List[Type]] # Specified if it is a function, this is how you tell if it's a function
if / match return never if all blocks return never;
blocks propagate never except at the function level;
TODO: TODO:
* ~Float Literals~ * ~Float Literals~
* ~Block expression~ * ~Block expression~
* Return keyword * ~Return keyword ~
* Structs * Structs
* Generics * Generics
* Enums * Enums
* Methods * Methods
* Arrays
* Strings
* Traits * Traits
* Async * Async