class documentation

class AfterCommentParser(TokenProcessor):

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):

Undocumented

Parameters
lines:List[str]Undocumented
def fetch_rvalue(self):
Fetch right-hand value of assignment.
Returns
List[Token]Undocumented
def parse(self):
Parse the code and obtain comment after assignment.
comment =

Undocumented