solidity/test/libsolidity/ASTJSON/source_location_parseOnly.json

127 lines
3.4 KiB
JSON
Raw Normal View History

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