aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-04-06 22:40:20 +0800
committerchriseth <c@ethdev.com>2016-04-06 22:40:20 +0800
commit193b1c940ce3e21d52e2cbdd253c1d7cb820fa06 (patch)
treea6ac5bb939030e6d4defee1993f3a121b548dd38 /libsolidity
parent737623cd0c437bda2707a22ef17a637fbfcd7916 (diff)
parent26a91109a781d583cf632a96561504ae520753c0 (diff)
downloaddexon-solidity-193b1c940ce3e21d52e2cbdd253c1d7cb820fa06.tar
dexon-solidity-193b1c940ce3e21d52e2cbdd253c1d7cb820fa06.tar.gz
dexon-solidity-193b1c940ce3e21d52e2cbdd253c1d7cb820fa06.tar.bz2
dexon-solidity-193b1c940ce3e21d52e2cbdd253c1d7cb820fa06.tar.lz
dexon-solidity-193b1c940ce3e21d52e2cbdd253c1d7cb820fa06.tar.xz
dexon-solidity-193b1c940ce3e21d52e2cbdd253c1d7cb820fa06.tar.zst
dexon-solidity-193b1c940ce3e21d52e2cbdd253c1d7cb820fa06.zip
Merge pull request #475 from chriseth/byteasm
Allow "byte" in inline assembly.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/inlineasm/AsmParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp
index 68050733..33c8efa0 100644
--- a/libsolidity/inlineasm/AsmParser.cpp
+++ b/libsolidity/inlineasm/AsmParser.cpp
@@ -72,6 +72,7 @@ assembly::Statement Parser::parseStatement()
return assembly::Assignment{assembly::Identifier{name}};
}
case Token::Return: // opcode
+ case Token::Byte: // opcode
default:
break;
}
@@ -142,10 +143,13 @@ assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher)
{
case Token::Identifier:
case Token::Return:
+ case Token::Byte:
{
string literal;
if (m_scanner->currentToken() == Token::Return)
literal = "return";
+ else if (m_scanner->currentToken() == Token::Byte)
+ literal = "byte";
else
literal = m_scanner->currentLiteral();
// first search the set of instructions.