proxygen
cpp.ast.VariableDeclaration Class Reference
Inheritance diagram for cpp.ast.VariableDeclaration:
cpp.ast._GenericDeclaration cpp.ast._GenericDeclaration cpp.ast._GenericDeclaration cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Node cpp.ast.Node

Public Member Functions

def __init__ (self, start, end, name, var_type, initial_value, namespace)
 
def Requires (self, node)
 
def ToString (self)
 
def __str__ (self)
 
def __init__ (self, start, end, name, var_type, initial_value, namespace)
 
def Requires (self, node)
 
def ToString (self)
 
def __str__ (self)
 
def __init__ (self, start, end, name, var_type, initial_value, namespace)
 
def Requires (self, node)
 
def ToString (self)
 
def __str__ (self)
 
- Public Member Functions inherited from cpp.ast._GenericDeclaration
def __init__ (self, start, end, name, namespace)
 
def FullName (self)
 
def __init__ (self, start, end, name, namespace)
 
def FullName (self)
 
def __init__ (self, start, end, name, namespace)
 
def FullName (self)
 
- Public Member Functions inherited from cpp.ast.Node
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

 type
 
 initial_value
 
- Public Attributes inherited from cpp.ast._GenericDeclaration
 name
 
 namespace
 
- Public Attributes inherited from cpp.ast.Node
 start
 
 end
 

Detailed Description

Definition at line 252 of file ast.py.

Constructor & Destructor Documentation

def cpp.ast.VariableDeclaration.__init__ (   self,
  start,
  end,
  name,
  var_type,
  initial_value,
  namespace 
)

Definition at line 253 of file ast.py.

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

253  def __init__(self, start, end, name, var_type, initial_value, namespace):
254  _GenericDeclaration.__init__(self, start, end, name, namespace)
255  self.type = var_type
256  self.initial_value = initial_value
257 
def __init__(self, start, end, name, var_type, initial_value, namespace)
Definition: ast.py:253
def cpp.ast.VariableDeclaration.__init__ (   self,
  start,
  end,
  name,
  var_type,
  initial_value,
  namespace 
)

Definition at line 253 of file ast.py.

References cpp.ast.VariableDeclaration.__init__(), cpp.ast.VariableDeclaration.initial_value, message.type, http_parser.type, cpp.ast.Parameter.type, and cpp.ast.VariableDeclaration.type.

253  def __init__(self, start, end, name, var_type, initial_value, namespace):
254  _GenericDeclaration.__init__(self, start, end, name, namespace)
255  self.type = var_type
256  self.initial_value = initial_value
257 
def __init__(self, start, end, name, var_type, initial_value, namespace)
Definition: ast.py:253
def cpp.ast.VariableDeclaration.__init__ (   self,
  start,
  end,
  name,
  var_type,
  initial_value,
  namespace 
)

Definition at line 253 of file ast.py.

References cpp.ast.VariableDeclaration.__init__(), cpp.ast.VariableDeclaration.initial_value, message.type, http_parser.type, cpp.ast.Parameter.type, and cpp.ast.VariableDeclaration.type.

253  def __init__(self, start, end, name, var_type, initial_value, namespace):
254  _GenericDeclaration.__init__(self, start, end, name, namespace)
255  self.type = var_type
256  self.initial_value = initial_value
257 
def __init__(self, start, end, name, var_type, initial_value, namespace)
Definition: ast.py:253

Member Function Documentation

def cpp.ast.VariableDeclaration.__str__ (   self)

Definition at line 269 of file ast.py.

References cpp.ast.Node._StringHelper(), and cpp.ast.VariableDeclaration.ToString().

Referenced by cpp.ast.VariableDeclaration.__str__().

269  def __str__(self):
270  return self._StringHelper(self.__class__.__name__, self.ToString())
271 
272 
def _StringHelper(self, name, suffix)
Definition: ast.py:135
def cpp.ast.VariableDeclaration.__str__ (   self)

Definition at line 269 of file ast.py.

References cpp.ast.VariableDeclaration.__str__(), cpp.ast.Node._StringHelper(), and cpp.ast.VariableDeclaration.ToString().

269  def __str__(self):
270  return self._StringHelper(self.__class__.__name__, self.ToString())
271 
272 
def _StringHelper(self, name, suffix)
Definition: ast.py:135
def cpp.ast.VariableDeclaration.__str__ (   self)

Definition at line 269 of file ast.py.

References cpp.ast.VariableDeclaration.__str__(), cpp.ast.Node._StringHelper(), and cpp.ast.VariableDeclaration.ToString().

269  def __str__(self):
270  return self._StringHelper(self.__class__.__name__, self.ToString())
271 
272 
def _StringHelper(self, name, suffix)
Definition: ast.py:135
def cpp.ast.VariableDeclaration.Requires (   self,
  node 
)

Definition at line 258 of file ast.py.

References cpp.ast.VariableDeclaration.Requires().

258  def Requires(self, node):
259  # TODO(nnorwitz): handle namespaces, etc.
260  return self.type.name == node.name
261 
def Requires(self, node)
Definition: ast.py:258
def cpp.ast.VariableDeclaration.Requires (   self,
  node 
)

Definition at line 258 of file ast.py.

References cpp.ast.VariableDeclaration.Requires().

258  def Requires(self, node):
259  # TODO(nnorwitz): handle namespaces, etc.
260  return self.type.name == node.name
261 
def Requires(self, node)
Definition: ast.py:258
def cpp.ast.VariableDeclaration.Requires (   self,
  node 
)

Definition at line 258 of file ast.py.

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

258  def Requires(self, node):
259  # TODO(nnorwitz): handle namespaces, etc.
260  return self.type.name == node.name
261 
def Requires(self, node)
Definition: ast.py:258
def cpp.ast.VariableDeclaration.ToString (   self)
Return a string that tries to reconstitute the variable decl.

Definition at line 262 of file ast.py.

References cpp.ast.VariableDeclaration.initial_value, message.name, cpp.ast.Define.name, cpp.ast.Parameter.name, cpp.ast._GenericDeclaration.name, name, url_test.name, message.type, http_parser.type, cpp.ast.Parameter.type, and cpp.ast.VariableDeclaration.type.

Referenced by cpp.ast.VariableDeclaration.__str__(), and cpp.ast.VariableDeclaration.ToString().

262  def ToString(self):
263  """Return a string that tries to reconstitute the variable decl."""
264  suffix = '%s %s' % (self.type, self.name)
265  if self.initial_value:
266  suffix += ' = ' + self.initial_value
267  return suffix
268 
def cpp.ast.VariableDeclaration.ToString (   self)
Return a string that tries to reconstitute the variable decl.

Definition at line 262 of file ast.py.

References cpp.ast.VariableDeclaration.initial_value, message.name, cpp.ast.Define.name, cpp.ast.Parameter.name, cpp.ast._GenericDeclaration.name, name, url_test.name, cpp.ast.VariableDeclaration.ToString(), message.type, http_parser.type, cpp.ast.Parameter.type, and cpp.ast.VariableDeclaration.type.

262  def ToString(self):
263  """Return a string that tries to reconstitute the variable decl."""
264  suffix = '%s %s' % (self.type, self.name)
265  if self.initial_value:
266  suffix += ' = ' + self.initial_value
267  return suffix
268 
def cpp.ast.VariableDeclaration.ToString (   self)
Return a string that tries to reconstitute the variable decl.

Definition at line 262 of file ast.py.

References cpp.ast.VariableDeclaration.initial_value, message.name, cpp.ast.Define.name, cpp.ast.Parameter.name, cpp.ast._GenericDeclaration.name, name, url_test.name, cpp.ast.VariableDeclaration.ToString(), message.type, http_parser.type, cpp.ast.Parameter.type, and cpp.ast.VariableDeclaration.type.

262  def ToString(self):
263  """Return a string that tries to reconstitute the variable decl."""
264  suffix = '%s %s' % (self.type, self.name)
265  if self.initial_value:
266  suffix += ' = ' + self.initial_value
267  return suffix
268 

Member Data Documentation

cpp.ast.VariableDeclaration.initial_value
cpp.ast.VariableDeclaration.type

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