def getEndLine(self):
        if self.endline is None:
            physicallines = self.getMaskedModuleLines()
            lineno = self.linenum
            logicallines = generateLogicalLines(physicallines[lineno - 1:])

            # skip the first line, because it's the declaration
            line = logicallines.next()
            lineno += line.count("\n")

            # scan to the end of the fn
            for line in logicallines:
                #print lineno,":",line,
                match = indentRE.match(line)
                if match and match.end() - 1 <= self.indent:
                    break
                lineno += line.count("\n")
            self.endline = lineno
        return self.endline
Beispiel #2
0
    def getEndLine(self):
        if self.endline is None:
            physicallines = self.getMaskedModuleLines()
            lineno = self.linenum
            logicallines = generateLogicalLines(physicallines[lineno-1:])

            # skip the first line, because it's the declaration
            line = logicallines.next()
            lineno+=line.count("\n")

            # scan to the end of the fn
            for line in logicallines:
                #print lineno,":",line,
                match = indentRE.match(line)
                if match and match.end()-1 <= self.indent:
                    break
                lineno+=line.count("\n")
            self.endline = lineno
        return self.endline
 def getLogicalLine(self, physicalLineno):
     return generateLogicalLines(self._srclines[physicalLineno - 1:]).next()
Beispiel #4
0
 def getLogicalLine(self,physicalLineno):
     return generateLogicalLines(self._srclines[physicalLineno-1:]).next()