class documentation

class TokenProcessor:

Known subclasses: sphinx.pycode.parser.AfterCommentParser, sphinx.pycode.parser.DefinitionFinder

View In Hierarchy

Undocumented

Method __init__ Undocumented
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, buffers):

Undocumented

Parameters
buffers:List[str]Undocumented
def fetch_token(self):

Fetch the next token from source code.

Returns None if sequence finished.

Returns
TokenUndocumented
def fetch_until(self, condition):

Fetch tokens until specified token appeared.

Note

This also handles parenthesis well.

Parameters
condition:AnyUndocumented
Returns
List[Token]Undocumented
def get_line(self, lineno):
Returns specified line.
Parameters
lineno:intUndocumented
Returns
strUndocumented
buffers =

Undocumented

current =

Undocumented

previous =

Undocumented

tokens =

Undocumented