solidity/test/libsolidity/ASTJSON/fail_after_parsing.json

311 lines
8.5 KiB
JSON
Raw Normal View History

{
"absolutePath": "a",
"exportedSymbols":
{
"I":
[
29
],
"g":
[
3
]
},
"id": 30,
"nodeType": "SourceUnit",
"nodes":
[
{
"id": 3,
"implemented": false,
"kind": "freeFunction",
"modifiers": [],
"name": "g",
"nameLocation": "9:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "10:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "19:0:1"
},
"scope": 30,
"src": "0:20:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "I",
"contractDependencies": [],
"contractKind": "interface",
"id": 29,
"linearizedBaseContracts":
[
29
],
"name": "I",
"nameLocation": "31:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"canonicalName": "I.S",
"id": 7,
"members":
[
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "s",
"nameLocation": "52:1:1",
"nodeType": "VariableDeclaration",
"scope": 7,
"src": "50:3:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {},
"typeName":
{
"id": 5,
"nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 4,
"name": "S",
"nodeType": "IdentifierPath",
"referencedDeclaration": 7,
"src": "50:1:1"
},
"referencedDeclaration": 7,
"src": "50:1:1",
"typeDescriptions": {}
},
"visibility": "internal"
}
],
"name": "S",
"nameLocation": "46:1:1",
"nodeType": "StructDefinition",
"scope": 29,
"src": "39:17:1",
"visibility": "public"
},
{
"body":
{
"id": 27,
"nodeType": "Block",
"src": "85:74:1",
"statements":
[
{
"assignments":
[
15
],
"declarations":
[
{
"constant": false,
"id": 15,
"mutability": "mutable",
"name": "E",
"nameLocation": "101:1:1",
"nodeType": "VariableDeclaration",
"scope": 27,
"src": "95:7:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {},
"typeName":
{
"id": 14,
"nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 13,
"name": "error",
"nodeType": "IdentifierPath",
"src": "95:5:1"
},
"src": "95:5:1",
"typeDescriptions": {}
},
"visibility": "internal"
}
],
"id": 16,
"nodeType": "VariableDeclarationStatement",
"src": "95:7:1"
},
{
"eventCall":
{
"arguments": [],
"expression":
{
"id": 17,
"name": "E",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "110:1:1",
"typeDescriptions": {}
},
"id": 18,
"names": [],
"nodeType": "FunctionCall",
"src": "110:3:1",
"tryCall": false,
"typeDescriptions": {}
},
"id": 19,
"nodeType": "EmitStatement",
"src": "105:8:1"
},
{
"expression":
{
"id": 21,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": true,
"src": "123:3:1",
"subExpression":
{
"id": 20,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "125:1:1",
"typeDescriptions": {}
},
"typeDescriptions": {}
},
"id": 22,
"nodeType": "ExpressionStatement",
"src": "123:3:1"
},
{
"assignments":
[
24
],
"declarations":
[
{
"constant": false,
"id": 24,
"mutability": "mutable",
"name": "c",
"nameLocation": "143:1:1",
"nodeType": "VariableDeclaration",
"scope": 27,
"src": "129:15:1",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {},
"typeName":
{
"id": 23,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "129:4:1",
"typeDescriptions": {}
},
"visibility": "internal"
}
],
"id": 26,
"initialValue":
{
"hexValue": "3132332e34",
"id": 25,
"kind": "number",
"nodeType": "Literal",
"src": "147:5:1",
"typeDescriptions": {},
"value": "123.4"
},
"nodeType": "VariableDeclarationStatement",
"src": "129:23:1"
}
]
},
"id": 28,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "70:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 11,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 10,
"mutability": "mutable",
"name": "e",
"nameLocation": "82:1:1",
"nodeType": "VariableDeclaration",
"scope": 28,
"src": "72:11:1",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {},
"typeName":
{
"id": 9,
"nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 8,
"name": "E",
"nodeType": "IdentifierPath",
"src": "72:1:1"
},
"src": "72:1:1",
"typeDescriptions": {}
},
"visibility": "internal"
}
],
"src": "71:13:1"
},
"returnParameters":
{
"id": 12,
"nodeType": "ParameterList",
"parameters": [],
"src": "85:0:1"
},
"scope": 29,
"src": "61:98:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 30,
"src": "21:140:1",
"usedErrors": []
}
],
"src": "0:162:1"
}