1
0
mirror of https://github.com/Ed94/gencpp.git synced 2025-07-07 14:15:44 -07:00

Add support for non Specifier enum SuffixSpecs in AST_Fn and parsing (Thanks Unreal)

This commit is contained in:
2025-01-29 01:29:55 -05:00
parent 16fc3fa379
commit ce2be411d7
7 changed files with 34 additions and 3 deletions

@ -1403,6 +1403,18 @@ 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 ) )
@ -1479,6 +1491,9 @@ CodeFn parse_function_after_name(
if ( specifiers )
result->Specs = specifiers;
if ( suffix_specs )
result->SuffixSpecs = suffix_specs;
result->ReturnType = ret_type;
if ( params )