Merge pull request #2198 from ethereum/conditionalCompilerStateReset

conditional reset of compilerState-Enum
This commit is contained in:
chriseth 2017-05-02 15:17:10 +02:00 committed by GitHub
commit f42a9a9408

View File

@ -80,8 +80,11 @@ void CompilerStack::setRemappings(vector<string> const& _remappings)
void CompilerStack::reset(bool _keepSources) void CompilerStack::reset(bool _keepSources)
{ {
if (_keepSources) if (_keepSources)
{
m_stackState = SourcesSet;
for (auto sourcePair: m_sources) for (auto sourcePair: m_sources)
sourcePair.second.reset(); sourcePair.second.reset();
}
else else
{ {
m_sources.clear(); m_sources.clear();
@ -161,7 +164,7 @@ bool CompilerStack::parse()
bool CompilerStack::analyze() bool CompilerStack::analyze()
{ {
if (m_stackState < ParsingSuccessful) if (m_stackState != ParsingSuccessful)
return false; return false;
resolveImports(); resolveImports();