mirror of
				https://github.com/Ed94/gencpp.git
				synced 2025-11-03 23:36:12 -08:00 
			
		
		
		
	reduce 'large macro' usage in ast.cpp and interface.cpp
Properly disabled GEN_DEBUG_TRAP in non-debug builds
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user