mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-15 03:01:47 -07:00
Formatting fixes
This commit is contained in:
@ -76,4 +76,3 @@
|
||||
case Specifiers: \
|
||||
case Struct_Body: \
|
||||
case Typename:
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 )
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user