Working on code in language, fixing bugs
This commit is contained in:
19
main.cpp
19
main.cpp
@@ -41,27 +41,30 @@ want to export all the symbols, we can namespace them optionally.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
@todo
|
||||
[ ] - #test construct that would gather all tests and run them on start of program or something
|
||||
[ ] - Error message when file not found
|
||||
[ ] - Foreign import that would link library
|
||||
[ ] - Better error messages when type difference
|
||||
[ ] - Kilobyte, Megabyte, Gigabyte
|
||||
[ ] - Mixing loads and imports leads to code duplication, is that what we want???
|
||||
[ ] - Fix field access, cant cast, cant index
|
||||
[ ] - Add parent_scope to Ast_Type
|
||||
[ ] - Add parent_scope to Ast_Type, Add name to Ast_Type?
|
||||
[ ] - Switch
|
||||
[ ] - Some way to take slice of data
|
||||
[ ] - Optional function renaming in codegen
|
||||
[ ] - Using in structs to embed members, then casting offsets to that embedded member
|
||||
[ ] - Type as a parameter to a function, alloc :: (size: U64, type: Type)
|
||||
|
||||
[ ] - Comma notation when declaring variables thing1, thing2: S32
|
||||
[ ] - Array of inferred size
|
||||
[ ] - Comma notation when declaring variables thing1, thing2: S32 :: probably want to unify it with var unpacking
|
||||
[ ] - Add single line lambda expressions
|
||||
[ ] - Ternary operator
|
||||
[ ] - Disable ability to parse inner structs, functions, constants etc. ?
|
||||
[ ] - Write up on order independent declarations
|
||||
|
||||
[ ] - Order independent declarations in structs ?
|
||||
[ ] - constructor => thing :: (i: S32) -> {i = i, thing = 10}
|
||||
[ ] - Casting to basic types by call S64(x)
|
||||
[ ] - Default values in structs??? Should compound stmts bring values from default values?? Maybe not? Whats the alternative
|
||||
[ ] - Type aliases :: should probably be strictly typed, but assigning constant values should work
|
||||
|
||||
@ideas
|
||||
[ ] - Var args using Any array - args: []Any - delete vargs
|
||||
@@ -71,8 +74,12 @@ want to export all the symbols, we can namespace them optionally.
|
||||
[ ] - Compound that zeros values - .{} , Compound that assumes defaults from struct definition - {}
|
||||
[ ] - Inject stack traces into the program
|
||||
[ ] - Conditional compilation #if
|
||||
[ ] - I would love for String, slice, Any etc. to have their struct declarations in source files, I also would want for stuff like string.str to work without weird special cases
|
||||
[ ] - Polymorphism - create declaration of a polymorphic thing, when it's called just copy it, replace types and typecheck normally, when someone calls again you just search for the instantiation again
|
||||
|
||||
@donzo
|
||||
[x] - Type aliases :: should probably be strictly typed, but assigning constant values should work
|
||||
[x] - Array of inferred size
|
||||
[x] - Casting pointers to and from void should be implicit
|
||||
[x] - Multiple return values
|
||||
[x] - Add c string
|
||||
@@ -146,14 +153,12 @@ want to export all the symbols, we can namespace them optionally.
|
||||
#include "typechecking.h"
|
||||
#include "typechecking.cpp"
|
||||
#include "ccodegen.cpp"
|
||||
#include "tests.cpp"
|
||||
|
||||
int main(int argument_count, char **arguments){
|
||||
|
||||
test_os_memory();
|
||||
thread_ctx_init();
|
||||
test_unicode();
|
||||
test_types();
|
||||
|
||||
map_test();
|
||||
test_array();
|
||||
@@ -178,7 +183,7 @@ int main(int argument_count, char **arguments){
|
||||
{
|
||||
Scratch scratch;
|
||||
F64 begin = os_time();
|
||||
String compiler_call = string_fmt(scratch, "clang.exe program.c -Wall -Wno-parentheses-equality -g -o a.exe -lgdi32 -luser32");
|
||||
String compiler_call = string_fmt(scratch, "clang.exe program.c -Wall -Wno-parentheses-equality -g -o a.exe -lgdi32 -luser32 -lwinmm");
|
||||
system((const char *)compiler_call.str);
|
||||
printf("\nclang = %f", os_time() - begin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user