From db3d9e0416e7ac69ddf13eb6e2fd4e0a35dd1a63 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 19 May 2017 17:54:55 +0100 Subject: Switch cases are not followed by colon --- libsolidity/inlineasm/AsmParser.cpp | 1 - libsolidity/inlineasm/AsmPrinter.cpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'libsolidity') diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp index 11b33218..63c08b15 100644 --- a/libsolidity/inlineasm/AsmParser.cpp +++ b/libsolidity/inlineasm/AsmParser.cpp @@ -161,7 +161,6 @@ assembly::Case Parser::parseCase(bool _defaultCase) fatalParserError("Literal expected."); _case.value = make_shared(std::move(boost::get(statement))); } - expectToken(Token::Colon); _case.body = parseBlock(); _case.location.end = _case.body.location.end; return _case; diff --git a/libsolidity/inlineasm/AsmPrinter.cpp b/libsolidity/inlineasm/AsmPrinter.cpp index 1ef9d071..e282e5e8 100644 --- a/libsolidity/inlineasm/AsmPrinter.cpp +++ b/libsolidity/inlineasm/AsmPrinter.cpp @@ -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; -- cgit v1.2.3