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:
Raises:

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

Inheritance

Inheritance diagram of Member
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