Add AST Node IdentifierPath

This commit is contained in:
Mathias Baumann
2020-10-13 14:32:11 +02:00
parent 0ea4bdafcd
commit 0b7b174945
33 changed files with 797 additions and 392 deletions
+10 -1
View File
@@ -326,6 +326,15 @@ bool ASTJsonConverter::visit(ContractDefinition const& _node)
return false;
}
bool ASTJsonConverter::visit(IdentifierPath const& _node)
{
setJsonNode(_node, "IdentifierPath", {
make_pair("name", namePathToString(_node.path())),
make_pair("referencedDeclaration", idOrNull(_node.annotation().referencedDeclaration))
});
return false;
}
bool ASTJsonConverter::visit(InheritanceSpecifier const& _node)
{
setJsonNode(_node, "InheritanceSpecifier", {
@@ -519,7 +528,7 @@ bool ASTJsonConverter::visit(ElementaryTypeName const& _node)
bool ASTJsonConverter::visit(UserDefinedTypeName const& _node)
{
setJsonNode(_node, "UserDefinedTypeName", {
make_pair("name", namePathToString(_node.namePath())),
make_pair("pathNode", toJson(*_node.pathNode())),
make_pair("referencedDeclaration", idOrNull(_node.annotation().referencedDeclaration)),
make_pair("typeDescriptions", typePointerToJson(_node.annotation().type, true))
});