aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/ReferencesResolver.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-01-28 01:27:59 +0800
committerchriseth <c@ethdev.com>2017-02-14 20:23:44 +0800
commitfc8e50f688bad9c13259fc926142b838d7aba5d3 (patch)
treee979781c794dbf111a4e1f31bef95a3e9cd30152 /libsolidity/analysis/ReferencesResolver.h
parentd4da4ef35f8118d49bed54f11392036e1d31f7e7 (diff)
downloaddexon-solidity-fc8e50f688bad9c13259fc926142b838d7aba5d3.tar.gz
dexon-solidity-fc8e50f688bad9c13259fc926142b838d7aba5d3.tar.zst
dexon-solidity-fc8e50f688bad9c13259fc926142b838d7aba5d3.zip
Refactor NameAndTypeResolver and SyntaxChecker to allow other entry points.
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.h')
-rw-r--r--libsolidity/analysis/ReferencesResolver.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.h b/libsolidity/analysis/ReferencesResolver.h
index caa3a78f..23ac6b07 100644
--- a/libsolidity/analysis/ReferencesResolver.h
+++ b/libsolidity/analysis/ReferencesResolver.h
@@ -45,12 +45,10 @@ public:
ReferencesResolver(
ErrorList& _errors,
NameAndTypeResolver& _resolver,
- ParameterList const* _returnParameters,
bool _resolveInsideCode = false
):
m_errors(_errors),
m_resolver(_resolver),
- m_returnParameters(_returnParameters),
m_resolveInsideCode(_resolveInsideCode)
{}
@@ -61,6 +59,10 @@ private:
virtual bool visit(Block const&) override { return m_resolveInsideCode; }
virtual bool visit(Identifier const& _identifier) override;
virtual bool visit(ElementaryTypeName const& _typeName) override;
+ virtual bool visit(FunctionDefinition const& _functionDefinition) override;
+ virtual void endVisit(FunctionDefinition const& _functionDefinition) override;
+ virtual bool visit(ModifierDefinition const& _modifierDefinition) override;
+ virtual void endVisit(ModifierDefinition const& _modifierDefinition) override;
virtual void endVisit(UserDefinedTypeName const& _typeName) override;
virtual void endVisit(FunctionTypeName const& _typeName) override;
virtual void endVisit(Mapping const& _typeName) override;
@@ -83,7 +85,8 @@ private:
ErrorList& m_errors;
NameAndTypeResolver& m_resolver;
- ParameterList const* m_returnParameters;
+ /// Stack of return parameters.
+ std::vector<ParameterList const*> m_returnParameters;
bool const m_resolveInsideCode;
bool m_errorOccurred = false;
};