More work on types

This commit is contained in:
Krzosa Karol
2022-06-03 16:06:33 +02:00
parent 14af46125d
commit 25820a0c5b
4 changed files with 53 additions and 38 deletions

View File

@@ -32,10 +32,10 @@ For now I don't thing it should be overloadable.
-------------------------------------------------------------------------------
@todo
[ ] - Test new operators, add constant eval for them
[ ] - in new typesystem: Fix calls, fix other example programs
[ ] - Compiling and running a program
[ ] - Passing down program to compile through command line
[ ] - More operators
[ ] - Operators: Bit negation, Not
[ ] - More for loop variations
[ ] - Fixing access to constants, in C we cant have constants inside of structs / functions so we need to rewrite the tree
[ ] - Default values in structs??? Should compound stmts bring values from default values?? Maybe not? Whats the alternative
@@ -58,6 +58,7 @@ For now I don't thing it should be overloadable.
[ ] - Rust like enum where you associate values(other structs) with keys
@donzo
[x] - Test new operators, add constant eval for them
[x] - lvalue, rvalue concept so we cant assign value to some arbitrary weird expression
[x] - Add basic support for floats
[x] - Add basic setup for new type system
@@ -65,6 +66,7 @@ For now I don't thing it should be overloadable.
[x] - Enums
[x] - Initial for loop
[x] - Enum . access to values
[x] - Fix arithmetic operations in new type system
[x] - Init statements, different kinds [+=] [-=] etc.
[x] - Struct calls
[x] - Default values in calls
@@ -111,8 +113,8 @@ int main(){
// printf("%s", result.str);
// result = compile_file("lambdas.kl"_s);
// printf("%s", result.str);
// result = compile_file("order2.kl"_s);
// printf("%s", result.str);
result = compile_file("order2.kl"_s);
printf("%s", result.str);
result = compile_file("new_types.kl"_s);
printf("%s", result.str);
#endif