From 26abd61d9b3523fbc81ad33b8826bb06005b95c6 Mon Sep 17 00:00:00 2001 From: djudjuu Date: Wed, 24 May 2017 13:52:16 +0200 Subject: [PATCH] insert ParameterList-node in FunctionType-json --- libsolidity/ast/AST.h | 2 ++ libsolidity/ast/ASTJsonConverter.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index 71b81a695..ba1d05899 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -873,6 +873,8 @@ public: std::vector> const& parameterTypes() const { return m_parameterTypes->parameters(); } std::vector> const& returnParameterTypes() const { return m_returnTypes->parameters(); } + ASTPointer const& parameterTypeList() const { return m_parameterTypes; } + ASTPointer const& returnParameterTypeList() const { return m_returnTypes; } Declaration::Visibility visibility() const { diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp index 40c552a3d..5a411dd8e 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -420,8 +420,8 @@ bool ASTJsonConverter::visit(FunctionTypeName const& _node) make_pair("payable", _node.isPayable()), make_pair("visibility", visibility(_node.visibility())), make_pair(m_legacy ? "constant" : "isDeclaredConst", _node.isDeclaredConst()), - make_pair("parameterTypes", toJson(_node.parameterTypes())), - make_pair("returnParameterTypes", toJson(_node.returnParameterTypes())), + make_pair("parameterTypes", toJson(*_node.parameterTypeList())), + make_pair("returnParameterTypes", toJson(*_node.returnParameterTypeList())), make_pair("typeDescriptions", typePointerToJson(_node.annotation().type)) }); return false;