aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface/StandardCompiler.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-07-06 00:24:51 +0800
committerchriseth <chris@ethereum.org>2017-07-06 00:27:32 +0800
commitda48bcc51e56d7a088b8e21c45aa12299babbd39 (patch)
treea9b21dde1adca93cfa069b9af221c4e2f241c28a /libsolidity/interface/StandardCompiler.cpp
parent05a26fc98c1201057c618c536ca0537e456c9b15 (diff)
downloaddexon-solidity-da48bcc51e56d7a088b8e21c45aa12299babbd39.tar.gz
dexon-solidity-da48bcc51e56d7a088b8e21c45aa12299babbd39.tar.zst
dexon-solidity-da48bcc51e56d7a088b8e21c45aa12299babbd39.zip
Only output AST if the analysis was successful.
Diffstat (limited to 'libsolidity/interface/StandardCompiler.cpp')
-rw-r--r--libsolidity/interface/StandardCompiler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp
index e677afc8..4aeabbdd 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++;