Rearrange # flags, Add Windows.kl

This commit is contained in:
Krzosa Karol
2022-06-12 19:41:31 +02:00
parent cd29798c1d
commit 31c2c00452
6 changed files with 24 additions and 52 deletions

View File

@@ -31,50 +31,6 @@ For now I don't thing it should be overloadable.
-------------------------------------------------------------------------------
Type resolution cases
CONST :: expr - dont need to handle
make new symbol
val := expr (1)
convert untyped to typed default
check bounds
make new symbol
call(default:type = expr) (1)
val: type = expr (1)
convert untyped to typed based on type
make sure expr.type == type
check bounds
expr == expr (2)
expr * expr (2)
make sure compatible types, floats with ints are ok(convert to float)
if only one of them is typed convert the untyped to typed
if both types typed make sure they are the same
check bounds
!expr
make sure correct type
return bool
compound(expr)
call(expr, expr)
convert untyped to matching typed
check if types match
cast(expr: type)
convert from untyped to typed
convert between typed to other typed
check if types compatible
Stmt:
Return - Expression should match lambda return type
Expr:
Lambda - Arguments, default values should match type
ArrayT - Should match type int and be constant or not at all
Call - Arguments should match type
@todo
[ ] - Should compound resolution use an algorithm to reorder compounds to initialize all fields in order
@@ -82,7 +38,10 @@ Expr:
[ ] - Add c string
[ ] - Some way to take slice of data
[ ] - slices should be properly displayed in debugger
[ ] - Rewrite where # happen,
[ ] - cast ->
[ ] - #assert that handles constants at compile time and vars at runtime
[ ] - Comma notation when declaring variables thing1, thing2: S32
[ ] - Array of inferred size
[ ] - Add single line lambda expressions
@@ -90,6 +49,7 @@ Expr:
[ ] - Disable ability to parse inner structs, functions, constants etc. ?
[ ] - Write up on order independent declarations
[ ] - 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
@@ -101,7 +61,6 @@ Expr:
[ ] - 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.
[ ] - Conditional compilation #if
@donzo