diff --git a/project/components/parser.cpp b/project/components/parser.cpp index afc37aa..796a182 100644 --- a/project/components/parser.cpp +++ b/project/components/parser.cpp @@ -169,6 +169,12 @@ if ( def.Ptr == nullptr ) \ # define eat( Type_ ) Context.Tokens.__eat( Type_ ) # 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( Type_ ) ( left && currtok.Type == Type_ ) @@ -5357,3 +5363,7 @@ CodeVar parse_variable() // namespace parser } + +#ifdef CHECK_WAS_DEFINED +#pragma pop_macro("check") +#endif diff --git a/project/dependencies/macros.hpp b/project/dependencies/macros.hpp index f70b2b0..2896e7b 100644 --- a/project/dependencies/macros.hpp +++ b/project/dependencies/macros.hpp @@ -150,4 +150,20 @@ # 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