mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Switch cases are not followed by colon
This commit is contained in:
parent
66eab1caf6
commit
db3d9e0416
@ -161,7 +161,6 @@ assembly::Case Parser::parseCase(bool _defaultCase)
|
||||
fatalParserError("Literal expected.");
|
||||
_case.value = make_shared<Literal>(std::move(boost::get<assembly::Literal>(statement)));
|
||||
}
|
||||
expectToken(Token::Colon);
|
||||
_case.body = parseBlock();
|
||||
_case.location.end = _case.body.location.end;
|
||||
return _case;
|
||||
|
@ -173,9 +173,9 @@ string AsmPrinter::operator()(Switch const& _switch)
|
||||
for (auto const& _case: _switch.cases)
|
||||
{
|
||||
if (!_case.value)
|
||||
out += "\ndefault: ";
|
||||
out += "\ndefault ";
|
||||
else
|
||||
out += "\ncase " + (*this)(*_case.value) + ": ";
|
||||
out += "\ncase " + (*this)(*_case.value) + " ";
|
||||
out += (*this)(_case.body);
|
||||
}
|
||||
return out;
|
||||
|
Loading…
Reference in New Issue
Block a user