From ae0477744c942ce748d8acb8b9fa5972a42a2f73 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 5 Oct 2016 11:47:56 +0100 Subject: Support address in inline assembly --- Changelog.md | 1 + libsolidity/inlineasm/AsmParser.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Changelog.md b/Changelog.md index 8a243a36..1560990d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,6 +8,7 @@ Features: Bugfixes: * Disallow unknown options in `solc` + * Inline assembly: support the `address` opcode ### 0.4.2 (2016-09-17) diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp index 196b314d..ee9c150e 100644 --- a/libsolidity/inlineasm/AsmParser.cpp +++ b/libsolidity/inlineasm/AsmParser.cpp @@ -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. -- cgit v1.2.3