fparser Reference Guide  0.0.14
fparser.two.C99Preprocessor.Cpp_Endif_Stmt Class Reference
Inheritance diagram for fparser.two.C99Preprocessor.Cpp_Endif_Stmt:
Collaboration diagram for fparser.two.C99Preprocessor.Cpp_Endif_Stmt:

Public Member Functions

def tostr (self)
 
- Public Member Functions inherited from fparser.two.utils.StringBase
def init (self, string)
 
def tostr (self)
 
def torepr (self)
 
- Public Member Functions inherited from fparser.two.utils.Base
def __init__ (self, string, parent_cls=None)
 
def __new__ (cls, string, parent_cls=None)
 
def get_root (self)
 
def children (self)
 
def init (self, items)
 
def torepr (self)
 
def __str__ (self)
 
def __repr__ (self)
 
def tofortran (self, tab="", isfix=None)
 
def restore_reader (self, reader)
 
- Public Member Functions inherited from fparser.two.utils.ComparableMixin
def __lt__ (self, other)
 
def __le__ (self, other)
 
def __eq__ (self, other)
 
def __ge__ (self, other)
 
def __gt__ (self, other)
 
def __ne__ (self, other)
 

Static Public Member Functions

def match (string)
 
- Static Public Member Functions inherited from fparser.two.utils.StringBase
def match (pattern, string)
 

Static Public Attributes

 subclass_names
 
 value
 
- Static Public Attributes inherited from fparser.two.utils.Base
 subclasses
 

Additional Inherited Members

- Public Attributes inherited from fparser.two.utils.StringBase
 string
 
- Public Attributes inherited from fparser.two.utils.Base
 parent
 
 items
 

Detailed Description

C99 6.10.1 Conditional inclusion

endif-stmt is  # endif new-line

Definition at line 293 of file C99Preprocessor.py.

Member Function Documentation

◆ match()

def fparser.two.C99Preprocessor.Cpp_Endif_Stmt.match (   string)
static
Implements the matching for an endif preprocessor directive.

:param str string: the string to match with as an endif statement.

:return: a 1-tuple containing the matched string or `None` if \
  there is no match.
:rtype: (str,) or NoneType

Definition at line 306 of file C99Preprocessor.py.

306  def match(string):
307  """Implements the matching for an endif preprocessor directive.
308 
309  :param str string: the string to match with as an endif statement.
310 
311  :return: a 1-tuple containing the matched string or `None` if \
312  there is no match.
313  :rtype: (str,) or NoneType
314 
315  """
316  if not string:
317  return None
318  return StringBase.match(Cpp_Endif_Stmt._pattern, string)
319 
Here is the caller graph for this function:

◆ tostr()

def fparser.two.C99Preprocessor.Cpp_Endif_Stmt.tostr (   self)
:return: this endif-stmt as a string.
:rtype: str

Definition at line 320 of file C99Preprocessor.py.

References fparser.two.utils.StringBase.string.

320  def tostr(self):
321  """
322  :return: this endif-stmt as a string.
323  :rtype: str
324  """
325  return self.string
326 
327 
Here is the caller graph for this function:

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