aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm/AsmScopeFiller.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-06-19 17:53:22 +0800
committerGitHub <noreply@github.com>2017-06-19 17:53:22 +0800
commit0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf (patch)
tree49cfc2be091c868bdc5865a9d718ea33b1a1269e /libsolidity/inlineasm/AsmScopeFiller.cpp
parente0b9589e5a5b961541aefe783045b93fac347773 (diff)
parentc5339037e9c1d25c95093f905ebe443a38d419f0 (diff)
downloaddexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.tar
dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.tar.gz
dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.tar.bz2
dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.tar.lz
dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.tar.xz
dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.tar.zst
dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.zip
Merge pull request #2225 from ethereum/julia-for
Implement for statement in assembly parser / printer / code generator
Diffstat (limited to 'libsolidity/inlineasm/AsmScopeFiller.cpp')
-rw-r--r--libsolidity/inlineasm/AsmScopeFiller.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/libsolidity/inlineasm/AsmScopeFiller.cpp b/libsolidity/inlineasm/AsmScopeFiller.cpp
index 4d26dcf8..3bef9cec 100644
--- a/libsolidity/inlineasm/AsmScopeFiller.cpp
+++ b/libsolidity/inlineasm/AsmScopeFiller.cpp
@@ -111,6 +111,26 @@ bool ScopeFiller::operator()(Switch const& _switch)
return success;
}
+bool ScopeFiller::operator()(ForLoop const& _forLoop)
+{
+ Scope* originalScope = m_currentScope;
+
+ bool success = true;
+ if (!(*this)(_forLoop.pre))
+ success = false;
+ m_currentScope = &scope(&_forLoop.pre);
+ if (!boost::apply_visitor(*this, *_forLoop.condition))
+ success = false;
+ if (!(*this)(_forLoop.body))
+ success = false;
+ if (!(*this)(_forLoop.post))
+ success = false;
+
+ m_currentScope = originalScope;
+
+ return success;
+}
+
bool ScopeFiller::operator()(Block const& _block)
{
bool success = true;