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};
|
||||
advance();
|
||||
if (m_scanner->currentToken() == Token::LParen)
|
||||
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.");
|
||||
expectToken(Token::LParen, false);
|
||||
return FunctionCall{identifier.location, identifier, {}};
|
||||
}
|
||||
else
|
||||
ret = Identifier{location(), literal};
|
||||
|
Loading…
Reference in New Issue
Block a user