Added conditional compilation and Const namespace with OS name

This commit is contained in:
Krzosa Karol
2022-10-08 10:02:50 +02:00
parent ed98572547
commit 15e4ebd682
13 changed files with 201 additions and 129 deletions

View File

@@ -342,7 +342,7 @@ function bool
gen_expr(Ast_Expr *ast){
switch(ast->kind){
CASE(IDENT, Atom){
if(node->resolved_decl->kind == AST_MODULE_NAMESPACE || node->resolved_decl->kind == AST_FILE_NAMESPACE)
if(node->resolved_decl->kind == AST_NAMESPACE)
return false;
if(node->resolved_decl->kind == AST_LAMBDA){
@@ -751,8 +751,7 @@ gen_ast(Ast *ast){
}
case AST_CONSTANT_ASSERT:
case AST_MODULE_NAMESPACE:
CASE(FILE_NAMESPACE, File_Namespace){unused(node); BREAK();}
case AST_NAMESPACE:break;
default: {
assert(is_flag_set(ast->flags, AST_EXPR));