Minor fixes to gencpp formatting

This commit is contained in:
2024-05-05 21:29:19 -04:00
parent 3641306ef2
commit 647d7ed9e3
3 changed files with 8 additions and 7 deletions
+1
View File
@@ -325,3 +325,4 @@ build.sh
*.raddbg
misc/featuregen/featuregen
codegen/build/gen_src.map
+1
View File
@@ -460,6 +460,7 @@ int gen_main()
}));
body.append(swapped_table);
body.append(fmt_newline);
// Right after is where the struct definitions were defined, we'll insert them here
body.append(def_pragma(txt("region TYPE_KINDS")));
body.append(fmt_newline);
+6 -7
View File
@@ -1522,12 +1522,6 @@ void CodeBody::to_string( String& result )
while ( left-- )
{
result.append_fmt( "%S", curr.to_string() );
if (left > 1) switch (ast->Type)
{
case ECode::Enum_Body:
result.append("\n");
}
++curr;
}
}
@@ -10706,8 +10700,13 @@ namespace parser
// <Name> = <Expression> <Macro>,
}
entry.Length = ( (sptr)prevtok.Text + prevtok.Length ) - (sptr)entry.Text;
// Consume inline comments
if ( currtok.Type == TokType::Comment && prevtok.Line == currtok.Line )
{
eat( TokType::Comment );
}
entry.Length = ( (sptr)prevtok.Text + prevtok.Length ) - (sptr)entry.Text;
member = untyped_str( entry );
break;
}