mirror of
https://github.com/Ed94/gencpp.git
synced 2024-11-10 02:54:53 -08:00
Base case for friend parse working.
This commit is contained in:
parent
472189a322
commit
855ba5a965
@ -483,7 +483,7 @@ namespace gen
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Friend:
|
case Friend:
|
||||||
result.append_fmt( "friend %s", entry( 0 )->to_string() );
|
result.append_fmt( "friend %s;", entry( 0 )->to_string() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Function:
|
case Function:
|
||||||
@ -4140,17 +4140,15 @@ namespace gen
|
|||||||
if ( expr )
|
if ( expr )
|
||||||
member->add_entry( expr );
|
member->add_entry( expr );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( member == Code::Invalid )
|
|
||||||
{
|
|
||||||
log_failure( "gen::parse_variable: failed to parse member" );
|
|
||||||
return Code::Invalid;
|
|
||||||
}
|
|
||||||
|
|
||||||
result->add_entry( member );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
eat( currtok.Type );
|
if ( member == Code::Invalid )
|
||||||
|
{
|
||||||
|
log_failure( "gen::parse_variable: failed to parse member" );
|
||||||
|
return Code::Invalid;
|
||||||
|
}
|
||||||
|
|
||||||
|
result->add_entry( member );
|
||||||
}
|
}
|
||||||
|
|
||||||
eat( TokType::BraceCurly_Close );
|
eat( TokType::BraceCurly_Close );
|
||||||
@ -4577,17 +4575,15 @@ namespace gen
|
|||||||
if ( expr )
|
if ( expr )
|
||||||
member->add_entry( expr );
|
member->add_entry( expr );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( member == Code::Invalid )
|
|
||||||
{
|
|
||||||
log_failure( "gen::parse_extern_link_body: failed to parse extern linkage member" );
|
|
||||||
return Code::Invalid;
|
|
||||||
}
|
|
||||||
|
|
||||||
result->add_entry( member );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
eat( currtok.Type );
|
if ( member == Code::Invalid )
|
||||||
|
{
|
||||||
|
log_failure( "gen::parse_extern_link_body: failed to parse extern linkage member" );
|
||||||
|
return Code::Invalid;
|
||||||
|
}
|
||||||
|
|
||||||
|
result->add_entry( member );
|
||||||
}
|
}
|
||||||
|
|
||||||
eat( TokType::BraceCurly_Close );
|
eat( TokType::BraceCurly_Close );
|
||||||
|
@ -88,7 +88,6 @@ u32 gen_sanity()
|
|||||||
gen_sanity_file.print_fmt("\n");
|
gen_sanity_file.print_fmt("\n");
|
||||||
|
|
||||||
// Friend
|
// Friend
|
||||||
if (0)
|
|
||||||
{
|
{
|
||||||
Code fwd = parse_class( code(
|
Code fwd = parse_class( code(
|
||||||
class TestFriendClass;
|
class TestFriendClass;
|
||||||
|
Loading…
Reference in New Issue
Block a user