New concept of AST_MODULE, Ast_File and Ast_Module are now both scopes.

Concept of loading and importing.
This commit is contained in:
Krzosa Karol
2022-06-13 13:39:31 +02:00
parent 8bd5e9638f
commit bcd825c154
8 changed files with 132 additions and 75 deletions

View File

@@ -172,20 +172,11 @@ int main(int argument_count, char **arguments){
system((const char *)run_program.str);
}
#else
// Scratch scratch;
// Array<String> files = {scratch};
// files.add("lambdas.kl"_s);
// files.add("order1.kl"_s);
// files.add("order2.kl"_s);
// files.add("new_types.kl"_s);
// files.add("enums.kl"_s);
// files.add("Windows.kl"_s);
// files.add("euler.kl"_s);
// String result = compile_files(files);
F64 total_time = os_time();
begin_compilation();
Ast_Module *module = parse_module("Windows.kl"_s);
add_module(pctx->intern("order1.kl"_s));
Ast_Module *module = add_module(pctx->intern("Windows.kl"_s));
parse_all_modules();
assert(module);
resolve_everything_in_module(module);
String result = end_compilation();