Support address in inline assembly

This commit is contained in:
Alex Beregszaszi 2016-10-05 11:47:56 +01:00
parent 3f833c9ef4
commit ae0477744c
2 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,7 @@ Features:
Bugfixes:
* Disallow unknown options in `solc`
* Inline assembly: support the `address` opcode
### 0.4.2 (2016-09-17)

View File

@ -156,12 +156,15 @@ assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher)
case Token::Identifier:
case Token::Return:
case Token::Byte:
case Token::Address:
{
string literal;
if (m_scanner->currentToken() == Token::Return)
literal = "return";
else if (m_scanner->currentToken() == Token::Byte)
literal = "byte";
else if (m_scanner->currentToken() == Token::Address)
literal = "address";
else
literal = m_scanner->currentLiteral();
// first search the set of instructions.