From c1ab233686688720422ce06fe5bfde2b69a367af Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 25 Oct 2023 21:43:02 -0400 Subject: [PATCH] Fix for bug with comma separated declaration list vars Known Bug: Inline comments are not printing now --- .../dependencies/raylib/include/raylib.h | 8 ++++---- .../dependencies/raylib/include/raymath.h | 8 ++++---- project/components/interface.parsing.cpp | 20 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/project/auxillary/vis_ast/dependencies/raylib/include/raylib.h b/project/auxillary/vis_ast/dependencies/raylib/include/raylib.h index b9abaf6..8ee6313 100644 --- a/project/auxillary/vis_ast/dependencies/raylib/include/raylib.h +++ b/project/auxillary/vis_ast/dependencies/raylib/include/raylib.h @@ -323,10 +323,10 @@ typedef Vector4 Quaternion; typedef struct Matrix { f32 m0, m4, m8, m12; - ; // Matrix first row (4 components) - float m1, m5, m9, m13; // Matrix second row (4 components) - float m2, m6, m10, m14; // Matrix third row (4 components) - float m3, m7, m11, m15; + f32 m1, m5, m9, m13; + f32 m2, m6, m10, m14; + f32 m3, m7, m11, m15; + } Matrix; // Color, 4 components, R8G8B8A8 (32bit) diff --git a/project/auxillary/vis_ast/dependencies/raylib/include/raymath.h b/project/auxillary/vis_ast/dependencies/raylib/include/raymath.h index 3b684c1..94da9b5 100644 --- a/project/auxillary/vis_ast/dependencies/raylib/include/raymath.h +++ b/project/auxillary/vis_ast/dependencies/raylib/include/raymath.h @@ -150,10 +150,10 @@ typedef Vector4 Quaternion; typedef struct Matrix { f32 m0, m4, m8, m12; - ; // Matrix first row (4 components) - float m1, m5, m9, m13; // Matrix second row (4 components) - float m2, m6, m10, m14; // Matrix third row (4 components) - float m3, m7, m11, m15; + f32 m1, m5, m9, m13; + f32 m2, m6, m10, m14; + f32 m3, m7, m11, m15; + } Matrix; #endif diff --git a/project/components/interface.parsing.cpp b/project/components/interface.parsing.cpp index cbf90ef..0ada216 100644 --- a/project/components/interface.parsing.cpp +++ b/project/components/interface.parsing.cpp @@ -3639,18 +3639,18 @@ CodeVar parse_variable_after_name( CodeVar next_var = NoCode; Token stmt_end = NullToken; CodeComment inline_cmt = NoCode; - if ( currtok.Type == TokType::Comma ) + if ( type ) { - // Were dealing with a statement with more than one declaration - // This is only handled this way if its the first declaration - // Otherwise its looped through in parse_variable_declaration_list - next_var = parse_variable_declaration_list(); - } + if ( currtok.Type == TokType::Comma ) + { + // Were dealing with a statement with more than one declaration + // This is only handled this way if its the first declaration + // Otherwise its looped through in parse_variable_declaration_list + next_var = parse_variable_declaration_list(); + } - // 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 - else if ( type ) - { + // 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 Token stmt_end = currtok; eat( TokType::Statement_End );