Add a language.kl module which should contain builtin stuff
This commit is contained in:
14
main.cpp
14
main.cpp
@@ -41,6 +41,11 @@ want to export all the symbols, we can namespace them optionally.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
@todo
|
||||
[ ] - 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
|
||||
[ ] - Implementing type Any
|
||||
[ ] - Runtime TypeInfo
|
||||
[ ] - Proper type Type support
|
||||
|
||||
[ ] - #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
|
||||
@@ -61,6 +66,7 @@ want to export all the symbols, we can namespace them optionally.
|
||||
[ ] - 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)
|
||||
@@ -74,7 +80,6 @@ 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
|
||||
@@ -177,6 +182,13 @@ int main(int argument_count, char **arguments){
|
||||
F64 total_time = os_time();
|
||||
begin_compilation();
|
||||
|
||||
{
|
||||
Ast_Module *module = ast_module(0, pctx->intern("language.kl"_s));
|
||||
pctx->language_base_module = module;
|
||||
register_ast_file(0, module->name, module, GLOBAL_IMPLICIT_LOAD);
|
||||
insert_builtin_types_into_scope(module);
|
||||
}
|
||||
|
||||
Ast_Module *module = add_module(0, pctx->intern(program_name));
|
||||
parse_all_modules();
|
||||
assert(module);
|
||||
|
||||
Reference in New Issue
Block a user