aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CommandLineInterface.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-05-22 20:33:46 +0800
committerGitHub <noreply@github.com>2017-05-22 20:33:46 +0800
commit8eead553aff1ec30c3d1b15ae9b2929b887ede49 (patch)
treea9eba765277360c579ee89ee78d9606c17cb9ffa /solc/CommandLineInterface.cpp
parente3af064098edae79aa3bbfb2a96b43fa3479269d (diff)
parente82df073d15237455b1e53e35ef544aea72a69f9 (diff)
downloaddexon-solidity-8eead553aff1ec30c3d1b15ae9b2929b887ede49.tar.gz
dexon-solidity-8eead553aff1ec30c3d1b15ae9b2929b887ede49.tar.zst
dexon-solidity-8eead553aff1ec30c3d1b15ae9b2929b887ede49.zip
Merge pull request #1810 from ethereum/compactJson
Compact format for AST-Json.
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r--solc/CommandLineInterface.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index d5a60b50..e55e3e7e 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -838,9 +838,9 @@ void CommandLineInterface::handleCombinedJSON()
output[g_strSources] = Json::Value(Json::objectValue);
for (auto const& sourceCode: m_sourceCodes)
{
- ASTJsonConverter converter(m_compiler->ast(sourceCode.first), m_compiler->sourceIndices());
+ ASTJsonConverter converter(true, m_compiler->sourceIndices());
output[g_strSources][sourceCode.first] = Json::Value(Json::objectValue);
- output[g_strSources][sourceCode.first]["AST"] = converter.json();
+ output[g_strSources][sourceCode.first]["AST"] = converter.toJson(m_compiler->ast(sourceCode.first));
}
}
cout << dev::jsonCompactPrint(output) << endl;
@@ -883,8 +883,7 @@ void CommandLineInterface::handleAst(string const& _argStr)
}
else
{
- ASTJsonConverter converter(m_compiler->ast(sourceCode.first));
- converter.print(data);
+ ASTJsonConverter(true).print(data, m_compiler->ast(sourceCode.first));
postfix += "_json";
}
boost::filesystem::path path(sourceCode.first);
@@ -908,8 +907,7 @@ void CommandLineInterface::handleAst(string const& _argStr)
}
else
{
- ASTJsonConverter converter(m_compiler->ast(sourceCode.first));
- converter.print(cout);
+ ASTJsonConverter(true).print(cout, m_compiler->ast(sourceCode.first));
}
}
}