mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Minor fixes to gencpp formatting
This commit is contained in:
@@ -325,3 +325,4 @@ build.sh
|
|||||||
*.raddbg
|
*.raddbg
|
||||||
|
|
||||||
misc/featuregen/featuregen
|
misc/featuregen/featuregen
|
||||||
|
codegen/build/gen_src.map
|
||||||
|
|||||||
@@ -460,6 +460,7 @@ int gen_main()
|
|||||||
}));
|
}));
|
||||||
body.append(swapped_table);
|
body.append(swapped_table);
|
||||||
body.append(fmt_newline);
|
body.append(fmt_newline);
|
||||||
|
|
||||||
// Right after is where the struct definitions were defined, we'll insert them here
|
// Right after is where the struct definitions were defined, we'll insert them here
|
||||||
body.append(def_pragma(txt("region TYPE_KINDS")));
|
body.append(def_pragma(txt("region TYPE_KINDS")));
|
||||||
body.append(fmt_newline);
|
body.append(fmt_newline);
|
||||||
|
|||||||
@@ -1522,12 +1522,6 @@ void CodeBody::to_string( String& result )
|
|||||||
while ( left-- )
|
while ( left-- )
|
||||||
{
|
{
|
||||||
result.append_fmt( "%S", curr.to_string() );
|
result.append_fmt( "%S", curr.to_string() );
|
||||||
|
|
||||||
if (left > 1) switch (ast->Type)
|
|
||||||
{
|
|
||||||
case ECode::Enum_Body:
|
|
||||||
result.append("\n");
|
|
||||||
}
|
|
||||||
++curr;
|
++curr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10706,8 +10700,13 @@ namespace parser
|
|||||||
// <Name> = <Expression> <Macro>,
|
// <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 );
|
member = untyped_str( entry );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user