solidity/test/libsolidity/ASTJSON/source_location_parseOnly.json
2022-03-14 14:21:06 +01:00

127 lines
3.4 KiB
JSON

{
"absolutePath": "a",
"id": 13,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"id": 12,
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 10,
"nodeType": "Block",
"src": "33:20:1",
"statements":
[
{
"assignments":
[
4
],
"declarations":
[
{
"constant": false,
"id": 4,
"mutability": "mutable",
"name": "x",
"nameLocation": "40:1:1",
"nodeType": "VariableDeclaration",
"src": "35:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {},
"typeName":
{
"id": 3,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "35:4:1",
"typeDescriptions": {}
},
"visibility": "internal"
}
],
"id": 6,
"initialValue":
{
"hexValue": "32",
"id": 5,
"kind": "number",
"nodeType": "Literal",
"src": "44:1:1",
"typeDescriptions": {},
"value": "2"
},
"nodeType": "VariableDeclarationStatement",
"src": "35:10:1"
},
{
"expression":
{
"id": 8,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "47:3:1",
"subExpression":
{
"id": 7,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "47:1:1",
"typeDescriptions": {}
},
"typeDescriptions": {}
},
"id": 9,
"nodeType": "ExpressionStatement",
"src": "47:3:1"
}
]
},
"id": 11,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "22:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "23:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "33:0:1"
},
"src": "13:40:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"src": "0:55:1",
"usedErrors": []
}
],
"src": "0:56:1"
}