mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Better error messages during parsing functional instructions
This commit is contained in:
parent
451acd4c9f
commit
56fe3a6ab9
@ -1,5 +1,9 @@
|
|||||||
### 0.4.12 (unreleased)
|
### 0.4.12 (unreleased)
|
||||||
|
|
||||||
|
Features:
|
||||||
* AST: export all attributes to Json format
|
* AST: export all attributes to Json format
|
||||||
|
* Inline Assembly: Present proper error message when not supplying enough arguments to a functional
|
||||||
|
instruction.
|
||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
* Unused variable warnings no longer issued for variables used inside inline assembly
|
* Unused variable warnings no longer issued for variables used inside inline assembly
|
||||||
|
@ -321,6 +321,15 @@ assembly::Statement Parser::parseCall(assembly::Statement&& _instruction)
|
|||||||
unsigned args = unsigned(instrInfo.args);
|
unsigned args = unsigned(instrInfo.args);
|
||||||
for (unsigned i = 0; i < args; ++i)
|
for (unsigned i = 0; i < args; ++i)
|
||||||
{
|
{
|
||||||
|
/// check for premature closing parentheses
|
||||||
|
if (m_scanner->currentToken() == Token::RParen)
|
||||||
|
fatalParserError(string(
|
||||||
|
"Expected " +
|
||||||
|
boost::lexical_cast<string>(args) +
|
||||||
|
" arguments, but received " +
|
||||||
|
boost::lexical_cast<string>(i)
|
||||||
|
));
|
||||||
|
|
||||||
ret.arguments.emplace_back(parseExpression());
|
ret.arguments.emplace_back(parseExpression());
|
||||||
if (i != args - 1)
|
if (i != args - 1)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user