aboutsummaryrefslogtreecommitdiffstats
path: root/DeclarationContainer.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-02-14 07:43:02 +0800
committerChristian <c@ethdev.com>2015-02-17 02:24:07 +0800
commit3e29ec2cb2075fc6734a0f350503c393fbeeb3d6 (patch)
tree21012d2ea633c1473d057daea4f3b4ff7e60a574 /DeclarationContainer.h
parent500cb69f12a1e048258b1ebb9fa5ea858433ffff (diff)
downloaddexon-solidity-3e29ec2cb2075fc6734a0f350503c393fbeeb3d6.tar
dexon-solidity-3e29ec2cb2075fc6734a0f350503c393fbeeb3d6.tar.gz
dexon-solidity-3e29ec2cb2075fc6734a0f350503c393fbeeb3d6.tar.bz2
dexon-solidity-3e29ec2cb2075fc6734a0f350503c393fbeeb3d6.tar.lz
dexon-solidity-3e29ec2cb2075fc6734a0f350503c393fbeeb3d6.tar.xz
dexon-solidity-3e29ec2cb2075fc6734a0f350503c393fbeeb3d6.tar.zst
dexon-solidity-3e29ec2cb2075fc6734a0f350503c393fbeeb3d6.zip
"external" visibility specifier.
Diffstat (limited to 'DeclarationContainer.h')
-rw-r--r--DeclarationContainer.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/DeclarationContainer.h b/DeclarationContainer.h
index 1216fcef..f70881f5 100644
--- a/DeclarationContainer.h
+++ b/DeclarationContainer.h
@@ -23,6 +23,7 @@
#pragma once
#include <map>
+#include <set>
#include <boost/noncopyable.hpp>
#include <libsolidity/ASTForward.h>
@@ -43,8 +44,10 @@ public:
DeclarationContainer const* _enclosingContainer = nullptr):
m_enclosingDeclaration(_enclosingDeclaration), m_enclosingContainer(_enclosingContainer) {}
/// Registers the declaration in the scope unless its name is already declared or the name is empty.
+ /// @param _invisible if true, registers the declaration, reports name clashes but does not return it in @a resolveName
+ /// @param _update if true, replaces a potential declaration that is already present
/// @returns false if the name was already declared.
- bool registerDeclaration(Declaration const& _declaration, bool _update = false);
+ bool registerDeclaration(Declaration const& _declaration, bool _invisible = false, bool _update = false);
Declaration const* resolveName(ASTString const& _name, bool _recursive = false) const;
Declaration const* getEnclosingDeclaration() const { return m_enclosingDeclaration; }
std::map<ASTString, Declaration const*> const& getDeclarations() const { return m_declarations; }
@@ -53,6 +56,7 @@ private:
Declaration const* m_enclosingDeclaration;
DeclarationContainer const* m_enclosingContainer;
std::map<ASTString, Declaration const*> m_declarations;
+ std::set<ASTString> m_invisibleDeclarations;
};
}