proxygen
cpp.ast.Node Class Reference
Inheritance diagram for cpp.ast.Node:
cpp.ast._GenericDeclaration cpp.ast._GenericDeclaration cpp.ast._GenericDeclaration cpp.ast.Define cpp.ast.Define cpp.ast.Define cpp.ast.Expr cpp.ast.Expr cpp.ast.Expr cpp.ast.Goto cpp.ast.Goto cpp.ast.Goto cpp.ast.Include cpp.ast.Include cpp.ast.Include cpp.ast.Parameter cpp.ast.Parameter cpp.ast.Parameter cpp.ast.Using cpp.ast.Using cpp.ast.Using

Public Member Functions

def __init__ (self, start, end)
 
def IsDeclaration (self)
 
def IsDefinition (self)
 
def IsExportable (self)
 
def Requires (self, node)
 
def XXX__str__ (self)
 
def __repr__ (self)
 
def __init__ (self, start, end)
 
def IsDeclaration (self)
 
def IsDefinition (self)
 
def IsExportable (self)
 
def Requires (self, node)
 
def XXX__str__ (self)
 
def __repr__ (self)
 
def __init__ (self, start, end)
 
def IsDeclaration (self)
 
def IsDefinition (self)
 
def IsExportable (self)
 
def Requires (self, node)
 
def XXX__str__ (self)
 
def __repr__ (self)
 

Public Attributes

 start
 
 end
 

Private Member Functions

def _StringHelper (self, name, suffix)
 
def _StringHelper (self, name, suffix)
 
def _StringHelper (self, name, suffix)
 

Detailed Description

Base AST node.

Definition at line 109 of file ast.py.

Constructor & Destructor Documentation

def cpp.ast.Node.__init__ (   self,
  start,
  end 
)

Definition at line 112 of file ast.py.

Referenced by cpp.ast.Node.__init__().

112  def __init__(self, start, end):
113  self.start = start
114  self.end = end
115 
def __init__(self, start, end)
Definition: ast.py:112
def cpp.ast.Node.__init__ (   self,
  start,
  end 
)

Definition at line 112 of file ast.py.

References cpp.ast.Node.__init__(), cpp.ast.Node.end, and cpp.ast.Node.start.

112  def __init__(self, start, end):
113  self.start = start
114  self.end = end
115 
def __init__(self, start, end)
Definition: ast.py:112
def cpp.ast.Node.__init__ (   self,
  start,
  end 
)

Definition at line 112 of file ast.py.

References cpp.ast.Node.__init__(), cpp.ast.Node.end, and cpp.ast.Node.start.

112  def __init__(self, start, end):
113  self.start = start
114  self.end = end
115 
def __init__(self, start, end)
Definition: ast.py:112

Member Function Documentation

def cpp.ast.Node.__repr__ (   self)

Definition at line 140 of file ast.py.

Referenced by cpp.ast.Node.__repr__().

140  def __repr__(self):
141  return str(self)
142 
143 
def __repr__(self)
Definition: ast.py:140
def cpp.ast.Node.__repr__ (   self)

Definition at line 140 of file ast.py.

References cpp.ast.Node.__repr__().

140  def __repr__(self):
141  return str(self)
142 
143 
def __repr__(self)
Definition: ast.py:140
def cpp.ast.Node.__repr__ (   self)

Definition at line 140 of file ast.py.

References cpp.ast.Node.__repr__().

140  def __repr__(self):
141  return str(self)
142 
143 
def __repr__(self)
Definition: ast.py:140
def cpp.ast.Node._StringHelper (   self,
  name,
  suffix 
)
private

Definition at line 135 of file ast.py.

References cpp.ast.Node._StringHelper(), cpp.ast.Node.end, and cpp.ast.Node.start.

135  def _StringHelper(self, name, suffix):
136  if not utils.DEBUG:
137  return '%s(%s)' % (name, suffix)
138  return '%s(%d, %d, %s)' % (name, self.start, self.end, suffix)
139 
def _StringHelper(self, name, suffix)
Definition: ast.py:135
def cpp.ast.Node._StringHelper (   self,
  name,
  suffix 
)
private

Definition at line 135 of file ast.py.

References cpp.ast.Node._StringHelper(), cpp.ast.Node.end, and cpp.ast.Node.start.

135  def _StringHelper(self, name, suffix):
136  if not utils.DEBUG:
137  return '%s(%s)' % (name, suffix)
138  return '%s(%d, %d, %s)' % (name, self.start, self.end, suffix)
139 
def _StringHelper(self, name, suffix)
Definition: ast.py:135
def cpp.ast.Node._StringHelper (   self,
  name,
  suffix 
)
private

Definition at line 135 of file ast.py.

References cpp.ast.Node.end, and cpp.ast.Node.start.

Referenced by cpp.ast.Define.__str__(), cpp.ast.Include.__str__(), cpp.ast.Goto.__str__(), cpp.ast.Expr.__str__(), cpp.ast.Using.__str__(), cpp.ast.Parameter.__str__(), cpp.ast.VariableDeclaration.__str__(), cpp.ast.Node._StringHelper(), cpp.ast._GenericDeclaration._TypeStringHelper(), and cpp.ast.Node.XXX__str__().

135  def _StringHelper(self, name, suffix):
136  if not utils.DEBUG:
137  return '%s(%s)' % (name, suffix)
138  return '%s(%d, %d, %s)' % (name, self.start, self.end, suffix)
139 
def _StringHelper(self, name, suffix)
Definition: ast.py:135
def cpp.ast.Node.IsDeclaration (   self)
Returns bool if this node is a declaration.

Definition at line 116 of file ast.py.

References cpp.ast.Node.IsDeclaration().

116  def IsDeclaration(self):
117  """Returns bool if this node is a declaration."""
118  return False
119 
def IsDeclaration(self)
Definition: ast.py:116
def cpp.ast.Node.IsDeclaration (   self)
Returns bool if this node is a declaration.

Definition at line 116 of file ast.py.

Referenced by cpp.ast.Node.IsDeclaration(), cpp.ast.Class.IsDefinition(), and cpp.ast.Class.IsExportable().

116  def IsDeclaration(self):
117  """Returns bool if this node is a declaration."""
118  return False
119 
def IsDeclaration(self)
Definition: ast.py:116
def cpp.ast.Node.IsDeclaration (   self)
Returns bool if this node is a declaration.

Definition at line 116 of file ast.py.

References cpp.ast.Node.IsDeclaration().

116  def IsDeclaration(self):
117  """Returns bool if this node is a declaration."""
118  return False
119 
def IsDeclaration(self)
Definition: ast.py:116
def cpp.ast.Node.IsDefinition (   self)
Returns bool if this node is a definition.

Definition at line 120 of file ast.py.

Referenced by cpp.ast.Node.IsDefinition().

120  def IsDefinition(self):
121  """Returns bool if this node is a definition."""
122  return False
123 
def IsDefinition(self)
Definition: ast.py:120
def cpp.ast.Node.IsDefinition (   self)
Returns bool if this node is a definition.

Definition at line 120 of file ast.py.

References cpp.ast.Node.IsDefinition().

120  def IsDefinition(self):
121  """Returns bool if this node is a definition."""
122  return False
123 
def IsDefinition(self)
Definition: ast.py:120
def cpp.ast.Node.IsDefinition (   self)
Returns bool if this node is a definition.

Definition at line 120 of file ast.py.

References cpp.ast.Node.IsDefinition().

120  def IsDefinition(self):
121  """Returns bool if this node is a definition."""
122  return False
123 
def IsDefinition(self)
Definition: ast.py:120
def cpp.ast.Node.IsExportable (   self)
Returns bool if this node exportable from a header file.

Definition at line 124 of file ast.py.

References cpp.ast.Node.IsExportable().

124  def IsExportable(self):
125  """Returns bool if this node exportable from a header file."""
126  return False
127 
def IsExportable(self)
Definition: ast.py:124
def cpp.ast.Node.IsExportable (   self)
Returns bool if this node exportable from a header file.

Definition at line 124 of file ast.py.

Referenced by cpp.ast.Node.IsExportable().

124  def IsExportable(self):
125  """Returns bool if this node exportable from a header file."""
126  return False
127 
def IsExportable(self)
Definition: ast.py:124
def cpp.ast.Node.IsExportable (   self)
Returns bool if this node exportable from a header file.

Definition at line 124 of file ast.py.

References cpp.ast.Node.IsExportable().

124  def IsExportable(self):
125  """Returns bool if this node exportable from a header file."""
126  return False
127 
def IsExportable(self)
Definition: ast.py:124
def cpp.ast.Node.Requires (   self,
  node 
)
Does this AST node require the definition of the node passed in?

Definition at line 128 of file ast.py.

Referenced by cpp.ast.Node.Requires().

128  def Requires(self, node):
129  """Does this AST node require the definition of the node passed in?"""
130  return False
131 
def Requires(self, node)
Definition: ast.py:128
def cpp.ast.Node.Requires (   self,
  node 
)
Does this AST node require the definition of the node passed in?

Definition at line 128 of file ast.py.

References cpp.ast.Node.Requires().

128  def Requires(self, node):
129  """Does this AST node require the definition of the node passed in?"""
130  return False
131 
def Requires(self, node)
Definition: ast.py:128
def cpp.ast.Node.Requires (   self,
  node 
)
Does this AST node require the definition of the node passed in?

Definition at line 128 of file ast.py.

References cpp.ast.Node.Requires().

128  def Requires(self, node):
129  """Does this AST node require the definition of the node passed in?"""
130  return False
131 
def Requires(self, node)
Definition: ast.py:128
def cpp.ast.Node.XXX__str__ (   self)

Definition at line 132 of file ast.py.

References cpp.ast.Node._StringHelper(), and cpp.ast.Node.XXX__str__().

132  def XXX__str__(self):
133  return self._StringHelper(self.__class__.__name__, '')
134 
def _StringHelper(self, name, suffix)
Definition: ast.py:135
def XXX__str__(self)
Definition: ast.py:132
def cpp.ast.Node.XXX__str__ (   self)

Definition at line 132 of file ast.py.

References cpp.ast.Node._StringHelper().

Referenced by cpp.ast.Node.XXX__str__().

132  def XXX__str__(self):
133  return self._StringHelper(self.__class__.__name__, '')
134 
def _StringHelper(self, name, suffix)
Definition: ast.py:135
def XXX__str__(self)
Definition: ast.py:132
def cpp.ast.Node.XXX__str__ (   self)

Definition at line 132 of file ast.py.

References cpp.ast.Node._StringHelper(), and cpp.ast.Node.XXX__str__().

132  def XXX__str__(self):
133  return self._StringHelper(self.__class__.__name__, '')
134 
def _StringHelper(self, name, suffix)
Definition: ast.py:135
def XXX__str__(self)
Definition: ast.py:132

Member Data Documentation


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