class documentation

class ASTBuilder: (source)

View In Hierarchy

Keeps tracks of the state of the AST build, creates documentable and adds objects to the system.

Method __init__ Undocumented
Method addAttribute Add a new attribute to the system, attributes cannot be "entered".
Method parseFile Undocumented
Method parseString Undocumented
Method pop Leave a documentable.
Method popClass Leave a class.
Method popFunction Leave a function.
Method processModuleAST Undocumented
Method push Enter a documentable.
Method pushClass Create and a new class in the system.
Method pushFunction Create and enter a new function in the system.
Instance Variable ast_cache Undocumented
Instance Variable current Undocumented
Instance Variable currentAttr Undocumented
Instance Variable currentMod Undocumented
Instance Variable system Undocumented
Method _pop Undocumented
Method _push Create and enter a new object of the given type and add it to the system.
Instance Variable _stack Undocumented
def __init__(self, system): (source)

Undocumented

Parameters
system:model.SystemUndocumented
def addAttribute(self, name, kind, parent): (source)

Add a new attribute to the system, attributes cannot be "entered".

Parameters
name:strUndocumented
kind:Optional[model.DocumentableKind]Undocumented
parent:model.DocumentableUndocumented
Returns
model.AttributeUndocumented
def parseFile(self, path, ctx): (source)

Undocumented

Parameters
path:PathUndocumented
ctx:model.ModuleUndocumented
Returns
Optional[ast.Module]Undocumented
def parseString(self, py_string, ctx): (source)

Undocumented

Parameters
py_string:strUndocumented
ctx:model.ModuleUndocumented
Returns
Optional[ast.Module]Undocumented
def pop(self, obj): (source)

Leave a documentable.

Parameters
obj:model.DocumentableUndocumented
def popClass(self): (source)

Leave a class.

def popFunction(self): (source)

Leave a function.

def processModuleAST(self, mod_ast, mod): (source)

Undocumented

Parameters
mod_ast:ast.ModuleUndocumented
mod:model.ModuleUndocumented
def push(self, obj, lineno): (source)

Enter a documentable.

Parameters
obj:model.DocumentableUndocumented
lineno:intUndocumented
def pushClass(self, name, lineno): (source)

Create and a new class in the system.

Parameters
name:strUndocumented
lineno:intUndocumented
Returns
model.ClassUndocumented
def pushFunction(self, name, lineno): (source)

Create and enter a new function in the system.

Parameters
name:strUndocumented
lineno:intUndocumented
Returns
model.FunctionUndocumented
ast_cache: Dict[Path, Optional[ast.Module]] = (source)

Undocumented

Undocumented

currentAttr = (source)

Undocumented

currentMod = (source)

Undocumented

Undocumented

def _pop(self, cls): (source)

Undocumented

Parameters
cls:Type[model.Documentable]Undocumented
def _push(self, cls, name, lineno): (source)

Create and enter a new object of the given type and add it to the system.

Parameters
cls:Type[DocumentableT]Undocumented
name:strUndocumented
lineno:intUndocumented
Returns
DocumentableTUndocumented