From aee04a533ba11f23ffb50503664f70d86c508ec7 Mon Sep 17 00:00:00 2001 From: paxcut Date: Tue, 8 Jul 2025 17:29:33 -0700 Subject: [PATCH] fix: bitmap arrays were not being set to their proper type in parser --- lib/source/pl/core/parser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/source/pl/core/parser.cpp b/lib/source/pl/core/parser.cpp index 35597210..2d2ab26f 100644 --- a/lib/source/pl/core/parser.cpp +++ b/lib/source/pl/core/parser.cpp @@ -2211,6 +2211,7 @@ namespace pl::core { } else if (MATCHES(sequence(tkn::Literal::Identifier, tkn::Separator::LeftBracket) && sequence(tkn::Separator::LeftBracket))){ // (parseType) Identifier[[(parseMathematicalExpression)|(parseWhileStatement)]]; auto fieldName = getValue(-2).get(); + auto identifier = std::get_if(&((m_curr[-2]).value)); hlp::safe_unique_ptr size; if (sequence(tkn::Keyword::While, tkn::Separator::LeftParenthesis)) @@ -2225,7 +2226,8 @@ namespace pl::core { error("Expected ']' at end of array declaration, got {}.", getFormattedToken(0)); return nullptr; } - + if (identifier != nullptr) + identifier->setType(Token::Identifier::IdentifierType::PatternVariable); member = create(fieldName, std::move(type), std::move(size)); } else if (sequence(tkn::Literal::Identifier)) { // (parseType) Identifier;