Got all programs working, now adding unary not and neg
This commit is contained in:
24
main.cpp
24
main.cpp
@@ -32,10 +32,9 @@ For now I don't thing it should be overloadable.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
@todo
|
||||
[ ] - in new typesystem: Fix calls, fix other example programs
|
||||
[ ] - Operators: Bit negation, Not
|
||||
[ ] - Compiling and running a program
|
||||
[ ] - Passing down program to compile through command line
|
||||
[ ] - 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
|
||||
@@ -66,6 +65,7 @@ For now I don't thing it should be overloadable.
|
||||
[x] - Enums
|
||||
[x] - Initial for loop
|
||||
[x] - Enum . access to values
|
||||
[x] - in new typesystem: Fix calls, fix all example programs
|
||||
[x] - Fix arithmetic operations in new type system
|
||||
[x] - Init statements, different kinds [+=] [-=] etc.
|
||||
[x] - Struct calls
|
||||
@@ -104,20 +104,20 @@ int main(){
|
||||
test_intern_table();
|
||||
|
||||
String result = {};
|
||||
#if 1
|
||||
// result = compile_file("globals.kl"_s);
|
||||
// printf("%s", result.str);
|
||||
// result = compile_file("enums.kl"_s);
|
||||
// printf("%s", result.str);
|
||||
// result = compile_file("order1.kl"_s);
|
||||
// printf("%s", result.str);
|
||||
// result = compile_file("lambdas.kl"_s);
|
||||
// printf("%s", result.str);
|
||||
#if 0
|
||||
result = compile_file("globals.kl"_s);
|
||||
printf("%s", result.str);
|
||||
result = compile_file("enums.kl"_s);
|
||||
printf("%s", result.str);
|
||||
result = compile_file("order1.kl"_s);
|
||||
printf("%s", result.str);
|
||||
result = compile_file("order2.kl"_s);
|
||||
printf("%s", result.str);
|
||||
result = compile_file("new_types.kl"_s);
|
||||
result = compile_file("lambdas.kl"_s);
|
||||
printf("%s", result.str);
|
||||
#endif
|
||||
result = compile_file("new_types.kl"_s);
|
||||
printf("%s", result.str);
|
||||
|
||||
// result = compile_file("lexer.kl"_s);
|
||||
// FILE *f = fopen("program.c", "w");
|
||||
|
||||
Reference in New Issue
Block a user