aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-05-26 17:29:51 +0800
committerGitHub <noreply@github.com>2017-05-26 17:29:51 +0800
commit68e1e464be4f242a9bd4e1c27d0596a3c2dcd71a (patch)
treee90c409deff7d8d51c4b4c1d0a89b5c86b9fd453 /libsolidity/inlineasm
parentec676ba9f208d16c1ceb88eda98ff555fa1da7c2 (diff)
parente410cec19ace7ae489c2c58f6d44519234a44ed7 (diff)
downloaddexon-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.cpp7
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