2024-04-13 13:18:57 -07:00
|
|
|
|
#define GEN_DEFINE_LIBRARY_CODE_CONSTANTS
|
|
|
|
|
#define GEN_ENFORCE_STRONG_CODE_TYPES
|
|
|
|
|
#define GEN_EXPOSE_BACKEND
|
|
|
|
|
// #define GEN_DEFINE_ATTRIBUTE_TOKENS
|
|
|
|
|
#define GEN_IMPLEMENTATION
|
|
|
|
|
#include "gen.cpp"
|
|
|
|
|
#include "gen.builder.cpp"
|
2024-04-14 18:51:14 -07:00
|
|
|
|
#include "gen.scanner.hpp"
|
2024-04-13 13:18:57 -07:00
|
|
|
|
using namespace gen;
|
|
|
|
|
|
2024-04-14 18:51:14 -07:00
|
|
|
|
#include "GasaGenCommon.cpp"
|
2024-04-16 02:02:58 -07:00
|
|
|
|
#include "GasaGen_ue_parse_testing.cpp"
|
2024-04-14 18:51:14 -07:00
|
|
|
|
#include "GasaGen_UGasaAttributeSet.cpp"
|
2024-04-13 13:18:57 -07:00
|
|
|
|
|
|
|
|
|
int gen_main()
|
|
|
|
|
{
|
|
|
|
|
gen::init();
|
|
|
|
|
log_fmt("Generating code for the Gasa module");
|
|
|
|
|
|
2024-04-14 18:51:14 -07:00
|
|
|
|
// Initialize Globals
|
|
|
|
|
umeta_uclass = code_str( UCLASS() );
|
|
|
|
|
umeta_generated_body = code_str( GENERATED_BODY() );
|
|
|
|
|
gasa_api = code_str( GASA_API );
|
|
|
|
|
|
2024-04-16 02:02:58 -07:00
|
|
|
|
StrC str_GENERATED_BODY = txt("GENERATED_BODY(");
|
|
|
|
|
StrC str_GENERATED_UCLASS_BODY = txt("GENERATED_UCLASS_BODY(");
|
|
|
|
|
StrC str_PROPERTY_BINDING_IMPLEMENTATION = txt("PROPERTY_BINDING_IMPLEMENTATION(");
|
|
|
|
|
StrC str_UCLASS = txt("UCLASS(");
|
|
|
|
|
StrC str_UFUNCTION = txt("UFUNCTION(");
|
|
|
|
|
StrC str_UPROPERTY = txt("UPROPERTY(");
|
|
|
|
|
StrC str_DECLARE_LOG_CATEGORY_EXTERN = txt("DECLARE_LOG_CATEGORY_EXTERN(");
|
|
|
|
|
StrC str_ENUM_CLASS_FLAGS = txt("ENUM_CLASS_FLAGS(");
|
|
|
|
|
StrC str_DECLARE_CLASS = txt("DECLARE_CLASS(");
|
|
|
|
|
StrC str_DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL = txt("DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL(");
|
|
|
|
|
StrC str_TEXT = txt("TEXT(");
|
|
|
|
|
StrC str_DECLARE_MULTICAST_DELEGATE_OneParam = txt("DECLARE_MULTICAST_DELEGATE_OneParam(");
|
|
|
|
|
StrC str_DECLARE_MULTICAST_DELEGATE_TwoParams = txt("DECLARE_MULTICAST_DELEGATE_TwoParams(");
|
|
|
|
|
StrC str_DECLARE_MULTICAST_DELEGATE_ThreeParams = txt("DECLARE_MULTICAST_DELEGATE_ThreeParams(");
|
|
|
|
|
StrC str_DECLARE_DELEGATE_RetVal_OneParam = txt("DECLARE_DELEGATE_RetVal_OneParam(");
|
|
|
|
|
StrC str_DECLARE_FUNCTION = txt("DECLARE_FUNCTION(");
|
|
|
|
|
StrC str_RESULT_DECL = txt("RESULT_DECL");
|
2024-04-15 20:09:46 -07:00
|
|
|
|
StrC str_FORCEINLINE = txt("FORCEINLINE");
|
|
|
|
|
StrC str_UENUM = txt("UENUM(");
|
|
|
|
|
StrC str_UMETA = txt("UMETA(");
|
|
|
|
|
StrC str_DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_FiveParams = txt("DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_FiveParams(");
|
|
|
|
|
StrC str_DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_SevenParams = txt("DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_SevenParams(");
|
|
|
|
|
StrC str_DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_NineParams = txt("DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_NineParams(");
|
|
|
|
|
StrC str_DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_FourParams = txt("DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_FourParams(");
|
|
|
|
|
StrC str_DECLARE_DELEGATE_SixParams = txt("DECLARE_DELEGATE_SixParams(");
|
|
|
|
|
StrC str_DECLARE_EVENT_TwoParams = txt("DECLARE_EVENT_TwoParams(");
|
|
|
|
|
StrC str_DECLARE_DELEGATE_RetVal_ThreeParams = txt("DECLARE_DELEGATE_RetVal_ThreeParams(");
|
|
|
|
|
StrC str_PRAGMA_DISABLE_DEPRECATION_WARNINGS = txt("PRAGMA_DISABLE_DEPRECATION_WARNINGS");
|
|
|
|
|
StrC str_PRAGMA_ENABLE_DEPRECATION_WARNINGS = txt("PRAGMA_ENABLE_DEPRECATION_WARNINGS");
|
|
|
|
|
StrC str_DEFINE_ACTORDESC_TYPE = txt("DEFINE_ACTORDESC_TYPE(");
|
|
|
|
|
StrC str_DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams = txt("DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams(");
|
|
|
|
|
StrC str_DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_OneParam = txt("DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_OneParam(");
|
|
|
|
|
StrC str_UPARAM = txt("UPARAM(");
|
|
|
|
|
StrC str_FORCEINLINE_DEBUGGABLE = txt("FORCEINLINE_DEBUGGABLE");
|
2024-04-16 02:02:58 -07:00
|
|
|
|
StrC str_DECLARE_EVENT_ThreeParams = txt("DECLARE_EVENT_ThreeParams(");
|
|
|
|
|
StrC str_USTRUCT = txt("USTRUCT(");
|
|
|
|
|
StrC str_GENERATED_USTRUCT_BODY = txt("GENERATED_USTRUCT_BODY(");
|
|
|
|
|
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_GENERATED_BODY));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_GENERATED_UCLASS_BODY));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_PROPERTY_BINDING_IMPLEMENTATION));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_UCLASS));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_UFUNCTION));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_UPROPERTY));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_LOG_CATEGORY_EXTERN));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_ENUM_CLASS_FLAGS));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_CLASS));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_TEXT));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_MULTICAST_DELEGATE_OneParam));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_MULTICAST_DELEGATE_TwoParams));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_MULTICAST_DELEGATE_ThreeParams));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_DELEGATE_RetVal_OneParam));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_FUNCTION));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_RESULT_DECL));
|
2024-04-14 18:51:14 -07:00
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_FORCEINLINE));
|
2024-04-15 20:09:46 -07:00
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_UENUM));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_UMETA));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_FiveParams));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_SevenParams));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_NineParams));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_FourParams));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_DELEGATE_SixParams));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_EVENT_TwoParams));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_DELEGATE_RetVal_ThreeParams));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_PRAGMA_DISABLE_DEPRECATION_WARNINGS));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_PRAGMA_ENABLE_DEPRECATION_WARNINGS));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DEFINE_ACTORDESC_TYPE));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_OneParam));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_UPARAM));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_FORCEINLINE_DEBUGGABLE));
|
2024-04-16 02:02:58 -07:00
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_DECLARE_EVENT_ThreeParams));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_USTRUCT));
|
|
|
|
|
PreprocessorDefines.append( get_cached_string(str_GENERATED_USTRUCT_BODY));
|
2024-04-15 20:09:46 -07:00
|
|
|
|
|
2024-04-16 02:02:58 -07:00
|
|
|
|
ue_parse_testing();
|
2024-04-13 13:18:57 -07:00
|
|
|
|
|
2024-04-16 02:02:58 -07:00
|
|
|
|
StrC str_gasa_api = txt("GASA_API");
|
2024-04-14 18:51:14 -07:00
|
|
|
|
|
|
|
|
|
gen_UGasaAttributeSet();
|
2024-04-13 13:18:57 -07:00
|
|
|
|
return 0;
|
|
|
|
|
}
|