diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-17 18:21:37 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-26 10:20:10 +0800 |
commit | 66eab1caf63f9221a279abf71de953524fe9c2ad (patch) | |
tree | deec1c6b67f411d4a1efdee9400640e5c61a989e /libsolidity/inlineasm/AsmParser.cpp | |
parent | b5080860d5f2d141b8fccceaa635378a86c996a8 (diff) | |
download | dexon-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.cpp | 5 |
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(); |