diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2017-02-14 22:35:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-14 22:35:22 +0800 |
commit | 4189ff5b68f119878807104ebac0137171c8ecd6 (patch) | |
tree | fdedef979359908033a5a26aa3abf998d274c95b /libsolidity/interface/CompilerStack.cpp | |
parent | 6f1f0b392ac5d3d244e65228cc8d9eebbdfe02ff (diff) | |
parent | a791ec75e2e73130afee391958651453acc8d781 (diff) | |
download | dexon-solidity-4189ff5b68f119878807104ebac0137171c8ecd6.tar dexon-solidity-4189ff5b68f119878807104ebac0137171c8ecd6.tar.gz dexon-solidity-4189ff5b68f119878807104ebac0137171c8ecd6.tar.bz2 dexon-solidity-4189ff5b68f119878807104ebac0137171c8ecd6.tar.lz dexon-solidity-4189ff5b68f119878807104ebac0137171c8ecd6.tar.xz dexon-solidity-4189ff5b68f119878807104ebac0137171c8ecd6.tar.zst dexon-solidity-4189ff5b68f119878807104ebac0137171c8ecd6.zip |
Merge pull request #1620 from ethereum/refactorEntry
Refactor NameAndTypeResolver and SyntaxChecker to allow other entry points.
Diffstat (limited to 'libsolidity/interface/CompilerStack.cpp')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 3335c40e..9d8d872f 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -88,6 +88,7 @@ void CompilerStack::reset(bool _keepSources) m_optimize = false; m_optimizeRuns = 200; m_globalContext.reset(); + m_scopes.clear(); m_sourceOrder.clear(); m_contracts.clear(); m_errors.clear(); @@ -165,7 +166,7 @@ bool CompilerStack::parse() noErrors = false; m_globalContext = make_shared<GlobalContext>(); - NameAndTypeResolver resolver(m_globalContext->declarations(), m_errors); + NameAndTypeResolver resolver(m_globalContext->declarations(), m_scopes, m_errors); for (Source const* source: m_sourceOrder) if (!resolver.registerDeclarations(*source->ast)) return false; |