fixes for unreal use

This commit is contained in:
Edward R. Gonzalez 2024-10-27 21:18:41 -04:00
parent 420f452d35
commit 0f2763a115
2 changed files with 26 additions and 0 deletions

View File

@ -169,6 +169,12 @@ if ( def.Ptr == nullptr ) \
# define eat( Type_ ) Context.Tokens.__eat( Type_ ) # define eat( Type_ ) Context.Tokens.__eat( Type_ )
# define left ( Context.Tokens.Arr.num() - Context.Tokens.Idx ) # define left ( Context.Tokens.Arr.num() - Context.Tokens.Idx )
#ifdef check
#define CHECK_WAS_DEFINED
#pragma push_macro("check")
#undef check
#endif
# define check_noskip( Type_ ) ( left && currtok_noskip.Type == Type_ ) # define check_noskip( Type_ ) ( left && currtok_noskip.Type == Type_ )
# define check( Type_ ) ( left && currtok.Type == Type_ ) # define check( Type_ ) ( left && currtok.Type == Type_ )
@ -5357,3 +5363,7 @@ CodeVar parse_variable()
// namespace parser // namespace parser
} }
#ifdef CHECK_WAS_DEFINED
#pragma pop_macro("check")
#endif

View File

@ -150,4 +150,20 @@
# endif # endif
#endif #endif
#ifndef neverinline
# ifdef GEN_COMPILER_MSVC
# define neverinline __declspec( noinline )
# elif defined(GEN_COMPILER_GCC)
# define neverinline __attribute__( ( __noinline__ ) )
# elif defined(GEN_COMPILER_CLANG)
# if __has_attribute(__always_inline__)
# define neverinline __attribute__( ( __noinline__ ) )
# else
# define neverinline
# endif
# else
# define neverinline
# endif
#endif
#pragma endregion Macros #pragma endregion Macros