Home | History | Annotate | Download | only in tools

Lines Matching refs:lines

483     """a CppTokenizer derived class that accepts a list of texdt lines as input.
484 the lines must not have a trailing \n"""
485 def __init__(self,lines=[],lineno=1):
486 """initialize a CppLinesTokenizer. you can later add lines using addLines()"""
489 self.lines = lines
491 self.count = len(lines)
504 self.lines.append(line)
510 self.setLineText(self.lines[self.index])
1613 # Remove trailing whitespace and empty lines
1636 # on the line, and remove empty lines.
1672 # empty lines and spaces. They should not be printed in the final
2062 def parseLines(self,lines):
2063 """parse a list of text lines into a BlockList object"""
2064 return self.getBlocks( CppLinesTokenizer(lines) )
2074 def test_block_parsing(lines,expected):
2075 blocks = BlockParser().parse( CppLinesTokenizer(lines) )
2140 D2("appending lines %d to %d" % (blocks[i].lineno, blocks[j-1].lineno))
2159 D2("remove 'if 0' .. 'endif' (lines %d to %d)" % (blocks[i].lineno, blocks[j].lineno))
2163 D2("convert 'if 0' .. 'else' into 'if 1' (lines %d to %d)" % (blocks[i].lineno, blocks[j-1].lineno))
2184 D2("convert 'if 1' .. 'endif' (lines %d to %d)" % (blocks[j].lineno, blocks[k].lineno))
2189 D2("convert 'if 1' .. 'else' (lines %d to %d)" % (blocks[j].lineno, blocks[k].lineno))
2196 D2("convert 'if 1' .. 'elif' (lines %d to %d)" % (blocks[j].lineno, blocks[k].lineno))
2242 lines = string.split(text, '\n')
2243 list = BlockParser().parse( CppLinesTokenizer(lines) )