class documentation

class CleansedLines(object):

Constructor: CleansedLines(lines)

View In Hierarchy

Holds 4 copies of all lines with different preprocessing applied to them.

  1. elided member contains lines without strings and comments.
  2. lines member contains lines without comments.
  3. raw_lines member contains all the lines without processing.
  4. lines_without_raw_strings member is same as raw_lines, but with C++11 raw strings removed.

All these members are of <type 'list'>, and of the same length.

Method __init__ Undocumented
Method NumLines Returns the number of lines represented.
Instance Variable elided Undocumented
Instance Variable lines Undocumented
Instance Variable lines_without_raw_strings Undocumented
Instance Variable num_lines Undocumented
Instance Variable raw_lines Undocumented
Static Method _CollapseStrings Collapses strings and chars on a line to simple "" or '' blocks.
def __init__(self, lines):

Undocumented

def NumLines(self):

Returns the number of lines represented.

elided: list =

Undocumented

lines: list =

Undocumented

lines_without_raw_strings =

Undocumented

num_lines =

Undocumented

raw_lines =

Undocumented

@staticmethod
def _CollapseStrings(elided):

Collapses strings and chars on a line to simple "" or '' blocks.

We nix strings first so we're not fooled by text like '"http://"'

Args:
elided: The line being processed.
Returns:
The line with collapsed strings.