mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2316 from ethereum/inlineasm-cleanup
Better error message for elementary operations
This commit is contained in:
commit
68e1e464be
@ -102,9 +102,6 @@ assembly::Statement Parser::parseStatement()
|
|||||||
expectToken(Token::Identifier);
|
expectToken(Token::Identifier);
|
||||||
return assignment;
|
return assignment;
|
||||||
}
|
}
|
||||||
case Token::Return: // opcode
|
|
||||||
case Token::Byte: // opcode
|
|
||||||
case Token::Address: // opcode
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -287,7 +284,7 @@ assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher)
|
|||||||
fatalParserError(
|
fatalParserError(
|
||||||
m_julia ?
|
m_julia ?
|
||||||
"Literal or identifier expected." :
|
"Literal or identifier expected." :
|
||||||
"Expected elementary inline assembly operation."
|
"Literal, identifier or instruction expected."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@ -299,7 +296,7 @@ assembly::VariableDeclaration Parser::parseVariableDeclaration()
|
|||||||
expectToken(Token::Let);
|
expectToken(Token::Let);
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
varDecl.variables.push_back(parseTypedName());
|
varDecl.variables.emplace_back(parseTypedName());
|
||||||
if (m_scanner->currentToken() == Token::Comma)
|
if (m_scanner->currentToken() == Token::Comma)
|
||||||
expectToken(Token::Comma);
|
expectToken(Token::Comma);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user