diff options
Diffstat (limited to 'libsolidity/ast/AST.cpp')
-rw-r--r-- | libsolidity/ast/AST.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp index 71d80a36..9d1fb811 100644 --- a/libsolidity/ast/AST.cpp +++ b/libsolidity/ast/AST.cpp @@ -248,16 +248,37 @@ string FunctionDefinition::externalSignature() const return FunctionType(*this).externalSignature(); } +FunctionDefinitionAnnotation& FunctionDefinition::annotation() const +{ + if (!m_annotation) + m_annotation = new FunctionDefinitionAnnotation(); + return static_cast<FunctionDefinitionAnnotation&>(*m_annotation); +} + TypePointer ModifierDefinition::type(ContractDefinition const*) const { return make_shared<ModifierType>(*this); } +ModifierDefinitionAnnotation& ModifierDefinition::annotation() const +{ + if (!m_annotation) + m_annotation = new ModifierDefinitionAnnotation(); + return static_cast<ModifierDefinitionAnnotation&>(*m_annotation); +} + TypePointer EventDefinition::type(ContractDefinition const*) const { return make_shared<FunctionType>(*this); } +EventDefinitionAnnotation& EventDefinition::annotation() const +{ + if (!m_annotation) + m_annotation = new EventDefinitionAnnotation(); + return static_cast<EventDefinitionAnnotation&>(*m_annotation); +} + UserDefinedTypeNameAnnotation& UserDefinedTypeName::annotation() const { if (!m_annotation) |