diff options
author | chriseth <chris@ethereum.org> | 2017-07-06 02:40:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-06 02:40:25 +0800 |
commit | 2dd9070a4f8426fb16a4d611f21ed0f98f670195 (patch) | |
tree | 3bcad988c1928a23964eaba16dae59cb4cdd869c /libsolidity/interface | |
parent | e3f2771771a322fce93fbe4fc32659cd50354de4 (diff) | |
parent | da48bcc51e56d7a088b8e21c45aa12299babbd39 (diff) | |
download | dexon-solidity-2dd9070a4f8426fb16a4d611f21ed0f98f670195.tar.gz dexon-solidity-2dd9070a4f8426fb16a4d611f21ed0f98f670195.tar.zst dexon-solidity-2dd9070a4f8426fb16a4d611f21ed0f98f670195.zip |
Merge pull request #2527 from ethereum/onlyASTIfAnalysisSuccessful
Only output AST if the analysis was successful.
Diffstat (limited to 'libsolidity/interface')
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 1f51851d..15bb7592 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -357,7 +357,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) if (errors.size() > 0) output["errors"] = errors; - bool parsingSuccess = m_compilerStack.state() >= CompilerStack::State::ParsingSuccessful; + bool analysisSuccess = m_compilerStack.state() >= CompilerStack::State::AnalysisSuccessful; bool compilationSuccess = m_compilerStack.state() == CompilerStack::State::CompilationSuccessful; /// Inconsistent state - stop here to receive error reports from users @@ -366,7 +366,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) output["sources"] = Json::objectValue; unsigned sourceIndex = 0; - for (auto const& source: parsingSuccess ? m_compilerStack.sourceNames() : vector<string>()) + for (auto const& source: analysisSuccess ? m_compilerStack.sourceNames() : vector<string>()) { Json::Value sourceResult = Json::objectValue; sourceResult["id"] = sourceIndex++; |