ethers-rs/ethers-solc/test-data/ast/enum_value_declaration.json

165 lines
3.8 KiB
JSON
Raw Normal View History

{
"absolutePath": "a",
"exportedSymbols":
{
"A":
[
3
],
"f":
[
13
]
},
"id": 14,
"nodeType": "SourceUnit",
"nodes":
[
{
"canonicalName": "A",
"id": 3,
"members":
[
{
"id": 1,
"name": "X",
"nameLocation": "9:1:1",
"nodeType": "EnumValue",
"src": "9:1:1"
},
{
"id": 2,
"name": "Y",
"nameLocation": "12:1:1",
"nodeType": "EnumValue",
"src": "12:1:1"
}
],
"name": "A",
"nameLocation": "5:1:1",
"nodeType": "EnumDefinition",
"src": "0:15:1"
},
{
"body":
{
"id": 12,
"nodeType": "Block",
"src": "46:15:1",
"statements":
[
{
"expression":
{
"expression":
{
"id": 9,
"name": "A",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3,
"src": "55:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_type$_t_enum$_A_$3_$",
"typeString": "type(enum A)"
}
},
"id": 10,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "57:1:1",
"memberName": "X",
"nodeType": "MemberAccess",
"referencedDeclaration": 1,
"src": "55:3:1",
"typeDescriptions":
{
"typeIdentifier": "t_enum$_A_$3",
"typeString": "enum A"
}
},
"functionReturnParameters": 8,
"id": 11,
"nodeType": "Return",
"src": "48:10:1"
}
]
},
"id": 13,
"implemented": true,
"kind": "freeFunction",
"modifiers": [],
"name": "f",
"nameLocation": "25:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 4,
"nodeType": "ParameterList",
"parameters": [],
"src": "26:2:1"
},
"returnParameters":
{
"id": 8,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 13,
"src": "43:1:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_enum$_A_$3",
"typeString": "enum A"
},
"typeName":
{
"id": 6,
"nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 5,
"name": "A",
"nameLocations":
[
"43:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 3,
"src": "43:1:1"
},
"referencedDeclaration": 3,
"src": "43:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_enum$_A_$3",
"typeString": "enum A"
}
},
"visibility": "internal"
}
],
"src": "42:3:1"
},
"scope": 14,
"src": "16:45:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"src": "0:62:1"
}