File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2211,6 +2211,7 @@ namespace pl::core {
22112211 } else if (MATCHES (sequence (tkn::Literal::Identifier, tkn::Separator::LeftBracket) && sequence<Not>(tkn::Separator::LeftBracket))){
22122212 // (parseType) Identifier[[(parseMathematicalExpression)|(parseWhileStatement)]];
22132213 auto fieldName = getValue<Token::Identifier>(-2 ).get ();
2214+ auto identifier = std::get_if<Token::Identifier>(&((m_curr[-2 ]).value ));
22142215
22152216 hlp::safe_unique_ptr<ast::ASTNode> size;
22162217 if (sequence (tkn::Keyword::While, tkn::Separator::LeftParenthesis))
@@ -2225,7 +2226,8 @@ namespace pl::core {
22252226 error (" Expected ']' at end of array declaration, got {}." , getFormattedToken (0 ));
22262227 return nullptr ;
22272228 }
2228-
2229+ if (identifier != nullptr )
2230+ identifier->setType (Token::Identifier::IdentifierType::PatternVariable);
22292231 member = create<ast::ASTNodeBitfieldArrayVariableDecl>(fieldName, std::move (type), std::move (size));
22302232 } else if (sequence (tkn::Literal::Identifier)) {
22312233 // (parseType) Identifier;
You can’t perform that action at this time.
0 commit comments