Inline ast_module constructor
This commit is contained in:
14
ast.cpp
14
ast.cpp
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user