fparser Reference Guide  0.0.14
fparser.two.C99Preprocessor.Cpp_Else_Stmt Class Reference
Inheritance diagram for fparser.two.C99Preprocessor.Cpp_Else_Stmt:
Collaboration diagram for fparser.two.C99Preprocessor.Cpp_Else_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
 
- 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

else-stmt is  # else new-line

Definition at line 258 of file C99Preprocessor.py.

Member Function Documentation

◆ match()

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

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

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

Definition at line 271 of file C99Preprocessor.py.

271  def match(string):
272  """Implements the matching for an else preprocessor directive.
273 
274  :param str string: the string to match with as an else statement.
275 
276  :return: a 1-tuple containing the matched string or `None` if \
277  there is no match.
278  :rtype: (str,) or NoneType
279 
280  """
281  if not string:
282  return None
283  return StringBase.match(Cpp_Else_Stmt._pattern, string)
284 
Here is the caller graph for this function:

◆ tostr()

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

Definition at line 285 of file C99Preprocessor.py.

References fparser.two.utils.StringBase.string.

285  def tostr(self):
286  """
287  :return: this else-stmt as a string.
288  :rtype: str
289  """
290  return self.string
291 
292 
Here is the caller graph for this function:

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