fparser Reference Guide  0.0.14
fparser.one.block_statements.Select Class Reference
Inheritance diagram for fparser.one.block_statements.Select:
Collaboration diagram for fparser.one.block_statements.Select:

Public Member Functions

def process_item (self)
 

Public Attributes

 expr
 
 construct_name
 

Static Public Attributes

 end_stmt_cls
 
 name
 

Detailed Description

Base class for the Select (case/type) statement

Definition at line 1018 of file block_statements.py.

Member Function Documentation

◆ process_item()

def fparser.one.block_statements.Select.process_item (   self)
Populate the state of this Select object by parsing the
associated line of code

Definition at line 1027 of file block_statements.py.

References fparser.common.base_classes.BeginStatement.construct_name, fparser.one.block_statements.Select.construct_name, fparser.one.block_statements.Select.expr, fparser.two.Fortran2003.Comment.item, and fparser.common.base_classes.Statement.item.

1027  def process_item(self):
1028  """Populate the state of this Select object by parsing the
1029  associated line of code"""
1030  item = self.item
1031  # TODO make the following more robust, particularly to the
1032  # presence of a name at the beginning
1033  # (e.g. "a_name: select case(...)")
1034  line = item.get_line()[6:].lstrip()[4:].lstrip()[1:-1].strip()
1035  self.expr = item.apply_map(line)
1036  self.construct_name = self.item.name
1037  return BeginStatement.process_item(self)
1038 
1039 

The documentation for this class was generated from the following file: