Add new annotations for Scopables

This commit is contained in:
Jason Cobb
2019-12-19 21:45:16 -05:00
parent 30b1b39901
commit 69fd185903
3 changed files with 39 additions and 0 deletions
+21
View File
@@ -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)