(#594) Add #config to replace #defined; Restrict #defined within procedure bodies to remove race condition

This commit is contained in:
gingerBill
2020-05-13 23:29:06 +01:00
parent 14ce6d8ed8
commit 7c42d4ba75
4 changed files with 60 additions and 3 deletions

View File

@@ -1785,6 +1785,9 @@ Ast *parse_operand(AstFile *f, bool lhs) {
} else if (name.string == "defined") {
Ast *tag = ast_basic_directive(f, token, name.string);
return parse_call_expr(f, tag);
} else if (name.string == "config") {
Ast *tag = ast_basic_directive(f, token, name.string);
return parse_call_expr(f, tag);
} else if (name.string == "soa" || name.string == "simd") {
Ast *tag = ast_basic_directive(f, token, name.string);
Ast *original_type = parse_type(f);