Inline ast_module constructor

This commit is contained in:
Krzosa Karol
2022-06-27 10:11:12 +02:00
parent d8e5955010
commit 6644a2c5ae
2 changed files with 10 additions and 16 deletions

14
ast.cpp
View File

@@ -566,20 +566,6 @@ ast_module_namespace(Token *pos, Ast_Module *module, Intern_String name){
return result;
}
function Ast_Module *
ast_module(Token *pos, Intern_String filename){
AST_NEW(Module, MODULE, pos, 0);
result->parent_scope = 0;
result->kind = AST_MODULE;
result->name = filename;
result->module = result;
result->file = result;
result->all_loaded_files = {pctx->heap};
result->implicit_imports = {pctx->heap};
result->decls = {pctx->heap};
return result;
}
function Ast_Builtin *
ast_runtime_assert(Token *pos, Ast_Expr *expr, Intern_String message){
AST_NEW(Builtin, RUNTIME_ASSERT, pos, AST_EXPR);