Export statement documentation.

This commit is contained in:
chriseth 2021-02-09 15:12:59 +01:00
parent ec62d12319
commit fcdb5e0b40
8 changed files with 1298 additions and 0 deletions

View File

@ -4,6 +4,7 @@ Language Features:
Compiler Features:
* AST: Export NatSpec comments above each statement as their documentation.
Bugfixes:
@ -11,6 +12,9 @@ Bugfixes:
* SMTChecker: Fix missing type constraints on block and transaction variables in the deployment phase.
AST Changes:
* Support field `documentation` to hold NatSpec comments above each statement.
### 0.8.1 (2021-01-27)
Language Features:

View File

@ -99,6 +99,9 @@ void ASTJsonConverter::setJsonNode(
m_currentValue = Json::objectValue;
m_currentValue["id"] = nodeId(_node);
m_currentValue["src"] = sourceLocationToString(_node.location());
if (auto const* documented = dynamic_cast<Documented const*>(&_node))
if (documented->documentation())
m_currentValue["documentation"] = *documented->documentation();
m_currentValue["nodeType"] = _nodeType;
for (auto& e: _attributes)
m_currentValue[e.first] = std::move(e.second);

View File

@ -0,0 +1,369 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
27
]
},
"id": 28,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 27,
"linearizedBaseContracts":
[
27
],
"name": "C",
"nodeType": "ContractDefinition",
"nodes":
[
{
"constant": false,
"id": 2,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"scope": 27,
"src": "45:6:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 1,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "45:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"body":
{
"id": 25,
"nodeType": "Block",
"src": "99:229:1",
"statements":
[
{
"body":
{
"id": 21,
"nodeType": "Block",
"src": "156:66:1",
"statements":
[
{
"expression":
{
"id": 19,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide":
{
"id": 17,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "205:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "*=",
"rightHandSide":
{
"hexValue": "32",
"id": 18,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "210:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "205:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20,
"nodeType": "ExpressionStatement",
"src": "205:6:1"
}
]
},
"condition":
{
"commonType":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 13,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression":
{
"id": 11,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8,
"src": "143:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression":
{
"hexValue": "3230",
"id": 12,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "147:2:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
},
"value": "20"
},
"src": "143:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22,
"initializationExpression":
{
"assignments":
[
8
],
"declarations":
[
{
"constant": false,
"id": 8,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 22,
"src": "131:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 7,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "131:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 10,
"initialValue":
{
"hexValue": "30",
"id": 9,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "140:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "131:10:1"
},
"loopExpression":
{
"expression":
{
"id": 15,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "151:3:1",
"subExpression":
{
"id": 14,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8,
"src": "151:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 16,
"nodeType": "ExpressionStatement",
"src": "151:3:1"
},
"nodeType": "ForStatement",
"src": "126:96:1"
},
{
"expression":
{
"id": 23,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "320:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6,
"id": 24,
"nodeType": "Return",
"src": "313:8:1"
}
]
},
"functionSelector": "26121ff0",
"id": 26,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 3,
"nodeType": "ParameterList",
"parameters": [],
"src": "67:2:1"
},
"returnParameters":
{
"id": 6,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "x",
"nodeType": "VariableDeclaration",
"scope": 26,
"src": "91:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 4,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "91:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "90:8:1"
},
"scope": 27,
"src": "57:271:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"scope": 28,
"src": "0:330:1"
}
],
"src": "0:331:1"
}

View File

@ -0,0 +1,16 @@
contract C {
// this is not exported
uint a;
function f() public pure returns (uint x) {
// test2
for (uint i = 0; i < 20; i++) {
// not exported either
x *= 2;
}
// nor is this because they are all
// not using the triple-slash
return x;
}
}
// ----

View File

@ -0,0 +1,254 @@
{
"absolutePath": "a",
"id": 28,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"id": 27,
"name": "C",
"nodeType": "ContractDefinition",
"nodes":
[
{
"constant": false,
"id": 2,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"src": "45:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {},
"typeName":
{
"id": 1,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "45:4:1",
"typeDescriptions": {}
},
"visibility": "internal"
},
{
"body":
{
"id": 25,
"nodeType": "Block",
"src": "99:229:1",
"statements":
[
{
"body":
{
"id": 21,
"nodeType": "Block",
"src": "156:66:1",
"statements":
[
{
"expression":
{
"id": 19,
"leftHandSide":
{
"id": 17,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "205:1:1",
"typeDescriptions": {}
},
"nodeType": "Assignment",
"operator": "*=",
"rightHandSide":
{
"hexValue": "32",
"id": 18,
"kind": "number",
"nodeType": "Literal",
"src": "210:1:1",
"typeDescriptions": {},
"value": "2"
},
"src": "205:6:1",
"typeDescriptions": {}
},
"id": 20,
"nodeType": "ExpressionStatement",
"src": "205:6:1"
}
]
},
"condition":
{
"commonType": {},
"id": 13,
"leftExpression":
{
"id": 11,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "143:1:1",
"typeDescriptions": {}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression":
{
"hexValue": "3230",
"id": 12,
"kind": "number",
"nodeType": "Literal",
"src": "147:2:1",
"typeDescriptions": {},
"value": "20"
},
"src": "143:6:1",
"typeDescriptions": {}
},
"id": 22,
"initializationExpression":
{
"assignments":
[
8
],
"declarations":
[
{
"constant": false,
"id": 8,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"src": "131:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {},
"typeName":
{
"id": 7,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "131:4:1",
"typeDescriptions": {}
},
"visibility": "internal"
}
],
"id": 10,
"initialValue":
{
"hexValue": "30",
"id": 9,
"kind": "number",
"nodeType": "Literal",
"src": "140:1:1",
"typeDescriptions": {},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "131:10:1"
},
"loopExpression":
{
"expression":
{
"id": 15,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "151:3:1",
"subExpression":
{
"id": 14,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "151:1:1",
"typeDescriptions": {}
},
"typeDescriptions": {}
},
"id": 16,
"nodeType": "ExpressionStatement",
"src": "151:3:1"
},
"nodeType": "ForStatement",
"src": "126:96:1"
},
{
"expression":
{
"id": 23,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "320:1:1",
"typeDescriptions": {}
},
"id": 24,
"nodeType": "Return",
"src": "313:8:1"
}
]
},
"id": 26,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 3,
"nodeType": "ParameterList",
"parameters": [],
"src": "67:2:1"
},
"returnParameters":
{
"id": 6,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "x",
"nodeType": "VariableDeclaration",
"src": "91:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {},
"typeName":
{
"id": 4,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "91:4:1",
"typeDescriptions": {}
},
"visibility": "internal"
}
],
"src": "90:8:1"
},
"src": "57:271:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"src": "0:330:1"
}
],
"src": "0:331:1"
}

View File

@ -0,0 +1,379 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
28
]
},
"id": 29,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 28,
"linearizedBaseContracts":
[
28
],
"name": "C",
"nodeType": "ContractDefinition",
"nodes":
[
{
"constant": false,
"documentation":
{
"id": 1,
"nodeType": "StructuredDocumentation",
"src": "17:8:1",
"text": "test"
},
"id": 3,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"scope": 28,
"src": "30:6:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 2,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "30:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"body":
{
"id": 26,
"nodeType": "Block",
"src": "84:181:1",
"statements":
[
{
"body":
{
"id": 22,
"nodeType": "Block",
"src": "142:75:1",
"statements":
[
{
"documentation": "tee\n s \"t\" 3",
"expression":
{
"id": 20,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide":
{
"id": 18,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6,
"src": "200:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "*=",
"rightHandSide":
{
"hexValue": "32",
"id": 19,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "205:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "200:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 21,
"nodeType": "ExpressionStatement",
"src": "200:6:1"
}
]
},
"condition":
{
"commonType":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 14,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression":
{
"id": 12,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "129:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression":
{
"hexValue": "3230",
"id": 13,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "133:2:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
},
"value": "20"
},
"src": "129:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"documentation": "test2",
"id": 23,
"initializationExpression":
{
"assignments":
[
9
],
"declarations":
[
{
"constant": false,
"id": 9,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 23,
"src": "117:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 8,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "117:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 11,
"initialValue":
{
"hexValue": "30",
"id": 10,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "126:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "117:10:1"
},
"loopExpression":
{
"expression":
{
"id": 16,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "137:3:1",
"subExpression":
{
"id": 15,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "137:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 17,
"nodeType": "ExpressionStatement",
"src": "137:3:1"
},
"nodeType": "ForStatement",
"src": "112:105:1"
},
{
"documentation": "tes \"t4\" ",
"expression":
{
"id": 24,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6,
"src": "257:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 7,
"id": 25,
"nodeType": "Return",
"src": "250:8:1"
}
]
},
"functionSelector": "26121ff0",
"id": 27,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 4,
"nodeType": "ParameterList",
"parameters": [],
"src": "52:2:1"
},
"returnParameters":
{
"id": 7,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "x",
"nodeType": "VariableDeclaration",
"scope": 27,
"src": "76:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 5,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "76:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "75:8:1"
},
"scope": 28,
"src": "42:223:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"scope": 29,
"src": "0:267:1"
}
],
"src": "0:268:1"
}

View File

@ -0,0 +1,16 @@
contract C {
/// test
uint a;
function f() public pure returns (uint x) {
/// test2
for (uint i = 0; i < 20; i++) {
/// tee
/// s "t" 3
x *= 2;
}
/** tes "t4" */
return x;
}
}
// ----

View File

@ -0,0 +1,257 @@
{
"absolutePath": "a",
"id": 29,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"id": 28,
"name": "C",
"nodeType": "ContractDefinition",
"nodes":
[
{
"constant": false,
"id": 3,
"mutability": "mutable",
"name": "a",
"nodeType": "VariableDeclaration",
"src": "30:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {},
"typeName":
{
"id": 2,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "30:4:1",
"typeDescriptions": {}
},
"visibility": "internal"
},
{
"body":
{
"id": 26,
"nodeType": "Block",
"src": "84:181:1",
"statements":
[
{
"body":
{
"id": 22,
"nodeType": "Block",
"src": "142:75:1",
"statements":
[
{
"documentation": "tee\n s \"t\" 3",
"expression":
{
"id": 20,
"leftHandSide":
{
"id": 18,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "200:1:1",
"typeDescriptions": {}
},
"nodeType": "Assignment",
"operator": "*=",
"rightHandSide":
{
"hexValue": "32",
"id": 19,
"kind": "number",
"nodeType": "Literal",
"src": "205:1:1",
"typeDescriptions": {},
"value": "2"
},
"src": "200:6:1",
"typeDescriptions": {}
},
"id": 21,
"nodeType": "ExpressionStatement",
"src": "200:6:1"
}
]
},
"condition":
{
"commonType": {},
"id": 14,
"leftExpression":
{
"id": 12,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "129:1:1",
"typeDescriptions": {}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression":
{
"hexValue": "3230",
"id": 13,
"kind": "number",
"nodeType": "Literal",
"src": "133:2:1",
"typeDescriptions": {},
"value": "20"
},
"src": "129:6:1",
"typeDescriptions": {}
},
"documentation": "test2",
"id": 23,
"initializationExpression":
{
"assignments":
[
9
],
"declarations":
[
{
"constant": false,
"id": 9,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"src": "117:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {},
"typeName":
{
"id": 8,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "117:4:1",
"typeDescriptions": {}
},
"visibility": "internal"
}
],
"id": 11,
"initialValue":
{
"hexValue": "30",
"id": 10,
"kind": "number",
"nodeType": "Literal",
"src": "126:1:1",
"typeDescriptions": {},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "117:10:1"
},
"loopExpression":
{
"expression":
{
"id": 16,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "137:3:1",
"subExpression":
{
"id": 15,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "137:1:1",
"typeDescriptions": {}
},
"typeDescriptions": {}
},
"id": 17,
"nodeType": "ExpressionStatement",
"src": "137:3:1"
},
"nodeType": "ForStatement",
"src": "112:105:1"
},
{
"documentation": "tes \"t4\" ",
"expression":
{
"id": 24,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "257:1:1",
"typeDescriptions": {}
},
"id": 25,
"nodeType": "Return",
"src": "250:8:1"
}
]
},
"id": 27,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 4,
"nodeType": "ParameterList",
"parameters": [],
"src": "52:2:1"
},
"returnParameters":
{
"id": 7,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "x",
"nodeType": "VariableDeclaration",
"src": "76:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {},
"typeName":
{
"id": 5,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "76:4:1",
"typeDescriptions": {}
},
"visibility": "internal"
}
],
"src": "75:8:1"
},
"src": "42:223:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"src": "0:267:1"
}
],
"src": "0:268:1"
}