mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Introduce emit statement.
This commit is contained in:
@@ -1196,6 +1196,27 @@ public:
|
||||
virtual void accept(ASTConstVisitor& _visitor) const override;
|
||||
};
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
||||
Reference in New Issue
Block a user