Assembly: Revive warning on not-yet-available EVM instructions in (strict) inline assembly.

This commit is contained in:
Christian Parpart
2019-10-25 15:01:26 +02:00
committed by Christian Parpart
parent 044eb2d161
commit a6e34bd441
3 changed files with 47 additions and 4 deletions
+6 -1
View File
@@ -321,7 +321,12 @@ Parser::ElementaryOperation Parser::parseElementaryOperation()
{
Identifier identifier{location(), literal};
advance();
return FunctionCall{identifier.location, identifier, {}};
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.");
}
else
ret = Identifier{location(), literal};