class documentation
Keeps tracks of the state of the AST build, creates documentable and adds objects to the system.
| Method | __init__ |
Undocumented |
| Method | add |
Add a new attribute to the system. |
| Method | pop |
Leave a documentable. |
| Method | pop |
Leave a class. |
| Method | pop |
Leave a function. |
| Method | process |
Undocumented |
| Method | push |
Enter a documentable. |
| Method | push |
Create and a new class in the system. |
| Method | push |
Create and enter a new function in the system. |
| Instance Variable | current |
current visited object |
| Instance Variable | current |
module, set when visiting ast.Module |
| 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 addAttribute(self, name:
str, kind: model.DocumentableKind | None, parent: model.Documentable, lineno: int) -> model.Attribute:
(source)
¶
Add a new attribute to the system.
def _push(self, cls:
type[ DocumentableT], name: str, lineno: int, parent: model.Documentable | None = None) -> DocumentableT:
(source)
¶
Create and enter a new object of the given type and add it to the system.
| Parameters | |
cls:type[ | Undocumented |
name:str | Undocumented |
lineno:int | Undocumented |
parent:model.Documentable | None | Parent of the new documentable instance, it will use self.current if unspecified. Used for attributes declared in methods, typically ``__init__``. |
| Returns | |
DocumentableT | Undocumented |