Remove null values from AST also in standard-json mode.

This commit is contained in:
chriseth
2020-08-19 11:06:14 +02:00
parent 3c27d36ebd
commit 7b8cc0c49b
6 changed files with 9 additions and 8 deletions
+3 -3
View File
@@ -203,13 +203,13 @@ Json::Value ASTJsonConverter::inlineAssemblyIdentifierToJson(pair<yul::Identifie
void ASTJsonConverter::print(ostream& _stream, ASTNode const& _node)
{
_stream << util::jsonPrettyPrint(util::removeNullMembers(toJson(_node)));
_stream << util::jsonPrettyPrint(toJson(_node));
}
Json::Value&& ASTJsonConverter::toJson(ASTNode const& _node)
Json::Value ASTJsonConverter::toJson(ASTNode const& _node)
{
_node.accept(*this);
return std::move(m_currentValue);
return util::removeNullMembers(std::move(m_currentValue));
}
bool ASTJsonConverter::visit(SourceUnit const& _node)