psyclone.psyir.nodes.member
This module contains the implementation of the Member node.
Classes
Member
: Node representing a membership expression of a structure.
- class psyclone.psyir.nodes.member.Member(member_name, parent=None)
Node representing a membership expression of a structure. As such it is a leaf in the PSyIR tree.
- Parameters:
member_name (str) – the name of the member of the structure that is being referenced.
parent (
psyclone.psyir.nodes.StructureReference
orpsyclone.psyir.nodes.Member
) – the parent of this node in the PSyIR tree.
- Raises:
TypeError – if the supplied parent is of the wrong type.
Inheritance
- get_signature_and_indices()
- Returns:
the Signature of this member access, and a list of list of the indices used for each component, which is empty in this case since it is not an array access.
- Return type:
tuple(
psyclone.core.Signature
, list of lists of indices)
- property is_array
- Returns:
whether this member is an array.
- Return type:
bool
- property name
- Returns:
the name of this member.
- Return type:
str
- node_str(colour=True)
Create a text description of this node in the schedule, optionally including control codes for colour.
- Parameters:
colour (bool) – whether or not to include colour control codes.
- Returns:
text description of this node.
- Return type:
str