aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CommandLineInterface.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-03-21 02:06:17 +0800
committerdjudjuu <julfaber@gmail.com>2017-05-17 17:14:33 +0800
commitdea7b864e6bbd80b913abf44dc4748868c5d6975 (patch)
treeebf81211d3f0a40fdbaf973e1913365942e5fe29 /solc/CommandLineInterface.cpp
parent242e43188161d15d36d831652b03095690524c72 (diff)
downloaddexon-solidity-dea7b864e6bbd80b913abf44dc4748868c5d6975.tar
dexon-solidity-dea7b864e6bbd80b913abf44dc4748868c5d6975.tar.gz
dexon-solidity-dea7b864e6bbd80b913abf44dc4748868c5d6975.tar.bz2
dexon-solidity-dea7b864e6bbd80b913abf44dc4748868c5d6975.tar.lz
dexon-solidity-dea7b864e6bbd80b913abf44dc4748868c5d6975.tar.xz
dexon-solidity-dea7b864e6bbd80b913abf44dc4748868c5d6975.tar.zst
dexon-solidity-dea7b864e6bbd80b913abf44dc4748868c5d6975.zip
Compact format for AST-Json with backwards compatibility
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 0f2e83dc..ebd16fd3 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -835,9 +835,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;
@@ -880,8 +880,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);
@@ -905,8 +904,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));
}
}
}