diff options
author | chriseth <chris@ethereum.org> | 2018-02-16 23:55:21 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-02-22 22:17:30 +0800 |
commit | 388718b59f604c944be6816ba50068014e563fb0 (patch) | |
tree | 0a3c4bf2b04a6aaba2c4beb40252617384159662 /libsolidity/codegen | |
parent | 8fc9535d43df26001f7b34488d073c06fc4fd358 (diff) | |
download | dexon-solidity-388718b59f604c944be6816ba50068014e563fb0.tar dexon-solidity-388718b59f604c944be6816ba50068014e563fb0.tar.gz dexon-solidity-388718b59f604c944be6816ba50068014e563fb0.tar.bz2 dexon-solidity-388718b59f604c944be6816ba50068014e563fb0.tar.lz dexon-solidity-388718b59f604c944be6816ba50068014e563fb0.tar.xz dexon-solidity-388718b59f604c944be6816ba50068014e563fb0.tar.zst dexon-solidity-388718b59f604c944be6816ba50068014e563fb0.zip |
Introduce emit statement.
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r-- | libsolidity/codegen/ContractCompiler.cpp | 9 | ||||
-rw-r--r-- | libsolidity/codegen/ContractCompiler.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index f463db94..ebb718a5 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -903,6 +903,15 @@ bool ContractCompiler::visit(Throw const& _throw) return false; } +bool ContractCompiler::visit(EmitStatement const& _emit) +{ + CompilerContext::LocationSetter locationSetter(m_context, _emit); + StackHeightChecker checker(m_context); + compileExpression(_emit.eventCall()); + checker.check(); + return false; +} + bool ContractCompiler::visit(VariableDeclarationStatement const& _variableDeclarationStatement) { StackHeightChecker checker(m_context); diff --git a/libsolidity/codegen/ContractCompiler.h b/libsolidity/codegen/ContractCompiler.h index 1fd80d05..d698dc71 100644 --- a/libsolidity/codegen/ContractCompiler.h +++ b/libsolidity/codegen/ContractCompiler.h @@ -109,6 +109,7 @@ private: virtual bool visit(Break const& _breakStatement) override; virtual bool visit(Return const& _return) override; virtual bool visit(Throw const& _throw) override; + virtual bool visit(EmitStatement const& _emit) override; virtual bool visit(VariableDeclarationStatement const& _variableDeclarationStatement) override; virtual bool visit(ExpressionStatement const& _expressionStatement) override; virtual bool visit(PlaceholderStatement const&) override; |