aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/ASTJsonConverter.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-09-08 09:18:17 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-23 01:24:22 +0800
commitefe4d68a7bdc55fd79b9e01b863064b27528428a (patch)
tree66fed23805dcf2dffdb2bc8509ddf077ac99e45d /libsolidity/ast/ASTJsonConverter.cpp
parent210b4870a805620329793c8ba2177a3ff6e7b477 (diff)
downloaddexon-solidity-efe4d68a7bdc55fd79b9e01b863064b27528428a.tar.gz
dexon-solidity-efe4d68a7bdc55fd79b9e01b863064b27528428a.tar.zst
dexon-solidity-efe4d68a7bdc55fd79b9e01b863064b27528428a.zip
Introduce view (and keep constant as an alias)
Diffstat (limited to 'libsolidity/ast/ASTJsonConverter.cpp')
-rw-r--r--libsolidity/ast/ASTJsonConverter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp
index f7661357..cb74ea39 100644
--- a/libsolidity/ast/ASTJsonConverter.cpp
+++ b/libsolidity/ast/ASTJsonConverter.cpp
@@ -323,6 +323,7 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node)
{
std::vector<pair<string, Json::Value>> attributes = {
make_pair("name", _node.name()),
+ // FIXME: remove with next breaking release
make_pair(m_legacy ? "constant" : "isDeclaredConst", _node.stateMutability() == StateMutability::View),
make_pair("payable", _node.isPayable()),
make_pair("statemutability", stateMutabilityToString(_node.stateMutability())),
@@ -415,6 +416,7 @@ bool ASTJsonConverter::visit(FunctionTypeName const& _node)
make_pair("payable", _node.isPayable()),
make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
make_pair("statemutability", stateMutabilityToString(_node.stateMutability())),
+ // FIXME: remove with next breaking release
make_pair(m_legacy ? "constant" : "isDeclaredConst", _node.stateMutability() == StateMutability::View),
make_pair("parameterTypes", toJson(*_node.parameterTypeList())),
make_pair("returnParameterTypes", toJson(*_node.returnParameterTypeList())),