class documentation

class DefinitionFinder(TokenProcessor): (source)

View In Hierarchy

Python source code parser to detect location of functions, classes and methods.

Method __init__ Undocumented
Method add_definition Add a location of definition.
Method finalize_block Finalize definition block.
Method parse Parse the code to obtain location of definitions.
Method parse_definition Parse AST of definition.
Instance Variable context Undocumented
Instance Variable decorator Undocumented
Instance Variable definitions Undocumented
Instance Variable indents 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 add_definition(self, name, entry): (source)

Add a location of definition.

Parameters
name:strUndocumented
entry:tuple[str, int, int]Undocumented
def finalize_block(self): (source)

Finalize definition block.

def parse(self): (source)

Parse the code to obtain location of definitions.

def parse_definition(self, typ): (source)

Parse AST of definition.

Parameters
typ:strUndocumented

Undocumented

decorator = (source)

Undocumented

definitions: dict[str, tuple[str, int, int]] = (source)

Undocumented

Undocumented