diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-12 06:00:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-12 06:00:47 +0800 |
commit | 8999a2f375410a29bae46b8e87a70c62036c880d (patch) | |
tree | ab415cf848fd48d0cdca81b92250d9f6aa88d388 /libsolidity/parsing/Parser.cpp | |
parent | d85120c0739b5c23be4107b6f1ba6e26868b96cd (diff) | |
parent | 2e9f5d1c98af76dbab4960f095a5fef1ddfc7db5 (diff) | |
download | dexon-solidity-8999a2f375410a29bae46b8e87a70c62036c880d.tar.gz dexon-solidity-8999a2f375410a29bae46b8e87a70c62036c880d.tar.zst dexon-solidity-8999a2f375410a29bae46b8e87a70c62036c880d.zip |
Merge pull request #4179 from ethereum/emitWorkaround
[BREAKING] Remove emit workaround
Diffstat (limited to 'libsolidity/parsing/Parser.cpp')
-rw-r--r-- | libsolidity/parsing/Parser.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index aec9ebbb..e9810fe3 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -939,10 +939,11 @@ ASTPointer<Statement> Parser::parseStatement() } case Token::Assembly: return parseInlineAssembly(docString); + case Token::Emit: + statement = parseEmitStatement(docString); + break; case Token::Identifier: - if (m_scanner->currentLiteral() == "emit") - statement = parseEmitStatement(docString); - else if (m_insideModifier && m_scanner->currentLiteral() == "_") + if (m_insideModifier && m_scanner->currentLiteral() == "_") { statement = ASTNodeFactory(*this).createNode<PlaceholderStatement>(docString); m_scanner->next(); @@ -1062,6 +1063,8 @@ ASTPointer<ForStatement> Parser::parseForStatement(ASTPointer<ASTString> const& ASTPointer<EmitStatement> Parser::parseEmitStatement(ASTPointer<ASTString> const& _docString) { + expectToken(Token::Emit, false); + ASTNodeFactory nodeFactory(*this); m_scanner->next(); ASTNodeFactory eventCallNodeFactory(*this); |