aboutsummaryrefslogtreecommitdiffstats
path: root/Compiler.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-11-06 01:44:05 +0800
committerChristian <c@ethdev.com>2014-11-06 09:46:48 +0800
commitd1df8b810f8067bf58f6381b487a471514505cb9 (patch)
tree393b98aed988f38bf4407c06d08f18cfacea2b52 /Compiler.cpp
parente30d3f8d539882376b29a1fe8f4bf6bcaf8c1762 (diff)
downloaddexon-solidity-d1df8b810f8067bf58f6381b487a471514505cb9.tar.gz
dexon-solidity-d1df8b810f8067bf58f6381b487a471514505cb9.tar.zst
dexon-solidity-d1df8b810f8067bf58f6381b487a471514505cb9.zip
Ignore break and continue outside of loops.
Diffstat (limited to 'Compiler.cpp')
-rw-r--r--Compiler.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/Compiler.cpp b/Compiler.cpp
index 654ecead..d05552b9 100644
--- a/Compiler.cpp
+++ b/Compiler.cpp
@@ -252,17 +252,15 @@ bool Compiler::visit(WhileStatement& _whileStatement)
bool Compiler::visit(Continue&)
{
- if (asserts(!m_continueTags.empty()))
- BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Jump tag not available for \"continue\"."));
- m_context.appendJumpTo(m_continueTags.back());
+ if (!m_continueTags.empty())
+ m_context.appendJumpTo(m_continueTags.back());
return false;
}
bool Compiler::visit(Break&)
{
- if (asserts(!m_breakTags.empty()))
- BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Jump tag not available for \"break\"."));
- m_context.appendJumpTo(m_breakTags.back());
+ if (!m_breakTags.empty())
+ m_context.appendJumpTo(m_breakTags.back());
return false;
}