diff options
author | Christian <c@ethdev.com> | 2015-02-14 07:43:02 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-02-17 02:24:07 +0800 |
commit | 3e29ec2cb2075fc6734a0f350503c393fbeeb3d6 (patch) | |
tree | 21012d2ea633c1473d057daea4f3b4ff7e60a574 /DeclarationContainer.h | |
parent | 500cb69f12a1e048258b1ebb9fa5ea858433ffff (diff) | |
download | dexon-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.h | 6 |
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; }; } |