aboutsummaryrefslogtreecommitdiffstats
path: root/Scope.h
diff options
context:
space:
mode:
Diffstat (limited to 'Scope.h')
-rw-r--r--Scope.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/Scope.h b/Scope.h
index 2e36e528..637c2d5c 100644
--- a/Scope.h
+++ b/Scope.h
@@ -32,18 +32,22 @@ namespace dev
namespace solidity
{
+/**
+ * Container that stores mappings betwee names and declarations. It also contains a link to the
+ * enclosing scope.
+ */
class Scope
{
public:
- explicit Scope(Scope* _outerScope = nullptr): m_outerScope(_outerScope) {}
+ explicit Scope(Scope* _enclosingScope = nullptr): m_enclosingScope(_enclosingScope) {}
/// Registers the declaration in the scope unless its name is already declared. Returns true iff
/// it was not yet declared.
bool registerDeclaration(Declaration& _declaration);
Declaration* resolveName(ASTString const& _name, bool _recursive = false) const;
- Scope* getOuterScope() const { return m_outerScope; }
+ Scope* getEnclosingScope() const { return m_enclosingScope; }
private:
- Scope* m_outerScope;
+ Scope* m_enclosingScope;
std::map<ASTString, Declaration*> m_declarations;
};