diff options
author | chriseth <c@ethdev.com> | 2016-04-18 19:47:40 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-04-20 00:35:21 +0800 |
commit | ed9da5171b84e6e1846820a45d97e5c041d57206 (patch) | |
tree | fd74dd485ded436d3b170be627087857396ea65d /libsolidity/inlineasm/AsmStack.cpp | |
parent | 81ae2a78321fddcd2d32efc51568ebeca28866a8 (diff) | |
download | dexon-solidity-ed9da5171b84e6e1846820a45d97e5c041d57206.tar.gz dexon-solidity-ed9da5171b84e6e1846820a45d97e5c041d57206.tar.zst dexon-solidity-ed9da5171b84e6e1846820a45d97e5c041d57206.zip |
Source location for inline assembly.
Diffstat (limited to 'libsolidity/inlineasm/AsmStack.cpp')
-rw-r--r-- | libsolidity/inlineasm/AsmStack.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libsolidity/inlineasm/AsmStack.cpp b/libsolidity/inlineasm/AsmStack.cpp index 22042ada..c891678b 100644 --- a/libsolidity/inlineasm/AsmStack.cpp +++ b/libsolidity/inlineasm/AsmStack.cpp @@ -34,14 +34,18 @@ using namespace dev::solidity::assembly; bool InlineAssemblyStack::parse(const std::shared_ptr<Scanner>& _scanner) { + m_parserResult = make_shared<Block>(); Parser parser(m_errors); - m_asmBlock = parser.parse(_scanner); - return !!m_asmBlock; + auto result = parser.parse(_scanner); + if (!result) + return false; + *m_parserResult = std::move(*result); + return true; } eth::Assembly InlineAssemblyStack::assemble() { - CodeGenerator codeGen(*m_asmBlock, m_errors); + CodeGenerator codeGen(*m_parserResult, m_errors); return codeGen.assemble(); } |