Add ability to hide definition in code generator

This commit is contained in:
Jonathan Müller 2017-04-06 12:17:04 +02:00
commit 33cff49a20
2 changed files with 42 additions and 28 deletions

View file

@ -211,7 +211,7 @@ namespace
detail::write_type(output, e.underlying_type(), "");
}
if (e.is_definition())
if (output.generate_definition() && e.is_definition())
{
output << punctuation("{");
output.indent();
@ -295,7 +295,7 @@ namespace
if (c.is_final())
output << whitespace << keyword("final");
if (c.is_declaration())
if (!output.generate_definition() || c.is_declaration())
output << punctuation(";") << newl;
else
{