Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, parent, sub) |
def | add (self, content, position=None, bubble_up=False) |
Public Member Functions inherited from psyclone.f2pygen.BaseGen | |
def | parent (self) |
def | children (self) |
def | root (self) |
def | add (self, new_object, position=None) |
def | previous_loop (self) |
def | last_declaration (self) |
def | start_parent_loop (self, debug=False) |
Functionality relevant to program units (currently modules, subroutines)
Definition at line 335 of file f2pygen.py.
def psyclone.f2pygen.ProgUnitGen.add | ( | self, | |
content, | |||
position = None , |
|||
bubble_up = False |
|||
) |
Specialise the add method to provide module- and subroutine- -specific intelligent adding of use statements, implicit none statements and declarations if the position argument is set to auto (which is the default). :param content: the Node (or sub-tree of Nodes) to add in to \ the AST. :type content: :py:class:`psyclone.f2pygen.BaseGen` :param list position: where to insert the node. One of "append", \ "first", "insert", "after", "after_index", \ "before_index", "before" or "auto". For the \ *_index options, the second element of the \ list holds the integer index. :param bool bubble_up: whether or not object (content) is in the \ process of being bubbled-up.
Definition at line 341 of file f2pygen.py.
References psyclone.f2pygen.BaseGen._children, psyclone.psyir.nodes.node.Node._children, psyclone.psyir.nodes.omp_directives.OMPParallelDirective._children, psyclone.f2pygen.ProgUnitGen._skip_imp_none_and_comments(), psyclone.f2pygen.ProgUnitGen._skip_use_and_comments(), psyclone.f2pygen.BaseGen.root(), psyclone.f2pygen.BaseDeclGen.root(), and psyclone.psyir.nodes.node.Node.root().