You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to follow embedded record definitions, i.e. a record within a record definition, etc. I want to get all the way to the basic types embedded in the records. There doesn't seem to be a straightforward way to do this in libadlang. There is a component list for a record definition, but if one of those components is itself a record type, I'm not discovering how to reach the record definition for that type. Is there an easy way to do this?
The text was updated successfully, but these errors were encountered:
You're right that this functionality is not built-in, so you'll have to roll your own recursive implementation.
The key of this algorithm would be that once you've managed to retrieve the TypeExpr node of a record component (which IIUC you have), you can find its corresponding type declaration using the P_Designated_Type_Decl property (corresponding documentation).
If this type declares a record as well, you can then recurse on its components, and so on.
I'm trying to follow embedded record definitions, i.e. a record within a record definition, etc. I want to get all the way to the basic types embedded in the records. There doesn't seem to be a straightforward way to do this in libadlang. There is a component list for a record definition, but if one of those components is itself a record type, I'm not discovering how to reach the record definition for that type. Is there an easy way to do this?
The text was updated successfully, but these errors were encountered: