diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-16 23:55:58 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-17 00:23:09 +0800 |
commit | 33ea314a24a17e9d3906c7a4fef0298ea674eb0f (patch) | |
tree | 35fcc4d91455769184811a45aa664b2520eef3a5 | |
parent | a61c88e9fea2cb61bc9db11d3eded033a7630c45 (diff) | |
download | dexon-solidity-33ea314a24a17e9d3906c7a4fef0298ea674eb0f.tar.gz dexon-solidity-33ea314a24a17e9d3906c7a4fef0298ea674eb0f.tar.zst dexon-solidity-33ea314a24a17e9d3906c7a4fef0298ea674eb0f.zip |
Add statemutability to AST JSON
-rw-r--r-- | libsolidity/ast/ASTJsonConverter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp index abee55ee..ee74b1e6 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -325,6 +325,7 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node) make_pair("name", _node.name()), make_pair(m_legacy ? "constant" : "isDeclaredConst", _node.isDeclaredConst()), make_pair("payable", _node.isPayable()), + make_pair("statemutability", stateMutabilityToString(_node.stateMutability())), make_pair("visibility", Declaration::visibilityToString(_node.visibility())), make_pair("parameters", toJson(_node.parameterList())), make_pair("isConstructor", _node.isConstructor()), @@ -419,6 +420,7 @@ bool ASTJsonConverter::visit(FunctionTypeName const& _node) setJsonNode(_node, "FunctionTypeName", { make_pair("payable", _node.isPayable()), make_pair("visibility", Declaration::visibilityToString(_node.visibility())), + make_pair("statemutability", stateMutabilityToString(_node.stateMutability())), make_pair(m_legacy ? "constant" : "isDeclaredConst", _node.isDeclaredConst()), make_pair("parameterTypes", toJson(*_node.parameterTypeList())), make_pair("returnParameterTypes", toJson(*_node.returnParameterTypeList())), |