psyclone.psyir.nodes.array_of_structures_member
This module contains the implementation of the ArrayOfStructuresMember node.
Classes
ArrayOfStructuresMember
: Node representing a membership expression of a parent structure where the
- class psyclone.psyir.nodes.array_of_structures_member.ArrayOfStructuresMember(member_name, parent=None)
Node representing a membership expression of a parent structure where the expression resolves to the component of one or more elements of an array of structures. As such, its first child must be a member of that structure. Subsequent children give the array-index expressions.
Inheritance
- static create(member_name, indices, inner_member)
Create an access to a member of one or more elements of an array of structures that is itself a member of a structure.
e.g. if we had the Fortran grid%subdomains(1)%xstart then subdomains must be an array of structure (derived) type. We would construct an ArrayOfStructuresMember for this access by calling:
>>> aosmem = ArrayOfStructuresMember.create( "subdomains", [Literal("1", INTEGER_TYPE)], Member("xstart"))
- Parameters:
member_name (str) – the name of the array member of the structure that is being accessed.
indices (list of
psyclone.psyir.nodes.DataNode
) – the array-index expressions.inner_member (
psyclone.psyir.nodes.Member
) – the member of the member_name structure that is being accessed.
- Returns:
a new ArrayOfStructuresMember object.
- Return type: