Commit 4fb2c6f2 authored by aniket-engg's avatar aniket-engg

separated ASTs

parent 2657a39e
{
"attributes": {
"constant": false,
"name": "getY",
"payable": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"name": "z",
"type": "uint256"
},
"children": [
{
"attributes": {
"name": "uint"
},
"name": "ElementaryTypeName"
}
],
"name": "VariableDeclaration"
},
{
"attributes": {
"name": "r",
"type": "bool"
},
"children": [
{
"attributes": {
"name": "bool"
},
"name": "ElementaryTypeName"
}
],
"name": "VariableDeclaration"
}
],
"name": "ParameterList"
},
{
"children": [
{
"attributes": {
"name": "",
"type": "uint256"
},
"children": [
{
"attributes": {
"name": "uint"
},
"id": 34,
"name": "ElementaryTypeName",
"src": "285:4:0"
}
],
"id": 35,
"name": "VariableDeclaration",
"src": "285:4:0"
}
],
"name": "ParameterList"
},
{
"children": [],
"name": "Block"
}
],
"name": "FunctionDefinition"
}
\ No newline at end of file
{
"attributes": {
"constant": true,
"name": "winnerName",
"payable": false,
"visibility": "public"
},
"children": [
{
"children": [
],
"name": "ParameterList"
},
{
"children": [],
"name": "ParameterList"
},
{
"children": [],
"name": "Block"
}
],
"name": "FunctionDefinition"
}
\ No newline at end of file
......@@ -8,5 +8,11 @@ module.exports = {
inlineAssembly: require('./inlineAssembly.json'),
forLoopNode: require('./forLoopNode.json'),
whileLoopNode: require('./whileLoopNode.json'),
doWhileLoopNode: require('./doWhileLoopNode.json')
doWhileLoopNode: require('./doWhileLoopNode.json'),
stateVariableContractNode: require('./stateVariableContractNode.json'),
functionDefinition: require('./functionDefinition.json'),
fullyQualifiedFunctionDefinition: require('./fullyQualifiedFunctionDefinition.json'),
selfdestruct: require('./selfdestruct.json'),
storageVariableNodes: require('./storageVariableNodes.json'),
lowlevelCall: require('./lowlevelCall.json')
}
{
"sendAst": { "name": "MemberAccess",
"children": [
{
"attributes": {
"value": "d",
"type": "address"
}
}],
"attributes": {
"value": "send",
"type": "function (uint256) returns (bool)" }
},
"callAst": { "name": "MemberAccess", "children": [{
"attributes": {
"value": "f",
"type": "address"
}}],
"attributes": {
"member_name": "call",
"type": "function () payable returns (bool)" } },
"callcodeAst": {
"name": "MemberAccess",
"children": [{
"attributes": {
"value": "f",
"type": "address"
}}],
"attributes": {
"member_name": "callcode",
"type": "function () payable returns (bool)" } },
"delegatecallAst": {
"name": "MemberAccess",
"children": [{
"attributes": {
"value": "g",
"type": "address"
}}],
"attributes": {
"member_name": "delegatecall",
"type": "function () returns (bool)" } }
}
\ No newline at end of file
{
"attributes": {
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"type": "function (address)",
"value": "selfdestruct"
},
"name": "Identifier"
},
{
"attributes": {
"type": "address",
"value": "a"
},
"name": "Identifier"
}
],
"name": "FunctionCall"
}
\ No newline at end of file
{
"attributes": {
"fullyImplemented": true,
"isLibrary": false,
"linearizedBaseContracts": [
274
],
"name": "Ballot"
},
"children": [
{
"attributes": {
"name": "Voter"
},
"children": [],
"name": "StructDefinition"
},
{
"attributes": {
"name": "Proposal"
},
"children": [],
"name": "StructDefinition"
},
{
"attributes": {
"name": "chairperson",
"type": "address"
},
"children": [
{
"attributes": {
"name": "address"
},
"name": "ElementaryTypeName"
}
],
"name": "VariableDeclaration"
},
{
"attributes": {
"name": "voters",
"type": "mapping(address => struct Ballot.Voter storage ref)"
},
"children": [
{
"children": [
{
"attributes": {
"name": "address"
},
"name": "ElementaryTypeName"
},
{
"attributes": {
"name": "Voter"
},
"name": "UserDefinedTypeName"
}
],
"name": "Mapping"
}
],
"name": "VariableDeclaration"
},
{
"attributes": {
"name": "proposals",
"type": "struct Ballot.Proposal storage ref[] storage ref"
},
"children": [
{
"children": [
{
"attributes": {
"name": "Proposal"
},
"name": "UserDefinedTypeName"
}
],
"name": "ArrayTypeName"
}
],
"name": "VariableDeclaration"
},
{
"attributes": {
"constant": false,
"name": "Ballot",
"payable": false,
"visibility": "public"
},
"children": [],
"name": "FunctionDefinition"
},
{
"attributes": {
"constant": false,
"name": "giveRightToVote",
"payable": false,
"visibility": "public"
},
"children": [],
"name": "FunctionDefinition"
}
],
"name": "ContractDefinition"
}
\ No newline at end of file
{
"node1": {
"attributes": {
"name": "x",
"type": "struct Ballot.Voter storage pointer"
},
"children": [
{
"attributes": {
"name": "Voter"
},
"id": 43,
"name": "UserDefinedTypeName",
"src": "604:5:0"
}
],
"id": 44,
"name": "VariableDeclaration",
"src": "604:15:0"
},
"node2": {
"attributes": {
"name": "voters",
"type": "mapping(address => struct Ballot.Voter storage ref)"
},
"children": [
{
"children": [
{
"attributes": {
"name": "address"
},
"id": 16,
"name": "ElementaryTypeName",
"src": "235:7:0"
},
{
"attributes": {
"name": "Voter"
},
"id": 17,
"name": "UserDefinedTypeName",
"src": "246:5:0"
}
],
"id": 18,
"name": "Mapping",
"src": "227:25:0"
}
],
"id": 19,
"name": "VariableDeclaration",
"src": "227:32:0"
},
"node3": {
"attributes": {
"name": "voters",
"type": "bytes32"
},
"children": [
{
"attributes": {
"name": "bytes"
},
"id": 16,
"name": "ElementaryTypeName",
"src": "235:7:0"
}
],
"id": 19,
"name": "VariableDeclaration",
"src": "227:32:0"
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment