Add sourceUnit() helper to Declaration

This commit is contained in:
Alex Beregszaszi
2017-07-19 14:56:40 +01:00
parent 84f8e7a467
commit 1b0ef0b785
2 changed files with 10 additions and 2 deletions
+3
View File
@@ -168,6 +168,9 @@ public:
ASTNode const* scope() const { return m_scope; }
void setScope(ASTNode const* _scope) { m_scope = _scope; }
/// @returns the source unit this declaration is present in.
SourceUnit const& sourceUnit() const;
/// @returns the source name this declaration is present in.
/// Can be combined with annotation().canonicalName to form a globally unique name.
std::string sourceUnitName() const;