Disable constants inside structures

This commit is contained in:
Krzosa Karol
2022-09-27 10:26:33 +02:00
parent fef98220ba
commit 3dd9fae080
3 changed files with 46 additions and 45 deletions

View File

@@ -57,50 +57,50 @@ For modules it's a bit different cause they should be distributed as valid.
-------------------------------------------------------------------------------
@todo
[ ] - Fix language_basics.kl string index error
[ ] - Split Bc into builder and interpreter
[ ] - Implement functions in the bytecode
- [ ] Split Bc into builder and interpreter
- [ ] Implement functions in the bytecode
[ ] - Probably need to give Ast_Expr a Value field, then I can express Type nicely
[ ] - 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
[ ] - Var args with Any
- [ ] Probably need to give Ast_Expr a Value field, then I can express Type nicely
- [ ] 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
- [ ] Var args with Any
[ ] - #test construct that would gather all tests and run them on start of program or something
[ ] - Foreign import that would link library
[ ] - Builtin dynamic arrays
[ ] - Kilobyte, Megabyte, Gigabyte
[ ] - Cast from array to pointer?
[ ] - Fix field access, cant cast, cant index
[ ] - Add parent_scope to Ast_Type, Add name to Ast_Type?
[ ] - 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
- [ ] #test construct that would gather all tests and run them on start of program or something
- [ ] Foreign import that would link library
- [ ] Builtin dynamic arrays
- [ ] Kilobyte, Megabyte, Gigabyte
- [ ] Cast from array to pointer?
- [ ] Fix field access, cant cast, cant index
- [ ] Add parent_scope to Ast_Type, Add name to Ast_Type?
- [ ] 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
[ ] - 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
- [ ] 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
[ ] - Consider changing syntax of scopes to use braces { }
[ ] - 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
- [ ] Consider changing syntax of scopes to use braces { }
- [ ] 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
@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
[ ] - Conditional compilation #if
[ ] - 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
- [ ] 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
- [ ] Conditional compilation #if
- [ ] 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
## Done
- [x] Fix language_basics.kl string index error
- [x] Type as a parameter to a function, alloc :: (size: U64, type: Type)
- [x] Add token information to instructions
- [-] Mixing loads and imports leads to code duplication, is that what we want???