Fix develop 060 merge

This commit is contained in:
Leonardo Alt
2019-11-20 13:49:40 +01:00
parent 389da5228e
commit 72eff30778
5 changed files with 22 additions and 22 deletions
+7 -7
View File
@@ -83,7 +83,7 @@ Json::Value AsmJsonConverter::operator()(Assignment const& _node) const
Json::Value ret = createAstNode(_node.location, "YulAssignment");
for (auto const& var: _node.variableNames)
ret["variableNames"].append((*this)(var));
ret["value"] = _node.value ? boost::apply_visitor(*this, *_node.value) : Json::nullValue;
ret["value"] = _node.value ? std::visit(*this, *_node.value) : Json::nullValue;
return ret;
}
@@ -98,7 +98,7 @@ Json::Value AsmJsonConverter::operator()(FunctionCall const& _node) const
Json::Value AsmJsonConverter::operator()(ExpressionStatement const& _node) const
{
Json::Value ret = createAstNode(_node.location, "YulExpressionStatement");
ret["expression"] = boost::apply_visitor(*this, _node.expression);
ret["expression"] = std::visit(*this, _node.expression);
return ret;
}
@@ -108,7 +108,7 @@ Json::Value AsmJsonConverter::operator()(VariableDeclaration const& _node) const
for (auto const& var: _node.variables)
ret["variables"].append((*this)(var));
ret["value"] = _node.value ? boost::apply_visitor(*this, *_node.value) : Json::nullValue;
ret["value"] = _node.value ? std::visit(*this, *_node.value) : Json::nullValue;
return ret;
}
@@ -130,7 +130,7 @@ Json::Value AsmJsonConverter::operator()(If const& _node) const
{
solAssert(_node.condition, "Invalid if condition.");
Json::Value ret = createAstNode(_node.location, "YulIf");
ret["condition"] = boost::apply_visitor(*this, *_node.condition);
ret["condition"] = std::visit(*this, *_node.condition);
ret["body"] = (*this)(_node.body);
return ret;
}
@@ -139,7 +139,7 @@ Json::Value AsmJsonConverter::operator()(Switch const& _node) const
{
solAssert(_node.expression, "Invalid expression pointer.");
Json::Value ret = createAstNode(_node.location, "YulSwitch");
ret["expression"] = boost::apply_visitor(*this, *_node.expression);
ret["expression"] = std::visit(*this, *_node.expression);
for (auto const& var: _node.cases)
ret["cases"].append((*this)(var));
return ret;
@@ -158,7 +158,7 @@ Json::Value AsmJsonConverter::operator()(ForLoop const& _node) const
solAssert(_node.condition, "Invalid for loop condition.");
Json::Value ret = createAstNode(_node.location, "YulForLoop");
ret["pre"] = (*this)(_node.pre);
ret["condition"] = boost::apply_visitor(*this, *_node.condition);
ret["condition"] = std::visit(*this, *_node.condition);
ret["post"] = (*this)(_node.post);
ret["body"] = (*this)(_node.body);
return ret;
@@ -195,7 +195,7 @@ Json::Value AsmJsonConverter::vectorOfVariantsToJson(vector<T> const& _vec) cons
{
Json::Value ret{Json::arrayValue};
for (auto const& var: _vec)
ret.append(boost::apply_visitor(*this, var));
ret.append(std::visit(*this, var));
return ret;
}