reduce 'large macro' usage in ast.cpp and interface.cpp

Properly disabled GEN_DEBUG_TRAP in non-debug builds
This commit is contained in:
2024-12-12 11:35:50 -05:00
parent 633879d35f
commit 30dea2e9fd
7 changed files with 434 additions and 627 deletions

View File

@ -1,4 +1,6 @@
# define GEN_AST_BODY_CLASS_UNALLOWED_TYPES \
// These macros are used in the swtich cases are used within ast.cpp, inteface.upfront.cpp, parser.cpp
# define GEN_AST_BODY_CLASS_UNALLOWED_TYPES \
case CT_PlatformAttributes: \
case CT_Class_Body: \
case CT_Enum_Body: \
@ -13,7 +15,7 @@
case CT_Parameters: \
case CT_Specifiers: \
case CT_Struct_Body: \
case CT_Typename:
case CT_Typename
# define GEN_AST_BODY_STRUCT_UNALLOWED_TYPES GEN_AST_BODY_CLASS_UNALLOWED_TYPES
# define GEN_AST_BODY_FUNCTION_UNALLOWED_TYPES \
@ -37,7 +39,7 @@
case CT_Parameters: \
case CT_Specifiers: \
case CT_Struct_Body: \
case CT_Typename:
case CT_Typename
# define GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES \
case CT_Access_Public: \
@ -55,7 +57,7 @@
case CT_Parameters: \
case CT_Specifiers: \
case CT_Struct_Body: \
case CT_Typename:
case CT_Typename
# define GEN_AST_BODY_EXPORT_UNALLOWED_TYPES GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES
# define GEN_AST_BODY_EXTERN_LINKAGE_UNALLOWED_TYPES GEN_AST_BODY_GLOBAL_UNALLOWED_TYPES
@ -75,4 +77,4 @@
case CT_Parameters: \
case CT_Specifiers: \
case CT_Struct_Body: \
case CT_Typename:
case CT_Typename