Fix for parse_function_after_name suffix specifier macro

This commit is contained in:
Edward R. Gonzalez 2025-01-29 02:35:55 -05:00
parent eca538c6af
commit f8c42a53c6

View File

@ -1388,9 +1388,18 @@ CodeFn parse_function_after_name(
CodeParams params = parse_params(parser_use_parenthesis);
// <Attributes> <Specifiers> <ReturnType> <Name> ( <Parameters> )
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(
}
// <Attributes> <Specifiers> <ReturnType> <Name> ( <Paraemters> ) <Specifiers>
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 ) )