Move all references to scope into annotation

This commit is contained in:
Jason Cobb
2019-12-19 21:45:16 -05:00
parent 69fd185903
commit 6679f92c8a
2 changed files with 6 additions and 8 deletions
+2 -4
View File
@@ -159,8 +159,7 @@ public:
virtual ~Scopable() = default;
/// @returns the scope this declaration resides in. Can be nullptr if it is the global scope.
/// Available only after name and type resolution step.
ASTNode const* scope() const { return m_scope; }
void setScope(ASTNode const* _scope) { m_scope = _scope; }
ASTNode const* scope() const { return annotation().scope; }
/// @returns the source unit this scopable is present in.
SourceUnit const& sourceUnit() const;
@@ -172,8 +171,7 @@ public:
/// Can be combined with annotation().canonicalName (if present) to form a globally unique name.
std::string sourceUnitName() const;
protected:
ASTNode const* m_scope = nullptr;
virtual ScopableAnnotation& annotation() const = 0;
};
/**