Merge pull request #7094 from ethereum/isoltest-arrow-optional

[isoltest] Introduce shorthand declaration: make `->` optional.
This commit is contained in:
chriseth
2019-08-01 15:42:42 +02:00
committed by GitHub
6 changed files with 57 additions and 19 deletions
+12 -4
View File
@@ -95,11 +95,19 @@ vector<dev::solidity::test::FunctionCall> TestFileParser::parseFunctionCalls(siz
m_lineNumber++;
}
expect(Token::Arrow);
call.expectations = parseFunctionCallExpectations();
if (accept(Token::Arrow, true))
{
call.omitsArrow = false;
call.expectations = parseFunctionCallExpectations();
if (accept(Token::Newline, true))
m_lineNumber++;
}
else
{
call.expectations.failure = false;
call.displayMode = FunctionCall::DisplayMode::SingleLine;
}
if (accept(Token::Newline, true))
m_lineNumber++;
call.expectations.comment = parseComment();
if (call.signature == "constructor()")