From f8c42a53c62ef3f280a48aed054674d80b888ccf Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 29 Jan 2025 02:35:55 -0500 Subject: [PATCH] Fix for parse_function_after_name suffix specifier macro --- base/components/parser.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/base/components/parser.cpp b/base/components/parser.cpp index 57e244a..a41267c 100644 --- a/base/components/parser.cpp +++ b/base/components/parser.cpp @@ -1388,9 +1388,18 @@ CodeFn parse_function_after_name( CodeParams params = parse_params(parser_use_parenthesis); // ( ) + Code suffix_specs = NullCode; + // TODO(Ed), Review old comment : These have to be kept separate from the return type's specifiers. while ( left && tok_is_specifier(currtok) ) { + // For Unreal's PURE_VIRTUAL Support + Macro* macro = lookup_macro( currtok.Text ); + if (macro && tok_is_specifier(currtok)) + { + suffix_specs = parse_simple_preprocess(Tok_Preprocess_Macro_Expr); + continue; + } if ( specifiers == nullptr ) { specifiers = def_specifier( str_to_specifier( currtok.Text) ); @@ -1403,18 +1412,6 @@ CodeFn parse_function_after_name( } // ( ) - Code suffix_specs = NullCode; - - // For Unreal's PURE_VIRTUAL Support - if ( left ) - { - Macro* macro = lookup_macro( currtok.Text ); - if (macro && tok_is_specifier(currtok)) - { - suffix_specs = parse_simple_preprocess(Tok_Preprocess_Macro_Expr); - } - } - CodeBody body = NullCode; CodeComment inline_cmt = NullCode; if ( check( Tok_BraceCurly_Open ) )