Allows struct array in soltest function.

This commit is contained in:
Erik Kundt
2019-03-11 14:36:16 +01:00
committed by Daniel Kirchner
parent 4d8c57006b
commit cd9c0914cb
3 changed files with 28 additions and 3 deletions
+10 -3
View File
@@ -318,10 +318,8 @@ string TestFileParser::parseIdentifierOrTuple()
{
string identOrTuple;
if (accept(Token::Identifier))
auto parseArrayDimensions = [&]()
{
identOrTuple = m_scanner.currentLiteral();
expect(Token::Identifier);
while (accept(Token::LBrack))
{
identOrTuple += formatToken(Token::LBrack);
@@ -331,6 +329,13 @@ string TestFileParser::parseIdentifierOrTuple()
identOrTuple += formatToken(Token::RBrack);
expect(Token::RBrack);
}
};
if (accept(Token::Identifier))
{
identOrTuple = m_scanner.currentLiteral();
expect(Token::Identifier);
parseArrayDimensions();
return identOrTuple;
}
expect(Token::LParen);
@@ -345,6 +350,8 @@ string TestFileParser::parseIdentifierOrTuple()
}
expect(Token::RParen);
identOrTuple += formatToken(Token::RParen);
parseArrayDimensions();
return identOrTuple;
}