Allow natspec comments on state variables.

This commit is contained in:
Alexander Arlt
2020-05-19 11:01:52 -05:00
parent 7d37ed4531
commit af8bb5fb60
21 changed files with 320 additions and 161 deletions
@@ -6,7 +6,7 @@
{
"C":
[
20
23
]
},
"license": null
@@ -30,13 +30,54 @@
"fullyImplemented": true,
"linearizedBaseContracts":
[
20
23
],
"name": "C",
"scope": 21
"scope": 24
},
"children":
[
{
"attributes":
{
"constant": false,
"functionSelector": "c19d93fb",
"mutability": "mutable",
"name": "state",
"overrides": null,
"scope": 23,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "public"
},
"children":
[
{
"attributes":
{
"name": "uint",
"type": "uint256"
},
"id": 8,
"name": "ElementaryTypeName",
"src": "48:4:3"
},
{
"attributes":
{
"text": "Some comment on state var."
},
"id": 7,
"name": "StructuredDocumentation",
"src": "15:32:3"
}
],
"id": 9,
"name": "VariableDeclaration",
"src": "48:17:3"
},
{
"attributes":
{
@@ -50,9 +91,9 @@
{
"text": "Some comment on Evt."
},
"id": 7,
"id": 10,
"name": "StructuredDocumentation",
"src": "15:26:3"
"src": "69:26:3"
},
{
"attributes":
@@ -63,14 +104,14 @@
]
},
"children": [],
"id": 8,
"id": 11,
"name": "ParameterList",
"src": "51:2:3"
"src": "105:2:3"
}
],
"id": 9,
"id": 12,
"name": "EventDefinition",
"src": "42:12:3"
"src": "96:12:3"
},
{
"attributes":
@@ -87,9 +128,9 @@
{
"text": "Some comment on mod."
},
"id": 10,
"id": 13,
"name": "StructuredDocumentation",
"src": "57:26:3"
"src": "111:26:3"
},
{
"attributes":
@@ -100,27 +141,27 @@
]
},
"children": [],
"id": 11,
"id": 14,
"name": "ParameterList",
"src": "96:2:3"
"src": "150:2:3"
},
{
"children":
[
{
"id": 12,
"id": 15,
"name": "PlaceholderStatement",
"src": "101:1:3"
"src": "155:1:3"
}
],
"id": 13,
"id": 16,
"name": "Block",
"src": "99:6:3"
"src": "153:6:3"
}
],
"id": 14,
"id": 17,
"name": "ModifierDefinition",
"src": "84:21:3"
"src": "138:21:3"
},
{
"attributes":
@@ -135,7 +176,7 @@
],
"name": "fn",
"overrides": null,
"scope": 20,
"scope": 23,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
@@ -147,9 +188,9 @@
{
"text": "Some comment on fn."
},
"id": 15,
"id": 18,
"name": "StructuredDocumentation",
"src": "108:25:3"
"src": "162:25:3"
},
{
"attributes":
@@ -160,9 +201,9 @@
]
},
"children": [],
"id": 16,
"id": 19,
"name": "ParameterList",
"src": "145:2:3"
"src": "199:2:3"
},
{
"attributes":
@@ -173,9 +214,9 @@
]
},
"children": [],
"id": 17,
"id": 20,
"name": "ParameterList",
"src": "155:0:3"
"src": "209:0:3"
},
{
"attributes":
@@ -186,22 +227,22 @@
]
},
"children": [],
"id": 18,
"id": 21,
"name": "Block",
"src": "155:2:3"
"src": "209:2:3"
}
],
"id": 19,
"id": 22,
"name": "FunctionDefinition",
"src": "134:23:3"
"src": "188:23:3"
}
],
"id": 20,
"id": 23,
"name": "ContractDefinition",
"src": "0:159:3"
"src": "0:213:3"
}
],
"id": 21,
"id": 24,
"name": "SourceUnit",
"src": "0:160:3"
"src": "0:214:3"
}