def __init__(self):
     scopeMgr = NodeVisitorBases.ScopedSaveRestoreComputedValue(
         self.getBoundValues, self._setBoundValues,
         GenericBoundValuesScopedVisitor._computeScopeBoundValues)
     super(GenericBoundValuesScopedVisitor, self).__init__(scopeMgr)
     self._boundValues = set()
     self._boundInScopeSoFar = set()
Exemple #2
0
    def __init__(self, exclude_predicate=None):
        scopeMgr = NodeVisitorBases.ScopedSaveRestoreComputedValue(
            self.getBoundValues, self._setBoundValues,
            _FreeVariableMemberAccessChainsTransvisitor.
            _computeScopeBoundValues)
        super(_FreeVariableMemberAccessChainsTransvisitor,
              self).__init__(scopeMgr)
        self._boundValues = set()
        self._boundInScopeSoFar = set()

        self._freeVariableMemberAccessChainsWithPos = collections.defaultdict(
            set)
        self._freeVariablesWithPos = collections.defaultdict(set)

        self._exclude_predicate = exclude_predicate