From a61a28b778b7f864b44d6de3de84e915743492da Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 22 Aug 2023 00:40:38 -0400 Subject: [PATCH] Fixx to bitfield variables Related to https://github.com/Ed94/gencpp/issues/25 --- project/components/ast.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/components/ast.cpp b/project/components/ast.cpp index 0fd04f3..c3193b8 100644 --- a/project/components/ast.cpp +++ b/project/components/ast.cpp @@ -837,7 +837,7 @@ String AST::to_string() } if ( BitfieldSize ) - result.append_fmt( "%S : %S;\n", ValueType->to_string(), BitfieldSize->to_string() ); + result.append_fmt( "%S %S : %S;\n", ValueType->to_string(), Name, BitfieldSize->to_string() ); else if ( UnderlyingType->ArrExpr ) result.append_fmt( "%S %S[%S];\n", UnderlyingType->to_string(), Name, UnderlyingType->ArrExpr->to_string() );