aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm/AsmParser.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-21 01:39:00 +0800
committerchriseth <chris@ethereum.org>2018-02-21 07:41:39 +0800
commite2bf5de8a278e04623c7bb34a925372039095ba7 (patch)
treeb0d463b41860016abcb67ce152c726a8be5b9089 /libsolidity/inlineasm/AsmParser.cpp
parentf5f00b4ee9e6e9038e3b84986ab3ff78504331fd (diff)
downloaddexon-solidity-e2bf5de8a278e04623c7bb34a925372039095ba7.tar.gz
dexon-solidity-e2bf5de8a278e04623c7bb34a925372039095ba7.tar.zst
dexon-solidity-e2bf5de8a278e04623c7bb34a925372039095ba7.zip
Expect end of string at end of top-level block for assembly parser.
Diffstat (limited to 'libsolidity/inlineasm/AsmParser.cpp')
-rw-r--r--libsolidity/inlineasm/AsmParser.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp
index 306b07e6..7f618e07 100644
--- a/libsolidity/inlineasm/AsmParser.cpp
+++ b/libsolidity/inlineasm/AsmParser.cpp
@@ -34,13 +34,16 @@ using namespace dev;
using namespace dev::solidity;
using namespace dev::solidity::assembly;
-shared_ptr<assembly::Block> Parser::parse(std::shared_ptr<Scanner> const& _scanner)
+shared_ptr<assembly::Block> Parser::parse(std::shared_ptr<Scanner> const& _scanner, bool _reuseScanner)
{
m_recursionDepth = 0;
try
{
m_scanner = _scanner;
- return make_shared<Block>(parseBlock());
+ auto block = make_shared<Block>(parseBlock());
+ if (!_reuseScanner)
+ expectToken(Token::EOS);
+ return block;
}
catch (FatalError const&)
{