Formatting fixes

This commit is contained in:
2023-08-22 01:51:59 -04:00
parent a61a28b778
commit c4846dad26
13 changed files with 79 additions and 66 deletions

View File

@ -76,4 +76,3 @@
case Specifiers: \
case Struct_Body: \
case Typename:

View File

@ -541,4 +541,5 @@ struct AST_Var
char _PAD_UNUSED_[ sizeof(u32) ];
};
static_assert( sizeof(AST_Var) == sizeof(AST), "ERROR: AST_Var is not the same size as AST");
#pragma endregion AST Types

View File

@ -1,6 +1,6 @@
#pragma once
// This file was generated automatially by gen.bootstrap.cpp (See: https://github.com/Ed94/gencpp)
#pragma once
#pragma region generated code inline implementation
char const* Code::debug_str( void )

View File

@ -1,7 +1,7 @@
// This file was generated automatially by gen.bootstrap.cpp (See: https://github.com/Ed94/gencpp)
#pragma once
// This file was generated automatially by gen.bootstrap.cpp (See: https://github.com/Ed94/gencpp)
namespace ECode
{
enum Type : u32

View File

@ -1,7 +1,7 @@
// This file was generated automatially by gen.bootstrap.cpp (See: https://github.com/Ed94/gencpp)
#pragma once
// This file was generated automatially by gen.bootstrap.cpp (See: https://github.com/Ed94/gencpp)
namespace EOperator
{
enum Type : u32

View File

@ -1,7 +1,7 @@
// This file was generated automatially by gen.bootstrap.cpp (See: https://github.com/Ed94/gencpp)
#pragma once
// This file was generated automatially by gen.bootstrap.cpp (See: https://github.com/Ed94/gencpp)
namespace ESpecifier
{
enum Type : u32

View File

@ -401,6 +401,11 @@ namespace Parser
if ( token.Type == TokType::Preprocess_Else || token.Type == TokType::Preprocess_EndIf )
{
Tokens.append( token );
while ( left && current != '\n' )
{
move_forward();
}
move_forward();
continue;
}
@ -882,13 +887,13 @@ namespace Parser
}
else if ( current == '*' )
{
token.Type = TokType::Comment_Start;
token.Type = TokType::Comment_Start;
token.Length = 2;
Tokens.append( token );
Token content = { token.Text, 0, TokType::Comment, line, column, false };
move_forward();
// move_forward();
Token content = { scanner, 0, TokType::Comment, line, column, false };
content.Length++;
bool star = current == '*';
bool slash = scanner[1] == '/';
@ -902,13 +907,19 @@ namespace Parser
slash = scanner[1] == '/';
at_end = star && slash;
}
content.Length += 3;
Tokens.append( content );
Token end = { scanner, 2, TokType::Comment_End, line, column, false };
Tokens.append( end );
move_forward();
move_forward();
Tokens.append( end );
while ( left && current != '\n' )
{
move_forward();
}
move_forward();
continue;
}
}
@ -2288,7 +2299,7 @@ Code parse_simple_preprocess( Parser::TokType which )
tok.Length = ( (sptr)prevtok.Text + prevtok.Length ) - (sptr)tok.Text;
}
char const* content = str_fmt_buf( "%.*s\n", tok.Length, tok.Text );
char const* content = str_fmt_buf( "%.*s ", tok.Length, tok.Text );
Code result = untyped_str( to_str( content ) );
Context.Scope->Name = tok;

View File

@ -2255,5 +2255,4 @@ CodeBody def_union_body( s32 num, CodeUnion* codes )
# undef def_body_start
# undef def_body_code_array_start
#pragma endregion Upfront