mirror of
https://github.com/Ed94/gencpp.git
synced 2024-11-10 02:54:53 -08:00
Fix for bug with comma separated declaration list vars
Known Bug: Inline comments are not printing now
This commit is contained in:
parent
b42b224c0d
commit
c1ab233686
@ -323,10 +323,10 @@ typedef Vector4 Quaternion;
|
|||||||
typedef struct Matrix
|
typedef struct Matrix
|
||||||
{
|
{
|
||||||
f32 m0, m4, m8, m12;
|
f32 m0, m4, m8, m12;
|
||||||
; // Matrix first row (4 components)
|
f32 m1, m5, m9, m13;
|
||||||
float m1, m5, m9, m13; // Matrix second row (4 components)
|
f32 m2, m6, m10, m14;
|
||||||
float m2, m6, m10, m14; // Matrix third row (4 components)
|
f32 m3, m7, m11, m15;
|
||||||
float m3, m7, m11, m15;
|
|
||||||
} Matrix;
|
} Matrix;
|
||||||
|
|
||||||
// Color, 4 components, R8G8B8A8 (32bit)
|
// Color, 4 components, R8G8B8A8 (32bit)
|
||||||
|
@ -150,10 +150,10 @@ typedef Vector4 Quaternion;
|
|||||||
typedef struct Matrix
|
typedef struct Matrix
|
||||||
{
|
{
|
||||||
f32 m0, m4, m8, m12;
|
f32 m0, m4, m8, m12;
|
||||||
; // Matrix first row (4 components)
|
f32 m1, m5, m9, m13;
|
||||||
float m1, m5, m9, m13; // Matrix second row (4 components)
|
f32 m2, m6, m10, m14;
|
||||||
float m2, m6, m10, m14; // Matrix third row (4 components)
|
f32 m3, m7, m11, m15;
|
||||||
float m3, m7, m11, m15;
|
|
||||||
} Matrix;
|
} Matrix;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3639,6 +3639,8 @@ CodeVar parse_variable_after_name(
|
|||||||
CodeVar next_var = NoCode;
|
CodeVar next_var = NoCode;
|
||||||
Token stmt_end = NullToken;
|
Token stmt_end = NullToken;
|
||||||
CodeComment inline_cmt = NoCode;
|
CodeComment inline_cmt = NoCode;
|
||||||
|
if ( type )
|
||||||
|
{
|
||||||
if ( currtok.Type == TokType::Comma )
|
if ( currtok.Type == TokType::Comma )
|
||||||
{
|
{
|
||||||
// Were dealing with a statement with more than one declaration
|
// Were dealing with a statement with more than one declaration
|
||||||
@ -3649,8 +3651,6 @@ CodeVar parse_variable_after_name(
|
|||||||
|
|
||||||
// If we're dealing with a "comma-procedding then we cannot expect a statement end or inline comment
|
// If we're dealing with a "comma-procedding then we cannot expect a statement end or inline comment
|
||||||
// Any comma procedding variable will not have a type provided so it can act as a indicator to skip this
|
// Any comma procedding variable will not have a type provided so it can act as a indicator to skip this
|
||||||
else if ( type )
|
|
||||||
{
|
|
||||||
Token stmt_end = currtok;
|
Token stmt_end = currtok;
|
||||||
eat( TokType::Statement_End );
|
eat( TokType::Statement_End );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user