Is there a way to use SwiftSyntax in a Swift macro to retrieve the inheritance hierarchy of a type? Currently, within a macro, I am aware that I can utilize
classKeyword to determine whether it is a class or struct, and I can employ
inheritedTypeCollection to acquire all directly inherited classes or protocols. However, I am curious about identifying the root class of a type.
I have a root class called "Person" and its subclass called "Student". Now, I have created a subclass of "Student" called "MaleStudent". How can I determine the root class of "MaleStudent" to be "Person"?