From e410cec19ace7ae489c2c58f6d44519234a44ed7 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 26 May 2017 09:41:53 +0100 Subject: Better error message for elementary operations --- libsolidity/inlineasm/AsmParser.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp index 530cd726..79e67af3 100644 --- a/libsolidity/inlineasm/AsmParser.cpp +++ b/libsolidity/inlineasm/AsmParser.cpp @@ -82,9 +82,6 @@ assembly::Statement Parser::parseStatement() expectToken(Token::Identifier); return assignment; } - case Token::Return: // opcode - case Token::Byte: // opcode - case Token::Address: // opcode default: break; } @@ -247,7 +244,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; @@ -259,7 +256,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 -- cgit v1.2.3