Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
asdl_c.EmitVisitor Class Reference
Inheritance diagram for asdl_c.EmitVisitor:
Inheritance graph
[legend]
Collaboration diagram for asdl_c.EmitVisitor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def emit
def visit

Public Attributes

 file
 cache
 skip
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

Visit that emits lines

Definition at line 82 of file asdl_c.py.


Constructor & Destructor Documentation

def asdl_c.EmitVisitor.__init__ (   self,
  file 
)

Reimplemented from asdl.VisitorBase.

Definition at line 85 of file asdl_c.py.

00085 
00086     def __init__(self, file):
00087         self.file = file
00088         super(EmitVisitor, self).__init__()

Here is the caller graph for this function:


Member Function Documentation

def asdl_c.EmitVisitor.emit (   self,
  s,
  depth,
  reflow = True 
)

Definition at line 89 of file asdl_c.py.

00089 
00090     def emit(self, s, depth, reflow=True):
00091         # XXX reflow long lines?
00092         if reflow:
00093             lines = reflow_lines(s, depth)
00094         else:
00095             lines = [s]
00096         for line in lines:
00097             line = (" " * TABSIZE * depth) + line + "\n"
00098             self.file.write(line)
00099 

Here is the call graph for this function:

def asdl.VisitorBase.visit (   self,
  object,
  args 
) [inherited]

Definition at line 319 of file asdl.py.

00319 
00320     def visit(self, object, *args):
00321         meth = self._dispatch(object)
00322         if meth is None:
00323             return
00324         try:
00325             meth(object, *args)
00326         except Exception:
00327             output("Error visiting" + repr(object))
00328             output(str(sys.exc_info()[1]))
00329             traceback.print_exc()
00330             # XXX hack
00331             if hasattr(self, 'file'):
00332                 self.file.flush()
00333             os._exit(1)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 316 of file asdl.py.

Definition at line 86 of file asdl_c.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

asdl.VisitorBase.skip [inherited]

Definition at line 317 of file asdl.py.


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