diff options
author | chriseth <chris@ethereum.org> | 2018-02-21 01:39:00 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-02-21 07:41:39 +0800 |
commit | e2bf5de8a278e04623c7bb34a925372039095ba7 (patch) | |
tree | b0d463b41860016abcb67ce152c726a8be5b9089 /libsolidity/inlineasm/AsmParser.cpp | |
parent | f5f00b4ee9e6e9038e3b84986ab3ff78504331fd (diff) | |
download | dexon-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.cpp | 7 |
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&) { |