diff options
Diffstat (limited to 'libsolidity/ast/ASTJsonConverter.cpp')
-rw-r--r-- | libsolidity/ast/ASTJsonConverter.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp index 3fce1180..37dfd3c6 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -226,6 +226,20 @@ bool ASTJsonConverter::visit(UserDefinedTypeName const& _node) return true; } +bool ASTJsonConverter::visit(FunctionTypeName const& _node) +{ + string visibility = "internal"; + if (_node.visibility() == Declaration::Visibility::External) + visibility = "external"; + + addJsonNode(_node, "FunctionTypeName", { + make_pair("payable", _node.isPayable()), + make_pair("visibility", visibility), + make_pair("constant", _node.isDeclaredConst()) + }, true); + return true; +} + bool ASTJsonConverter::visit(Mapping const& _node) { addJsonNode(_node, "Mapping", {}, true); @@ -507,6 +521,11 @@ void ASTJsonConverter::endVisit(UserDefinedTypeName const&) { } +void ASTJsonConverter::endVisit(FunctionTypeName const&) +{ + goUp(); +} + void ASTJsonConverter::endVisit(Mapping const&) { goUp(); |