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)[source]#

Node representing a membership expression of a structure. As such it is a leaf in the PSyIR tree.

Parameters:
Raises:

TypeError – if the supplied parent is of the wrong type.

Inheritance

Inheritance diagram of Member
get_base_and_depth()[source]#
Returns:

the base Reference that contains this member and the depth where this member is found.

Return type:

tuple[ Optional[psyclone.psyir.node.StructureReference], int]

get_signature_and_indices()[source]#
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[List[int]]]

property name#
Returns:

the name of this member.

Return type:

str

node_str(colour=True)[source]#

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