aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-05-24 20:28:07 +0800
committerGitHub <noreply@github.com>2017-05-24 20:28:07 +0800
commit451acd4c9f118a299e627d574dee1785d870723a (patch)
tree12251bfd5b6512b50830bcdf4d08433440c5a2fa /libsolidity
parent85e19cb3859d137df2f4717a9cd261c95fc5f434 (diff)
parent26abd61d9b3523fbc81ad33b8826bb06005b95c6 (diff)
downloaddexon-solidity-451acd4c9f118a299e627d574dee1785d870723a.tar.gz
dexon-solidity-451acd4c9f118a299e627d574dee1785d870723a.tar.zst
dexon-solidity-451acd4c9f118a299e627d574dee1785d870723a.zip
Merge pull request #2301 from ethereum/ASTFunctionTypeFix
insert ParameterList-node in FunctionType-json
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/ast/AST.h2
-rw-r--r--libsolidity/ast/ASTJsonConverter.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index 71b81a69..ba1d0589 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -873,6 +873,8 @@ public:
std::vector<ASTPointer<VariableDeclaration>> const& parameterTypes() const { return m_parameterTypes->parameters(); }
std::vector<ASTPointer<VariableDeclaration>> const& returnParameterTypes() const { return m_returnTypes->parameters(); }
+ ASTPointer<ParameterList> const& parameterTypeList() const { return m_parameterTypes; }
+ ASTPointer<ParameterList> const& returnParameterTypeList() const { return m_returnTypes; }
Declaration::Visibility visibility() const
{
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp
index a7b61c4e..cdf70cf9 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;