mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix infinite loop when encountering unexpected test specifications
This commit is contained in:
@@ -550,6 +550,11 @@ void TestFileParser::Scanner::scanNextToken()
|
||||
token = selectToken(Token::Whitespace);
|
||||
else if (isEndOfLine())
|
||||
token = selectToken(Token::EOS);
|
||||
else
|
||||
throw Error(
|
||||
Error::Type::ParserError,
|
||||
"Unexpected character: '" + string{current()} + "'"
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user