mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace `isConstructor
field in the JSON AST by a
kind
` field.
This commit is contained in:
parent
7d5c139816
commit
395ab9a872
@ -35,6 +35,7 @@ Breaking Changes:
|
||||
* 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.
|
||||
* JSON AST: Remove ``constant`` and ``payable`` fields (the information is encoded in the ``stateMutability`` field).
|
||||
* JSON AST: Replace the ``isConstructor`` field by a new ``kind`` field, which can be ``constructor``, ``fallback`` or ``function``.
|
||||
* Interface: Remove "clone contract" feature. The ``--clone-bin`` and ``--combined-json clone-bin`` commandline options are not available anymore.
|
||||
* Name Resolver: Do not exclude public state variables when looking for conflicting declarations.
|
||||
* Optimizer: Remove the no-op ``PUSH1 0 NOT AND`` sequence.
|
||||
|
@ -325,11 +325,11 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node)
|
||||
std::vector<pair<string, Json::Value>> attributes = {
|
||||
make_pair("name", _node.name()),
|
||||
make_pair("documentation", _node.documentation() ? Json::Value(*_node.documentation()) : Json::nullValue),
|
||||
make_pair("kind", _node.isConstructor() ? "constructor" : (_node.isFallback() ? "fallback" : "function")),
|
||||
make_pair("stateMutability", stateMutabilityToString(_node.stateMutability())),
|
||||
make_pair("superFunction", idOrNull(_node.annotation().superFunction)),
|
||||
make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
|
||||
make_pair("parameters", toJson(_node.parameterList())),
|
||||
make_pair("isConstructor", _node.isConstructor()),
|
||||
make_pair("returnParameters", toJson(*_node.returnParameterList())),
|
||||
make_pair("modifiers", toJson(_node.modifiers())),
|
||||
make_pair("body", _node.isImplemented() ? toJson(_node.body()) : Json::nullValue),
|
||||
|
@ -147,7 +147,7 @@
|
||||
"documentation" : "Some comment on fn.",
|
||||
"id" : 14,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "fn",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
|
@ -107,7 +107,7 @@
|
||||
{
|
||||
"documentation" : "Some comment on fn.",
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
|
@ -37,7 +37,7 @@
|
||||
"documentation" : null,
|
||||
"id" : 16,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
|
@ -40,7 +40,7 @@
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
|
@ -142,7 +142,7 @@
|
||||
"documentation" : null,
|
||||
"id" : 10,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
|
@ -40,7 +40,7 @@
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
|
@ -148,7 +148,7 @@
|
||||
"documentation" : null,
|
||||
"id" : 13,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
|
@ -82,7 +82,7 @@
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
|
@ -97,7 +97,7 @@
|
||||
"documentation" : null,
|
||||
"id" : 13,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
{
|
||||
|
@ -104,7 +104,7 @@
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"name" : "F",
|
||||
"scope" : 14,
|
||||
"stateMutability" : "nonpayable",
|
||||
|
@ -97,7 +97,7 @@
|
||||
"documentation" : null,
|
||||
"id" : 13,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
{
|
||||
|
@ -104,7 +104,7 @@
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"name" : "F",
|
||||
"scope" : 14,
|
||||
"stateMutability" : "nonpayable",
|
||||
|
@ -89,7 +89,7 @@
|
||||
"documentation" : null,
|
||||
"id" : 7,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
|
@ -40,7 +40,7 @@
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
|
@ -93,7 +93,7 @@
|
||||
"documentation" : null,
|
||||
"id" : 9,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
|
@ -40,7 +40,7 @@
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
|
@ -105,7 +105,7 @@
|
||||
"documentation" : null,
|
||||
"id" : 10,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
|
@ -40,7 +40,7 @@
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
|
@ -127,7 +127,7 @@
|
||||
"documentation" : null,
|
||||
"id" : 10,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
|
@ -40,7 +40,7 @@
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
|
Loading…
Reference in New Issue
Block a user