mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Consider pure as constant for the AST JSON (to aid static analyzers)
This commit is contained in:
parent
23c791e4df
commit
f646247dfb
@ -325,7 +325,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(m_legacy ? "constant" : "isDeclaredConst", _node.stateMutability() <= StateMutability::View),
|
||||
make_pair("payable", _node.isPayable()),
|
||||
make_pair("statemutability", stateMutabilityToString(_node.stateMutability())),
|
||||
make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
|
||||
@ -418,7 +418,7 @@ bool ASTJsonConverter::visit(FunctionTypeName const& _node)
|
||||
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(m_legacy ? "constant" : "isDeclaredConst", _node.stateMutability() <= StateMutability::View),
|
||||
make_pair("parameterTypes", toJson(*_node.parameterTypeList())),
|
||||
make_pair("returnParameterTypes", toJson(*_node.returnParameterTypeList())),
|
||||
make_pair("typeDescriptions", typePointerToJson(_node.annotation().type))
|
||||
|
Loading…
Reference in New Issue
Block a user