mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove "constant" from JSON AST.
This commit is contained in:
parent
3684151e53
commit
44374a5846
@ -33,6 +33,7 @@ Breaking Changes:
|
|||||||
* General: Remove assembly instruction aliases ``sha3`` and ``suicide``
|
* General: Remove assembly instruction aliases ``sha3`` and ``suicide``
|
||||||
* General: C99-style scoping rules are enforced now. This was already the case in the experimental 0.5.0 mode.
|
* General: C99-style scoping rules are enforced now. This was already the case in the experimental 0.5.0 mode.
|
||||||
* General: Disallow combining hex numbers with unit denominations (e.g. ``0x1e wei``). This was already the case in the experimental 0.5.0 mode.
|
* General: Disallow combining hex numbers with unit denominations (e.g. ``0x1e wei``). This was already the case in the experimental 0.5.0 mode.
|
||||||
|
* JSON AST: Remove ``constant`` and ``payable`` fields (the information is encoded in the ``stateMutability`` field).
|
||||||
* Name Resolver: Do not exclude public state variables when looking for conflicting declarations.
|
* Name Resolver: Do not exclude public state variables when looking for conflicting declarations.
|
||||||
* Optimizer: Remove the no-op ``PUSH1 0 NOT AND`` sequence.
|
* Optimizer: Remove the no-op ``PUSH1 0 NOT AND`` sequence.
|
||||||
* Parser: Disallow trailing dots that are not followed by a number.
|
* Parser: Disallow trailing dots that are not followed by a number.
|
||||||
|
@ -325,9 +325,6 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node)
|
|||||||
std::vector<pair<string, Json::Value>> attributes = {
|
std::vector<pair<string, Json::Value>> attributes = {
|
||||||
make_pair("name", _node.name()),
|
make_pair("name", _node.name()),
|
||||||
make_pair("documentation", _node.documentation() ? Json::Value(*_node.documentation()) : Json::nullValue),
|
make_pair("documentation", _node.documentation() ? Json::Value(*_node.documentation()) : Json::nullValue),
|
||||||
// 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())),
|
make_pair("stateMutability", stateMutabilityToString(_node.stateMutability())),
|
||||||
make_pair("superFunction", idOrNull(_node.annotation().superFunction)),
|
make_pair("superFunction", idOrNull(_node.annotation().superFunction)),
|
||||||
make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
|
make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
|
||||||
@ -418,11 +415,8 @@ bool ASTJsonConverter::visit(UserDefinedTypeName const& _node)
|
|||||||
bool ASTJsonConverter::visit(FunctionTypeName const& _node)
|
bool ASTJsonConverter::visit(FunctionTypeName const& _node)
|
||||||
{
|
{
|
||||||
setJsonNode(_node, "FunctionTypeName", {
|
setJsonNode(_node, "FunctionTypeName", {
|
||||||
make_pair("payable", _node.isPayable()),
|
|
||||||
make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
|
make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
|
||||||
make_pair("stateMutability", stateMutabilityToString(_node.stateMutability())),
|
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("parameterTypes", toJson(*_node.parameterTypeList())),
|
||||||
make_pair("returnParameterTypes", toJson(*_node.returnParameterTypeList())),
|
make_pair("returnParameterTypes", toJson(*_node.returnParameterTypeList())),
|
||||||
make_pair("typeDescriptions", typePointerToJson(_node.annotation().type, true))
|
make_pair("typeDescriptions", typePointerToJson(_node.annotation().type, true))
|
||||||
|
Loading…
Reference in New Issue
Block a user