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/ast/AST.h | |
parent | 8fc9535d43df26001f7b34488d073c06fc4fd358 (diff) | |
download | dexon-solidity-388718b59f604c944be6816ba50068014e563fb0.tar.gz dexon-solidity-388718b59f604c944be6816ba50068014e563fb0.tar.zst dexon-solidity-388718b59f604c944be6816ba50068014e563fb0.zip |
Introduce emit statement.
Diffstat (limited to 'libsolidity/ast/AST.h')
-rw-r--r-- | libsolidity/ast/AST.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index feffde64..c0d55aec 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -1197,6 +1197,27 @@ public: }; /** + * The emit statement is used to emit events: emit EventName(arg1, ..., argn) + */ +class EmitStatement: public Statement +{ +public: + explicit EmitStatement( + SourceLocation const& _location, + ASTPointer<ASTString> const& _docString, + ASTPointer<FunctionCall> const& _functionCall + ): + Statement(_location, _docString), m_eventCall(_functionCall) {} + virtual void accept(ASTVisitor& _visitor) override; + virtual void accept(ASTConstVisitor& _visitor) const override; + + FunctionCall const& eventCall() const { return *m_eventCall; } + +private: + ASTPointer<FunctionCall> m_eventCall; +}; + +/** * Definition of a variable as a statement inside a function. It requires a type name (which can * also be "var") but the actual assignment can be missing. * Examples: var a = 2; uint256 a; |