aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm/AsmParser.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-17 18:21:37 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-05-26 10:20:10 +0800
commit66eab1caf63f9221a279abf71de953524fe9c2ad (patch)
treedeec1c6b67f411d4a1efdee9400640e5c61a989e /libsolidity/inlineasm/AsmParser.cpp
parentb5080860d5f2d141b8fccceaa635378a86c996a8 (diff)
downloaddexon-solidity-66eab1caf63f9221a279abf71de953524fe9c2ad.tar
dexon-solidity-66eab1caf63f9221a279abf71de953524fe9c2ad.tar.gz
dexon-solidity-66eab1caf63f9221a279abf71de953524fe9c2ad.tar.bz2
dexon-solidity-66eab1caf63f9221a279abf71de953524fe9c2ad.tar.lz
dexon-solidity-66eab1caf63f9221a279abf71de953524fe9c2ad.tar.xz
dexon-solidity-66eab1caf63f9221a279abf71de953524fe9c2ad.tar.zst
dexon-solidity-66eab1caf63f9221a279abf71de953524fe9c2ad.zip
Change switch case string to Literal
Diffstat (limited to 'libsolidity/inlineasm/AsmParser.cpp')
-rw-r--r--libsolidity/inlineasm/AsmParser.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp
index a3a25a42..11b33218 100644
--- a/libsolidity/inlineasm/AsmParser.cpp
+++ b/libsolidity/inlineasm/AsmParser.cpp
@@ -156,7 +156,10 @@ assembly::Case Parser::parseCase(bool _defaultCase)
else
{
expectToken(Token::Case);
- _case.name = expectAsmIdentifier();
+ assembly::Statement statement = parseElementaryOperation();
+ if (statement.type() != typeid(assembly::Literal))
+ fatalParserError("Literal expected.");
+ _case.value = make_shared<Literal>(std::move(boost::get<assembly::Literal>(statement)));
}
expectToken(Token::Colon);
_case.body = parseBlock();