mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add new annotations for Scopables
This commit is contained in:
@@ -660,6 +660,27 @@ InlineAssemblyAnnotation& InlineAssembly::annotation() const
|
||||
return dynamic_cast<InlineAssemblyAnnotation&>(*m_annotation);
|
||||
}
|
||||
|
||||
BlockAnnotation& Block::annotation() const
|
||||
{
|
||||
if (!m_annotation)
|
||||
m_annotation = make_unique<BlockAnnotation>();
|
||||
return dynamic_cast<BlockAnnotation&>(*m_annotation);
|
||||
}
|
||||
|
||||
TryCatchClauseAnnotation& TryCatchClause::annotation() const
|
||||
{
|
||||
if (!m_annotation)
|
||||
m_annotation = make_unique<TryCatchClauseAnnotation>();
|
||||
return dynamic_cast<TryCatchClauseAnnotation&>(*m_annotation);
|
||||
}
|
||||
|
||||
ForStatementAnnotation& ForStatement::annotation() const
|
||||
{
|
||||
if (!m_annotation)
|
||||
m_annotation = make_unique<ForStatementAnnotation>();
|
||||
return dynamic_cast<ForStatementAnnotation&>(*m_annotation);
|
||||
}
|
||||
|
||||
ReturnAnnotation& Return::annotation() const
|
||||
{
|
||||
if (!m_annotation)
|
||||
|
||||
Reference in New Issue
Block a user