aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/DeclarationContainer.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-15 18:30:32 +0800
committerchriseth <chris@ethereum.org>2018-02-27 19:17:25 +0800
commit88a5c66f4a7efae6d78ce2e04144219656bb9da0 (patch)
treea2aaf6ea3dd359077ad3024b5938a061c665f439 /libsolidity/analysis/DeclarationContainer.h
parent6b9dda06f3d85344a70efb2f868760a0dde9dc45 (diff)
downloaddexon-solidity-88a5c66f4a7efae6d78ce2e04144219656bb9da0.tar.gz
dexon-solidity-88a5c66f4a7efae6d78ce2e04144219656bb9da0.tar.zst
dexon-solidity-88a5c66f4a7efae6d78ce2e04144219656bb9da0.zip
Only active variables at the point of their declaration.
Diffstat (limited to 'libsolidity/analysis/DeclarationContainer.h')
-rw-r--r--libsolidity/analysis/DeclarationContainer.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libsolidity/analysis/DeclarationContainer.h b/libsolidity/analysis/DeclarationContainer.h
index f9b1bda4..e4b3320a 100644
--- a/libsolidity/analysis/DeclarationContainer.h
+++ b/libsolidity/analysis/DeclarationContainer.h
@@ -51,13 +51,17 @@ public:
/// @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, ASTString const* _name = nullptr, bool _invisible = false, bool _update = false);
- std::vector<Declaration const*> resolveName(ASTString const& _name, bool _recursive = false) const;
+ std::vector<Declaration const*> resolveName(ASTString const& _name, bool _recursive = false, bool _alsoInvisible = false) const;
ASTNode const* enclosingNode() const { return m_enclosingNode; }
DeclarationContainer const* enclosingContainer() const { return m_enclosingContainer; }
std::map<ASTString, std::vector<Declaration const*>> const& declarations() const { return m_declarations; }
/// @returns whether declaration is valid, and if not also returns previous declaration.
Declaration const* conflictingDeclaration(Declaration const& _declaration, ASTString const* _name = nullptr) const;
+ /// Activates a previously inactive (invisible) variable. To be used in C99 scpoing for
+ /// VariableDeclarationStatements.
+ void activateVariable(ASTString const& _name);
+
/// @returns existing declaration names similar to @a _name.
/// Searches this and all parent containers.
std::vector<ASTString> similarNames(ASTString const& _name) const;