Fix type complete not called properly
This commit is contained in:
40
main.cpp
40
main.cpp
@@ -100,13 +100,14 @@ Expr:
|
||||
[ ] - Type aliases :: should probably be strictly typed, but assigning constant values should work
|
||||
|
||||
@ideas
|
||||
[ ] - Var args using Any array - args: []Any - delete vargs
|
||||
[ ] - [Using] keyword that brings in the struct enviroment into current scope etc.
|
||||
[ ] - Constant arrays that evaluate fully at compile time
|
||||
[ ] - Rust like enum where you associate values(other structs) with keys
|
||||
[ ] - Compound that zeros values - .{} , Compound that assumes defaults from struct definition - {}
|
||||
[ ] - Inject stack traces into the program
|
||||
[ ] - Rewrite constants to embed lambda, types, structs etc.? ???
|
||||
[ ] - Var args using Any array - args: []Any - delete vargs
|
||||
[ ] - Rewrite constants to embed lambda, types, structs etc.
|
||||
[ ] - Conditional compilation #if
|
||||
|
||||
@donzo
|
||||
[x] - We need ++ -- operators
|
||||
@@ -175,21 +176,7 @@ int main(int argument_count, char **arguments){
|
||||
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("order2.kl"_s);
|
||||
printf("%s", result.str);
|
||||
result = compile_file("lambdas.kl"_s);
|
||||
printf("%s", result.str);
|
||||
result = compile_file("new_types.kl"_s);
|
||||
printf("%s", result.str);
|
||||
#endif
|
||||
|
||||
|
||||
if(argument_count > 1){
|
||||
Scratch scratch;
|
||||
@@ -197,13 +184,30 @@ int main(int argument_count, char **arguments){
|
||||
String c_filename = string_fmt(scratch, "%s.c", arguments[1]);
|
||||
String call = string_fmt(scratch, "clang.exe %s.c -g -o %s.exe && %s.exe", arguments[1], arguments[1], arguments[1]);
|
||||
|
||||
result = compile_file(name);
|
||||
String result = compile_file(name);
|
||||
FILE *f = fopen((const char *)c_filename.str, "w");
|
||||
assert(f);
|
||||
fprintf(f, "%.*s", (int)result.len, result.str);
|
||||
fclose(f);
|
||||
system((const char *)call.str);
|
||||
}
|
||||
else{
|
||||
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("order2.kl"_s);
|
||||
printf("%s", result.str);
|
||||
result = compile_file("lambdas.kl"_s);
|
||||
printf("%s", result.str);
|
||||
result = compile_file("new_types.kl"_s);
|
||||
printf("%s", result.str);
|
||||
#endif
|
||||
}
|
||||
|
||||
__debugbreak();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user