PyForTool
Python-fortran-tool
Loading...
Searching...
No Matches
Classes | Functions
pyfortool.statements Namespace Reference

Classes

class  Statements
 

Functions

 _nodesInIf (ifNode)
 
 _nodesInWhere (whereNode)
 
 _nodesInDo (doNode)
 
 _nodesInCase (caseNode)
 

Detailed Description

Statement-level code transformations.

Provides the Statements class for manipulating FORTRAN statements including
CALL statements, array syntax, conditional blocks, and subroutine inlining.

Key Features
------------
- Remove CALL statements (with optional cleanup of unused variables)
- Transform array syntax to explicit DO loops
- Inline contained subroutines into their parent
- Conditional flag manipulation (set flags to .FALSE.)
- Statement node removal with structural simplification

Classes
-------
Statements : Mixin class providing statement manipulation methods

Examples
--------
>>> pft = PYFT('input.F90')
>>> pft.removeCall('FOO')  # Remove all CALL FOO statements
>>> pft.removeArraySyntax()  # Convert A(:) = B(:) to DO loops
>>> pft.inlineContainedSubroutines()  # Inline helper subroutines
>>> pft.setFalseIfStmt('LDEBUG')  # Disable debug blocks

Function Documentation

◆ _nodesInCase()

pyfortool.statements._nodesInCase (   caseNode)
protected
Internal method to return nodes in do structure

Definition at line 77 of file statements.py.

Here is the caller graph for this function:

◆ _nodesInDo()

pyfortool.statements._nodesInDo (   doNode)
protected
Internal method to return nodes in do structure

Definition at line 66 of file statements.py.

Here is the caller graph for this function:

◆ _nodesInIf()

pyfortool.statements._nodesInIf (   ifNode)
protected
Internal method to return nodes in if structure

Definition at line 38 of file statements.py.

Here is the caller graph for this function:

◆ _nodesInWhere()

pyfortool.statements._nodesInWhere (   whereNode)
protected
Internal method to return nodes in where structure

Definition at line 52 of file statements.py.

Here is the caller graph for this function: