aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-20 00:54:55 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-05-26 10:20:15 +0800
commitdb3d9e0416e7ac69ddf13eb6e2fd4e0a35dd1a63 (patch)
treedfaae547812cc98e880cc248b31d70816aec37db /libsolidity
parent66eab1caf63f9221a279abf71de953524fe9c2ad (diff)
downloaddexon-solidity-db3d9e0416e7ac69ddf13eb6e2fd4e0a35dd1a63.tar
dexon-solidity-db3d9e0416e7ac69ddf13eb6e2fd4e0a35dd1a63.tar.gz
dexon-solidity-db3d9e0416e7ac69ddf13eb6e2fd4e0a35dd1a63.tar.bz2
dexon-solidity-db3d9e0416e7ac69ddf13eb6e2fd4e0a35dd1a63.tar.lz
dexon-solidity-db3d9e0416e7ac69ddf13eb6e2fd4e0a35dd1a63.tar.xz
dexon-solidity-db3d9e0416e7ac69ddf13eb6e2fd4e0a35dd1a63.tar.zst
dexon-solidity-db3d9e0416e7ac69ddf13eb6e2fd4e0a35dd1a63.zip
Switch cases are not followed by colon
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/inlineasm/AsmParser.cpp1
-rw-r--r--libsolidity/inlineasm/AsmPrinter.cpp4
2 files changed, 2 insertions, 3 deletions
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<Literal>(std::move(boost::get<assembly::Literal>(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;