mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
AsmParser: Fix error handling in function call parsing.
This commit is contained in:
parent
7fe0f58445
commit
2390b1bfd4
@ -321,12 +321,8 @@ Parser::ElementaryOperation Parser::parseElementaryOperation()
|
|||||||
{
|
{
|
||||||
Identifier identifier{location(), literal};
|
Identifier identifier{location(), literal};
|
||||||
advance();
|
advance();
|
||||||
if (m_scanner->currentToken() == Token::LParen)
|
expectToken(Token::LParen, false);
|
||||||
return FunctionCall{identifier.location, identifier, {}};
|
return FunctionCall{identifier.location, identifier, {}};
|
||||||
else if (instructions().count(identifier.name.str()))
|
|
||||||
m_errorReporter.syntaxError(identifier.location, "Instructions must be invoked function style. Expecting an '(' after the instruction.");
|
|
||||||
else
|
|
||||||
m_errorReporter.syntaxError(identifier.location, "Invalid identifier.");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ret = Identifier{location(), literal};
|
ret = Identifier{location(), literal};
|
||||||
|
Loading…
Reference in New Issue
Block a user