class documentation

class AfterCommentParser(TokenProcessor): (source)

View In Hierarchy

Python source code parser to pick up comments after assignments. This parser takes code which starts with an assignment statement, and returns the comment for the variable if one exists.

Method __init__ Undocumented
Method fetch_rvalue Fetch right-hand value of assignment.
Method parse Parse the code and obtain comment after assignment.
Instance Variable comment Undocumented

Inherited from TokenProcessor:

Method fetch_token Fetch the next token from source code.
Method fetch_until Fetch tokens until specified token appeared.
Method get_line Returns specified line.
Instance Variable buffers Undocumented
Instance Variable current Undocumented
Instance Variable previous Undocumented
Instance Variable tokens Undocumented
def __init__(self, lines): (source)

Undocumented

Parameters
lines:list[str]Undocumented
def fetch_rvalue(self): (source)

Fetch right-hand value of assignment.

Returns
list[Token]Undocumented
def parse(self): (source)

Parse the code and obtain comment after assignment.

Undocumented