mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Create children node in ASTJsonConverter when neccesary
This commit is contained in:
parent
e3f90565d8
commit
4b56829ac3
@ -91,11 +91,19 @@ void ASTJsonConverter::setJsonNode(
|
||||
))
|
||||
{
|
||||
if (e.second.isObject())
|
||||
{
|
||||
if (!m_currentValue["children"].isArray())
|
||||
m_currentValue["children"] = Json::arrayValue;
|
||||
appendMove(m_currentValue["children"], std::move(e.second));
|
||||
}
|
||||
if (e.second.isArray())
|
||||
for (auto& child: e.second)
|
||||
if (!child.isNull())
|
||||
{
|
||||
if (!m_currentValue["children"].isArray())
|
||||
m_currentValue["children"] = Json::arrayValue;
|
||||
appendMove(m_currentValue["children"], std::move(child));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user