diff options
author | chriseth <chris@ethereum.org> | 2017-05-26 17:29:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-26 17:29:51 +0800 |
commit | 68e1e464be4f242a9bd4e1c27d0596a3c2dcd71a (patch) | |
tree | e90c409deff7d8d51c4b4c1d0a89b5c86b9fd453 /libsolidity/inlineasm | |
parent | ec676ba9f208d16c1ceb88eda98ff555fa1da7c2 (diff) | |
parent | e410cec19ace7ae489c2c58f6d44519234a44ed7 (diff) | |
download | dexon-solidity-68e1e464be4f242a9bd4e1c27d0596a3c2dcd71a.tar dexon-solidity-68e1e464be4f242a9bd4e1c27d0596a3c2dcd71a.tar.gz dexon-solidity-68e1e464be4f242a9bd4e1c27d0596a3c2dcd71a.tar.bz2 dexon-solidity-68e1e464be4f242a9bd4e1c27d0596a3c2dcd71a.tar.lz dexon-solidity-68e1e464be4f242a9bd4e1c27d0596a3c2dcd71a.tar.xz dexon-solidity-68e1e464be4f242a9bd4e1c27d0596a3c2dcd71a.tar.zst dexon-solidity-68e1e464be4f242a9bd4e1c27d0596a3c2dcd71a.zip |
Merge pull request #2316 from ethereum/inlineasm-cleanup
Better error message for elementary operations
Diffstat (limited to 'libsolidity/inlineasm')
-rw-r--r-- | libsolidity/inlineasm/AsmParser.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp index ccc735f7..605d27be 100644 --- a/libsolidity/inlineasm/AsmParser.cpp +++ b/libsolidity/inlineasm/AsmParser.cpp @@ -102,9 +102,6 @@ assembly::Statement Parser::parseStatement() expectToken(Token::Identifier); return assignment; } - case Token::Return: // opcode - case Token::Byte: // opcode - case Token::Address: // opcode default: break; } @@ -287,7 +284,7 @@ assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher) fatalParserError( m_julia ? "Literal or identifier expected." : - "Expected elementary inline assembly operation." + "Literal, identifier or instruction expected." ); } return ret; @@ -299,7 +296,7 @@ assembly::VariableDeclaration Parser::parseVariableDeclaration() expectToken(Token::Let); while (true) { - varDecl.variables.push_back(parseTypedName()); + varDecl.variables.emplace_back(parseTypedName()); if (m_scanner->currentToken() == Token::Comma) expectToken(Token::Comma); else |