aboutsummaryrefslogtreecommitdiffstats
path: root/Scope.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-10-23 23:06:12 +0800
committerChristian <c@ethdev.com>2014-10-25 01:38:48 +0800
commitb2f12991dbb30193386e6d3ff16e2fc46fa2289a (patch)
treebb23f19dc832daf8296bdbda9d2b95cba93414fb /Scope.h
parent59b5e950f42781c083d14a210845148b01e39eb2 (diff)
downloaddexon-solidity-b2f12991dbb30193386e6d3ff16e2fc46fa2289a.tar
dexon-solidity-b2f12991dbb30193386e6d3ff16e2fc46fa2289a.tar.gz
dexon-solidity-b2f12991dbb30193386e6d3ff16e2fc46fa2289a.tar.bz2
dexon-solidity-b2f12991dbb30193386e6d3ff16e2fc46fa2289a.tar.lz
dexon-solidity-b2f12991dbb30193386e6d3ff16e2fc46fa2289a.tar.xz
dexon-solidity-b2f12991dbb30193386e6d3ff16e2fc46fa2289a.tar.zst
dexon-solidity-b2f12991dbb30193386e6d3ff16e2fc46fa2289a.zip
Some documentation.
Diffstat (limited to 'Scope.h')
-rw-r--r--Scope.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/Scope.h b/Scope.h
index 2e36e528..83b01f42 100644
--- a/Scope.h
+++ b/Scope.h
@@ -32,18 +32,20 @@ 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;
};