diff options
Diffstat (limited to 'libsolidity/ast/AST.cpp')
-rw-r--r-- | libsolidity/ast/AST.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp index 9d1fb811..41a4d182 100644 --- a/libsolidity/ast/AST.cpp +++ b/libsolidity/ast/AST.cpp @@ -336,6 +336,13 @@ VariableDeclarationAnnotation& VariableDeclaration::annotation() const return static_cast<VariableDeclarationAnnotation&>(*m_annotation); } +StatementAnnotation& Statement::annotation() const +{ + if (!m_annotation) + m_annotation = new StatementAnnotation(); + return static_cast<StatementAnnotation&>(*m_annotation); +} + ReturnAnnotation& Return::annotation() const { if (!m_annotation) |