Merge pull request #7925 from ethereum/update-ast-export

Sync & update JSON AST exporting according to AST changes
This commit is contained in:
Mathias L. Baumann 2019-12-09 12:43:33 +01:00 committed by GitHub
commit c62e89d222
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
60 changed files with 315 additions and 115 deletions

View File

@ -255,7 +255,7 @@ bool ASTJsonConverter::visit(ImportDirective const& _node)
{ {
Json::Value tuple(Json::objectValue); Json::Value tuple(Json::objectValue);
solAssert(symbolAlias.symbol, ""); solAssert(symbolAlias.symbol, "");
tuple["foreign"] = nodeId(*symbolAlias.symbol); tuple["foreign"] = toJson(*symbolAlias.symbol);
tuple["local"] = symbolAlias.alias ? Json::Value(*symbolAlias.alias) : Json::nullValue; tuple["local"] = symbolAlias.alias ? Json::Value(*symbolAlias.alias) : Json::nullValue;
symbolAliases.append(tuple); symbolAliases.append(tuple);
} }
@ -337,6 +337,14 @@ bool ASTJsonConverter::visit(ParameterList const& _node)
return false; return false;
} }
bool ASTJsonConverter::visit(OverrideSpecifier const& _node)
{
setJsonNode(_node, "OverrideSpecifier", {
make_pair("overrides", toJson(_node.overrides()))
});
return false;
}
bool ASTJsonConverter::visit(FunctionDefinition const& _node) bool ASTJsonConverter::visit(FunctionDefinition const& _node)
{ {
std::vector<pair<string, Json::Value>> attributes = { std::vector<pair<string, Json::Value>> attributes = {
@ -345,7 +353,8 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node)
make_pair("kind", TokenTraits::toString(_node.kind())), make_pair("kind", TokenTraits::toString(_node.kind())),
make_pair("stateMutability", stateMutabilityToString(_node.stateMutability())), make_pair("stateMutability", stateMutabilityToString(_node.stateMutability())),
make_pair("visibility", Declaration::visibilityToString(_node.visibility())), make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
make_pair("overrides", _node.overrides() ? toJson(_node.overrides()->overrides()) : Json::nullValue), make_pair("virtual", _node.markedVirtual()),
make_pair("overrides", _node.overrides() ? toJson(*_node.overrides()) : Json::nullValue),
make_pair("parameters", toJson(_node.parameterList())), make_pair("parameters", toJson(_node.parameterList())),
make_pair("returnParameters", toJson(*_node.returnParameterList())), make_pair("returnParameters", toJson(*_node.returnParameterList())),
make_pair("modifiers", toJson(_node.modifiers())), make_pair("modifiers", toJson(_node.modifiers())),
@ -369,7 +378,7 @@ bool ASTJsonConverter::visit(VariableDeclaration const& _node)
make_pair("constant", _node.isConstant()), make_pair("constant", _node.isConstant()),
make_pair("stateVariable", _node.isStateVariable()), make_pair("stateVariable", _node.isStateVariable()),
make_pair("storageLocation", location(_node.referenceLocation())), make_pair("storageLocation", location(_node.referenceLocation())),
make_pair("overrides", _node.overrides() ? toJson(_node.overrides()->overrides()) : Json::nullValue), make_pair("overrides", _node.overrides() ? toJson(*_node.overrides()) : Json::nullValue),
make_pair("visibility", Declaration::visibilityToString(_node.visibility())), make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
make_pair("value", _node.value() ? toJson(*_node.value()) : Json::nullValue), make_pair("value", _node.value() ? toJson(*_node.value()) : Json::nullValue),
make_pair("scope", idOrNull(_node.scope())), make_pair("scope", idOrNull(_node.scope())),
@ -388,6 +397,8 @@ bool ASTJsonConverter::visit(ModifierDefinition const& _node)
make_pair("documentation", _node.documentation() ? Json::Value(*_node.documentation()) : Json::nullValue), make_pair("documentation", _node.documentation() ? Json::Value(*_node.documentation()) : Json::nullValue),
make_pair("visibility", Declaration::visibilityToString(_node.visibility())), make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
make_pair("parameters", toJson(_node.parameterList())), make_pair("parameters", toJson(_node.parameterList())),
make_pair("virtual", _node.markedVirtual()),
make_pair("overrides", _node.overrides() ? toJson(*_node.overrides()) : Json::nullValue),
make_pair("body", toJson(_node.body())) make_pair("body", toJson(_node.body()))
}); });
return false; return false;
@ -762,7 +773,7 @@ bool ASTJsonConverter::visit(Identifier const& _node)
bool ASTJsonConverter::visit(ElementaryTypeNameExpression const& _node) bool ASTJsonConverter::visit(ElementaryTypeNameExpression const& _node)
{ {
std::vector<pair<string, Json::Value>> attributes = { std::vector<pair<string, Json::Value>> attributes = {
make_pair(m_legacy ? "value" : "typeName", _node.type().typeName().toString()) make_pair(m_legacy ? "value" : "typeName", toJson(_node.type()))
}; };
appendExpressionAttributes(attributes, _node.annotation()); appendExpressionAttributes(attributes, _node.annotation());
setJsonNode(_node, "ElementaryTypeNameExpression", std::move(attributes)); setJsonNode(_node, "ElementaryTypeNameExpression", std::move(attributes));

View File

@ -81,6 +81,7 @@ public:
bool visit(EnumDefinition const& _node) override; bool visit(EnumDefinition const& _node) override;
bool visit(EnumValue const& _node) override; bool visit(EnumValue const& _node) override;
bool visit(ParameterList const& _node) override; bool visit(ParameterList const& _node) override;
bool visit(OverrideSpecifier const& _node) override;
bool visit(FunctionDefinition const& _node) override; bool visit(FunctionDefinition const& _node) override;
bool visit(VariableDeclaration const& _node) override; bool visit(VariableDeclaration const& _node) override;
bool visit(ModifierDefinition const& _node) override; bool visit(ModifierDefinition const& _node) override;

View File

@ -70,6 +70,7 @@ JSON AST:
"overrides": null, "overrides": null,
"scope": 18, "scope": 18,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":
@ -133,6 +134,7 @@ JSON AST:
"overrides": null, "overrides": null,
"scope": 18, "scope": 18,
"stateMutability": "view", "stateMutability": "view",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -1 +1 @@
{"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"C":[6]},"id":7,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"0:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":6,"linearizedBaseContracts":[6],"name":"C","nodeType":"ContractDefinition","nodes":[{"body":{"id":4,"nodeType":"Block","src":"61:2:0","statements":[]},"documentation":null,"id":5,"implemented":true,"kind":"function","modifiers":[],"name":"f","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":2,"nodeType":"ParameterList","parameters":[],"src":"46:2:0"},"returnParameters":{"id":3,"nodeType":"ParameterList","parameters":[],"src":"61:0:0"},"scope":6,"src":"36:27:0","stateMutability":"pure","visibility":"public"}],"scope":7,"src":"23:42:0"}],"src":"0:65:0"},"id":0}}} {"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"C":[6]},"id":7,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"0:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":6,"linearizedBaseContracts":[6],"name":"C","nodeType":"ContractDefinition","nodes":[{"body":{"id":4,"nodeType":"Block","src":"61:2:0","statements":[]},"documentation":null,"id":5,"implemented":true,"kind":"function","modifiers":[],"name":"f","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":2,"nodeType":"ParameterList","parameters":[],"src":"46:2:0"},"returnParameters":{"id":3,"nodeType":"ParameterList","parameters":[],"src":"61:0:0"},"scope":6,"src":"36:27:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":7,"src":"23:42:0"}],"src":"0:65:0"},"id":0}}}

View File

@ -60,6 +60,7 @@
"scope": 5, "scope": 5,
"src": "23:25:1", "src": "23:25:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 5, "scope": 5,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -311,7 +311,18 @@
"typeIdentifier": "t_type$_t_address_$", "typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)" "typeString": "type(address)"
}, },
"typeName": "address" "typeName":
{
"id": 23,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "209:7:1",
"typeDescriptions":
{
"typeIdentifier": null,
"typeString": null
}
}
}, },
"id": 26, "id": 26,
"isConstant": false, "isConstant": false,
@ -435,7 +446,18 @@
"typeIdentifier": "t_type$_t_address_$", "typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)" "typeString": "type(address)"
}, },
"typeName": "address" "typeName":
{
"id": 31,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "239:7:1",
"typeDescriptions":
{
"typeIdentifier": null,
"typeString": null
}
}
}, },
"id": 34, "id": 34,
"isConstant": false, "isConstant": false,
@ -557,6 +579,7 @@
"scope": 39, "scope": 39,
"src": "67:189:1", "src": "67:189:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -104,6 +104,7 @@
"overrides": null, "overrides": null,
"scope": 39, "scope": 39,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":
@ -416,9 +417,21 @@
"isLValue": false, "isLValue": false,
"isPure": true, "isPure": true,
"lValueRequested": false, "lValueRequested": false,
"type": "type(address)", "type": "type(address)"
"value": "address"
}, },
"children":
[
{
"attributes":
{
"name": "address",
"type": null
},
"id": 23,
"name": "ElementaryTypeName",
"src": "209:7:1"
}
],
"id": 24, "id": 24,
"name": "ElementaryTypeNameExpression", "name": "ElementaryTypeNameExpression",
"src": "209:7:1" "src": "209:7:1"
@ -547,9 +560,21 @@
"isLValue": false, "isLValue": false,
"isPure": true, "isPure": true,
"lValueRequested": false, "lValueRequested": false,
"type": "type(address)", "type": "type(address)"
"value": "address"
}, },
"children":
[
{
"attributes":
{
"name": "address",
"type": null
},
"id": 31,
"name": "ElementaryTypeName",
"src": "239:7:1"
}
],
"id": 32, "id": 32,
"name": "ElementaryTypeNameExpression", "name": "ElementaryTypeNameExpression",
"src": "239:7:1" "src": "239:7:1"

View File

@ -156,6 +156,7 @@
"scope": 6, "scope": 6,
"src": "17:79:1", "src": "17:79:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 6, "scope": 6,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -143,6 +143,7 @@
"scope": 6, "scope": 6,
"src": "17:93:1", "src": "17:93:1",
"stateMutability": "view", "stateMutability": "view",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 6, "scope": 6,
"stateMutability": "view", "stateMutability": "view",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -93,6 +93,7 @@
"scope": 6, "scope": 6,
"src": "17:71:1", "src": "17:71:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 6, "scope": 6,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -156,6 +156,7 @@
"scope": 6, "scope": 6,
"src": "17:99:1", "src": "17:99:1",
"stateMutability": "view", "stateMutability": "view",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 6, "scope": 6,
"stateMutability": "view", "stateMutability": "view",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -224,6 +224,7 @@
"scope": 11, "scope": 11,
"src": "51:95:1", "src": "51:95:1",
"stateMutability": "pure", "stateMutability": "pure",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -128,6 +128,7 @@
"overrides": null, "overrides": null,
"scope": 11, "scope": 11,
"stateMutability": "pure", "stateMutability": "pure",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -97,6 +97,7 @@
"scope": 6, "scope": 6,
"src": "17:63:1", "src": "17:63:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 6, "scope": 6,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -189,6 +189,7 @@
"scope": 6, "scope": 6,
"src": "17:179:1", "src": "17:179:1",
"stateMutability": "pure", "stateMutability": "pure",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 6, "scope": 6,
"stateMutability": "pure", "stateMutability": "pure",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -148,6 +148,7 @@
"scope": 9, "scope": 9,
"src": "17:76:1", "src": "17:76:1",
"stateMutability": "pure", "stateMutability": "pure",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 9, "scope": 9,
"stateMutability": "pure", "stateMutability": "pure",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -60,6 +60,7 @@
"scope": 5, "scope": 5,
"src": "14:25:1", "src": "14:25:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 5, "scope": 5,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -129,6 +129,7 @@
"id": 10, "id": 10,
"name": "mod", "name": "mod",
"nodeType": "ModifierDefinition", "nodeType": "ModifierDefinition",
"overrides": null,
"parameters": "parameters":
{ {
"id": 7, "id": 7,
@ -137,6 +138,7 @@
"src": "96:2:3" "src": "96:2:3"
}, },
"src": "84:21:3", "src": "84:21:3",
"virtual": false,
"visibility": "internal" "visibility": "internal"
}, },
{ {
@ -172,6 +174,7 @@
"scope": 15, "scope": 15,
"src": "134:23:3", "src": "134:23:3",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -68,6 +68,8 @@
{ {
"documentation": "Some comment on mod.", "documentation": "Some comment on mod.",
"name": "mod", "name": "mod",
"overrides": null,
"virtual": false,
"visibility": "internal" "visibility": "internal"
}, },
"children": "children":
@ -118,6 +120,7 @@
"overrides": null, "overrides": null,
"scope": 15, "scope": 15,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -60,6 +60,7 @@
"scope": 5, "scope": 5,
"src": "15:33:1", "src": "15:33:1",
"stateMutability": "payable", "stateMutability": "payable",
"virtual": false,
"visibility": "external" "visibility": "external"
} }
], ],

View File

@ -60,6 +60,7 @@
"scope": 9, "scope": 9,
"src": "15:32:1", "src": "15:32:1",
"stateMutability": "payable", "stateMutability": "payable",
"virtual": false,
"visibility": "external" "visibility": "external"
}, },
{ {
@ -95,6 +96,7 @@
"scope": 9, "scope": 9,
"src": "50:33:1", "src": "50:33:1",
"stateMutability": "payable", "stateMutability": "payable",
"virtual": false,
"visibility": "external" "visibility": "external"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 9, "scope": 9,
"stateMutability": "payable", "stateMutability": "payable",
"virtual": false,
"visibility": "external" "visibility": "external"
}, },
"children": "children":
@ -114,6 +115,7 @@
"overrides": null, "overrides": null,
"scope": 9, "scope": 9,
"stateMutability": "payable", "stateMutability": "payable",
"virtual": false,
"visibility": "external" "visibility": "external"
}, },
"children": "children":

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 5, "scope": 5,
"stateMutability": "payable", "stateMutability": "payable",
"virtual": false,
"visibility": "external" "visibility": "external"
}, },
"children": "children":

View File

@ -60,6 +60,7 @@
"scope": 5, "scope": 5,
"src": "14:22:1", "src": "14:22:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "external" "visibility": "external"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 5, "scope": 5,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "external" "visibility": "external"
}, },
"children": "children":

View File

@ -218,6 +218,7 @@
"scope": 17, "scope": 17,
"src": "13:109:1", "src": "13:109:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 17, "scope": 17,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -166,6 +166,7 @@
"scope": 11, "scope": 11,
"src": "13:39:1", "src": "13:39:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 11, "scope": 11,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -173,6 +173,7 @@
"scope": 15, "scope": 15,
"src": "23:45:1", "src": "23:45:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -94,6 +94,7 @@
"overrides": null, "overrides": null,
"scope": 15, "scope": 15,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -46,6 +46,7 @@
"id": 6, "id": 6,
"name": "M", "name": "M",
"nodeType": "ModifierDefinition", "nodeType": "ModifierDefinition",
"overrides": null,
"parameters": "parameters":
{ {
"id": 3, "id": 3,
@ -86,6 +87,7 @@
"src": "23:8:1" "src": "23:8:1"
}, },
"src": "13:25:1", "src": "13:25:1",
"virtual": false,
"visibility": "internal" "visibility": "internal"
}, },
{ {
@ -165,6 +167,7 @@
"scope": 14, "scope": 14,
"src": "39:27:1", "src": "39:27:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -41,6 +41,8 @@
{ {
"documentation": null, "documentation": null,
"name": "M", "name": "M",
"overrides": null,
"virtual": false,
"visibility": "internal" "visibility": "internal"
}, },
"children": "children":
@ -112,6 +114,7 @@
"overrides": null, "overrides": null,
"scope": 14, "scope": 14,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -46,6 +46,7 @@
"id": 6, "id": 6,
"name": "M", "name": "M",
"nodeType": "ModifierDefinition", "nodeType": "ModifierDefinition",
"overrides": null,
"parameters": "parameters":
{ {
"id": 3, "id": 3,
@ -86,6 +87,7 @@
"src": "23:8:1" "src": "23:8:1"
}, },
"src": "13:25:1", "src": "13:25:1",
"virtual": false,
"visibility": "internal" "visibility": "internal"
}, },
{ {
@ -165,6 +167,7 @@
"scope": 14, "scope": 14,
"src": "39:27:1", "src": "39:27:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -41,6 +41,8 @@
{ {
"documentation": null, "documentation": null,
"name": "M", "name": "M",
"overrides": null,
"virtual": false,
"visibility": "internal" "visibility": "internal"
}, },
"children": "children":
@ -112,6 +114,7 @@
"overrides": null, "overrides": null,
"scope": 14, "scope": 14,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -113,6 +113,7 @@
"scope": 8, "scope": 8,
"src": "13:40:1", "src": "13:40:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 8, "scope": 8,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -68,6 +68,7 @@
"scope": 5, "scope": 5,
"src": "14:24:1", "src": "14:24:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],
@ -143,6 +144,7 @@
"scope": 16, "scope": 16,
"src": "60:22:1", "src": "60:22:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
{ {
@ -164,7 +166,13 @@
"modifiers": [], "modifiers": [],
"name": "faa", "name": "faa",
"nodeType": "FunctionDefinition", "nodeType": "FunctionDefinition",
"overrides": [], "overrides":
{
"id": 12,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "106:8:1"
},
"parameters": "parameters":
{ {
"id": 11, "id": 11,
@ -182,6 +190,7 @@
"scope": 16, "scope": 16,
"src": "84:33:1", "src": "84:33:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],
@ -251,7 +260,13 @@
"modifiers": [], "modifiers": [],
"name": "foo", "name": "foo",
"nodeType": "FunctionDefinition", "nodeType": "FunctionDefinition",
"overrides": [], "overrides":
{
"id": 20,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "161:8:1"
},
"parameters": "parameters":
{ {
"id": 19, "id": 19,
@ -269,6 +284,7 @@
"scope": 31, "scope": 31,
"src": "139:34:1", "src": "139:34:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
{ {
@ -291,34 +307,40 @@
"name": "faa", "name": "faa",
"nodeType": "FunctionDefinition", "nodeType": "FunctionDefinition",
"overrides": "overrides":
[ {
{ "id": 27,
"contractScope": null, "nodeType": "OverrideSpecifier",
"id": 25, "overrides":
"name": "A", [
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5,
"src": "206:1:1",
"typeDescriptions":
{ {
"typeIdentifier": "t_contract$_A_$5", "contractScope": null,
"typeString": "contract A" "id": 25,
} "name": "A",
}, "nodeType": "UserDefinedTypeName",
{ "referencedDeclaration": 5,
"contractScope": null, "src": "206:1:1",
"id": 26, "typeDescriptions":
"name": "B", {
"nodeType": "UserDefinedTypeName", "typeIdentifier": "t_contract$_A_$5",
"referencedDeclaration": 16, "typeString": "contract A"
"src": "209:1:1", }
"typeDescriptions": },
{ {
"typeIdentifier": "t_contract$_B_$16", "contractScope": null,
"typeString": "contract B" "id": 26,
"name": "B",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 16,
"src": "209:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_contract$_B_$16",
"typeString": "contract B"
}
} }
} ],
], "src": "197:14:1"
},
"parameters": "parameters":
{ {
"id": 24, "id": 24,
@ -336,6 +358,7 @@
"scope": 31, "scope": 31,
"src": "175:39:1", "src": "175:39:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -59,6 +59,7 @@
"overrides": null, "overrides": null,
"scope": 5, "scope": 5,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":
@ -173,6 +174,7 @@
"overrides": null, "overrides": null,
"scope": 16, "scope": 16,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":
@ -224,16 +226,25 @@
null null
], ],
"name": "faa", "name": "faa",
"overrides":
[
null
],
"scope": 16, "scope": 16,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":
[ [
{
"attributes":
{
"overrides":
[
null
]
},
"id": 12,
"name": "OverrideSpecifier",
"src": "106:8:1"
},
{ {
"attributes": "attributes":
{ {
@ -346,16 +357,25 @@
null null
], ],
"name": "foo", "name": "foo",
"overrides":
[
null
],
"scope": 31, "scope": 31,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":
[ [
{
"attributes":
{
"overrides":
[
null
]
},
"id": 20,
"name": "OverrideSpecifier",
"src": "161:8:1"
},
{ {
"attributes": "attributes":
{ {
@ -418,33 +438,42 @@
"name": "faa", "name": "faa",
"scope": 31, "scope": 31,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":
[ [
{ {
"attributes": "children":
{ [
"contractScope": null, {
"name": "A", "attributes":
"referencedDeclaration": 5, {
"type": "contract A" "contractScope": null,
}, "name": "A",
"id": 25, "referencedDeclaration": 5,
"name": "UserDefinedTypeName", "type": "contract A"
"src": "206:1:1" },
}, "id": 25,
{ "name": "UserDefinedTypeName",
"attributes": "src": "206:1:1"
{ },
"contractScope": null, {
"name": "B", "attributes":
"referencedDeclaration": 16, {
"type": "contract B" "contractScope": null,
}, "name": "B",
"id": 26, "referencedDeclaration": 16,
"name": "UserDefinedTypeName", "type": "contract B"
"src": "209:1:1" },
"id": 26,
"name": "UserDefinedTypeName",
"src": "209:1:1"
}
],
"id": 27,
"name": "OverrideSpecifier",
"src": "197:14:1"
}, },
{ {
"attributes": "attributes":

View File

@ -46,6 +46,7 @@
"id": 4, "id": 4,
"name": "M", "name": "M",
"nodeType": "ModifierDefinition", "nodeType": "ModifierDefinition",
"overrides": null,
"parameters": "parameters":
{ {
"id": 1, "id": 1,
@ -54,6 +55,7 @@
"src": "24:0:1" "src": "24:0:1"
}, },
"src": "13:17:1", "src": "13:17:1",
"virtual": false,
"visibility": "internal" "visibility": "internal"
} }
], ],

View File

@ -41,6 +41,8 @@
{ {
"documentation": null, "documentation": null,
"name": "M", "name": "M",
"overrides": null,
"virtual": false,
"visibility": "internal" "visibility": "internal"
}, },
"children": "children":

View File

@ -60,6 +60,7 @@
"scope": 5, "scope": 5,
"src": "15:32:1", "src": "15:32:1",
"stateMutability": "payable", "stateMutability": "payable",
"virtual": false,
"visibility": "external" "visibility": "external"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 5, "scope": 5,
"stateMutability": "payable", "stateMutability": "payable",
"virtual": false,
"visibility": "external" "visibility": "external"
}, },
"children": "children":

View File

@ -117,6 +117,7 @@
"scope": 11, "scope": 11,
"src": "13:40:1", "src": "13:40:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 11, "scope": 11,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -129,6 +129,7 @@
"scope": 12, "scope": 12,
"src": "13:45:1", "src": "13:45:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 12, "scope": 12,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -151,6 +151,7 @@
"scope": 11, "scope": 11,
"src": "13:32:1", "src": "13:32:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -51,6 +51,7 @@
"overrides": null, "overrides": null,
"scope": 11, "scope": 11,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":

View File

@ -68,6 +68,7 @@
"scope": 5, "scope": 5,
"src": "17:30:1", "src": "17:30:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": true,
"visibility": "public" "visibility": "public"
} }
], ],
@ -123,6 +124,7 @@
"scope": 10, "scope": 10,
"src": "67:30:1", "src": "67:30:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": true,
"visibility": "public" "visibility": "public"
} }
], ],
@ -214,34 +216,40 @@
"name": "f", "name": "f",
"nodeType": "FunctionDefinition", "nodeType": "FunctionDefinition",
"overrides": "overrides":
[ {
{ "id": 18,
"contractScope": null, "nodeType": "OverrideSpecifier",
"id": 16, "overrides":
"name": "A", [
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5,
"src": "154:1:1",
"typeDescriptions":
{ {
"typeIdentifier": "t_contract$_A_$5", "contractScope": null,
"typeString": "contract A" "id": 16,
} "name": "A",
}, "nodeType": "UserDefinedTypeName",
{ "referencedDeclaration": 5,
"contractScope": null, "src": "154:1:1",
"id": 17, "typeDescriptions":
"name": "B", {
"nodeType": "UserDefinedTypeName", "typeIdentifier": "t_contract$_A_$5",
"referencedDeclaration": 10, "typeString": "contract A"
"src": "157:1:1", }
"typeDescriptions": },
{ {
"typeIdentifier": "t_contract$_B_$10", "contractScope": null,
"typeString": "contract B" "id": 17,
"name": "B",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 10,
"src": "157:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_contract$_B_$10",
"typeString": "contract B"
}
} }
} ],
], "src": "145:14:1"
},
"parameters": "parameters":
{ {
"id": 15, "id": 15,
@ -259,6 +267,7 @@
"scope": 22, "scope": 22,
"src": "125:37:1", "src": "125:37:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],

View File

@ -59,6 +59,7 @@
"overrides": null, "overrides": null,
"scope": 5, "scope": 5,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": true,
"visibility": "public" "visibility": "public"
}, },
"children": "children":
@ -151,6 +152,7 @@
"overrides": null, "overrides": null,
"scope": 10, "scope": 10,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": true,
"visibility": "public" "visibility": "public"
}, },
"children": "children":
@ -294,33 +296,42 @@
"name": "f", "name": "f",
"scope": 22, "scope": 22,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false,
"visibility": "public" "visibility": "public"
}, },
"children": "children":
[ [
{ {
"attributes": "children":
{ [
"contractScope": null, {
"name": "A", "attributes":
"referencedDeclaration": 5, {
"type": "contract A" "contractScope": null,
}, "name": "A",
"id": 16, "referencedDeclaration": 5,
"name": "UserDefinedTypeName", "type": "contract A"
"src": "154:1:1" },
}, "id": 16,
{ "name": "UserDefinedTypeName",
"attributes": "src": "154:1:1"
{ },
"contractScope": null, {
"name": "B", "attributes":
"referencedDeclaration": 10, {
"type": "contract B" "contractScope": null,
}, "name": "B",
"id": 17, "referencedDeclaration": 10,
"name": "UserDefinedTypeName", "type": "contract B"
"src": "157:1:1" },
"id": 17,
"name": "UserDefinedTypeName",
"src": "157:1:1"
}
],
"id": 18,
"name": "OverrideSpecifier",
"src": "145:14:1"
}, },
{ {
"attributes": "attributes":