Back to index

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

List of all members.

Public Member Functions

def __init__
def visitModule
def visitType
def visitSum
def visitConstructor
def visitField
def visitProduct
def visit

Public Attributes

 cons
 errors
 types
 cache
 skip
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

Definition at line 347 of file asdl.py.


Constructor & Destructor Documentation

def asdl.Check.__init__ (   self)

Definition at line 349 of file asdl.py.

00349 
00350     def __init__(self):
00351         super(Check, self).__init__(skip=True)
00352         self.cons = {}
00353         self.errors = 0
00354         self.types = {}

Here is the caller graph for this function:


Member Function Documentation

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:

def asdl.Check.visitConstructor (   self,
  cons,
  name 
)

Definition at line 366 of file asdl.py.

00366 
00367     def visitConstructor(self, cons, name):
00368         key = str(cons.name)
00369         conflict = self.cons.get(key)
00370         if conflict is None:
00371             self.cons[key] = name
00372         else:
00373             output("Redefinition of constructor %s" % key)
00374             output("Defined in %s and %s" % (conflict, name))
00375             self.errors += 1
00376         for f in cons.fields:
00377             self.visit(f, key)

Here is the call graph for this function:

Here is the caller graph for this function:

def asdl.Check.visitField (   self,
  field,
  name 
)

Definition at line 378 of file asdl.py.

00378 
00379     def visitField(self, field, name):
00380         key = str(field.type)
00381         l = self.types.setdefault(key, [])
00382         l.append(name)

Here is the caller graph for this function:

def asdl.Check.visitModule (   self,
  mod 
)

Definition at line 355 of file asdl.py.

00355 
00356     def visitModule(self, mod):
00357         for dfn in mod.dfns:
00358             self.visit(dfn)

Here is the call graph for this function:

def asdl.Check.visitProduct (   self,
  prod,
  name 
)

Definition at line 383 of file asdl.py.

00383 
00384     def visitProduct(self, prod, name):
00385         for f in prod.fields:
00386             self.visit(f, name)

Here is the call graph for this function:

def asdl.Check.visitSum (   self,
  sum,
  name 
)

Definition at line 362 of file asdl.py.

00362 
00363     def visitSum(self, sum, name):
00364         for t in sum.types:
00365             self.visit(t, name)

Here is the call graph for this function:

def asdl.Check.visitType (   self,
  type 
)

Definition at line 359 of file asdl.py.

00359 
00360     def visitType(self, type):
00361         self.visit(type.value, str(type.name))

Here is the call graph for this function:


Member Data Documentation

Definition at line 316 of file asdl.py.

Definition at line 351 of file asdl.py.

Definition at line 352 of file asdl.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.

Definition at line 353 of file asdl.py.


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