fparser Reference Guide  0.0.14
fparser.common.readfortran.Comment Class Reference

Public Member Functions

def __init__ (self, comment, linenospan, reader)
 
def __repr__ (self)
 
def isempty (self, ignore_comments=False)
 

Public Attributes

 comment
 
 span
 
 reader
 
 line
 

Detailed Description

Holds a Fortran comment.

:param str comment: String containing the text of a single or \
multi-line comment
:param linenospan: A 2-tuple containing the start and end line \
numbers of the comment from the input source.
:type linenospan: (int, int)
:param reader: The reader object being used to read the input \
source.
:type reader: :py:class:`fparser.common.readfortran.FortranReaderBase`

Definition at line 432 of file readfortran.py.

Member Function Documentation

◆ isempty()

def fparser.common.readfortran.Comment.isempty (   self,
  ignore_comments = False 
)
Whether or not this comment is in fact empty (or we are ignoring
it). Provided for compatibility with Line.isempty()

:param bool ignore_comments: whether we ignore comments
:return: True if we are ignoring comments, False otherwise
:rtype: bool

Definition at line 460 of file readfortran.py.

460  def isempty(self, ignore_comments=False):
461  """
462  Whether or not this comment is in fact empty (or we are ignoring
463  it). Provided for compatibility with Line.isempty()
464 
465  :param bool ignore_comments: whether we ignore comments
466  :return: True if we are ignoring comments, False otherwise
467  :rtype: bool
468  """
469  return ignore_comments
470 
471 

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