'Decrement the block (scope) count'

def decBlock(self):

    log.info('decBlock:    depth:%d,    line:%d,    leavingScope:%r', self.depth, self.lineno, self.currentScope.name)
    if (self.depth > 0):
        self.depth = (self.depth - 1)
        self.lastScope = self.currentScope
        if hasattr(self.currentScope, 'lineend'):
            self.currentScope.lineend = self.lineno
            if (isinstance(self.currentScope, JSClass) and (len(self.currentScope.functions) == 1)):
                jsfunc = self.currentScope.functions.values()[0]
                if ((jsfunc.depth == self.depth) and (jsfunc.lineend == (-1))):
                    jsfunc.lineend = self.lineno
                    log.debug('Setting    lineend:    %d    for    scope    %r', self.lineno, jsfunc)
            log.debug('Setting    lineend:    %d    for    scope    %r', self.lineno, self.currentScope.name)
        else:
            log.debug('Current    scope    does    not    have    a    lineend:    %r', self.currentScope.name)
        self._scopeStack.pop()
        if (self._scopeStack[(-1)] != self.objectStack[(-1)]):
            self.objectStack.pop()
        self.currentScope = self._scopeStack[(-1)]
        log.debug('decBlock:    currentScope:%r', self.currentScope.name)
        if (not self.currentScope):
            log.info('decBlock::    No    currentScope    available.    Defaulting    to    global    file    scope.')
            self.currentScope = self.cile
            return
        oldCurrentClass = self.currentClass
        if isinstance(self.currentScope, JSClass):
            self.currentClass = self.currentScope
            log.debug('Currentclass    now:    %r', self.currentClass.name)
        elif isinstance(self.currentScope, JSFunction):
            self.currentClass = self.currentScope._class
            if self.currentClass:
                log.debug('Currentclass    now:    %r', self.currentClass.name)
            else:
                log.debug('Currentclass    now:    %r', self.currentClass)
        else:
            self.currentClass = None
            log.debug('Currentclass    now:    %r', self.currentClass)
        if (oldCurrentClass and (oldCurrentClass.lineend == (-1)) and (oldCurrentClass != self.currentClass)):
            oldCurrentClass.lineend = self.lineno
    else:
        log.debug('decBlock::    Scope    already    at    0.    Document    has    syntax    errors.')
