Metadata stamp.

This commit is contained in:
chriseth
2016-12-01 16:03:59 +01:00
parent 55a719a79c
commit 5789eaa78d
16 changed files with 171 additions and 54 deletions
+8
View File
@@ -63,6 +63,14 @@ SourceUnitAnnotation& SourceUnit::annotation() const
return static_cast<SourceUnitAnnotation&>(*m_annotation);
}
string Declaration::sourceUnitName() const
{
ASTNode const* scope = m_scope;
while (dynamic_cast<Declaration const*>(scope) && dynamic_cast<Declaration const*>(scope)->m_scope)
scope = dynamic_cast<Declaration const*>(scope)->m_scope;
return dynamic_cast<SourceUnit const&>(*scope).annotation().path;
}
ImportAnnotation& ImportDirective::annotation() const
{
if (!m_annotation)