class VisitorExt(_BaseVisitor[
Known subclasses: pydoctor.astutils.NodeVisitorExt
, pydoctor.test.test_visitor.GenericDumpAfter
, pydoctor.test.test_visitor.GenericDumpBefore
, pydoctor.test.test_visitor.ParagraphDump
, pydoctor.test.test_visitor.TitleReferenceDumpAfter
The node visitor extension base class, to inherit from.
Subclasses must define the when
class variable, and any custom visit_* methods.
All _TreePruningException
raised in the main Visitor.visit()
method will be
delayed until extensions visitor visit() and depart() methods are run as well.
- Meaning:
- If the main module visitor raises
SkipNode
, the extension visitor set to run AFTER will still visit this node, but not it's children. - If your extension visitor is set to run BEFORE the main visitor and it raises
SkipNode
, the main visitor will not visit this node. - If a L{SkipNode} or L{SkipDeparture} exception is raised inside the main visitor C{visit()} method, the C{depart_*} method on the extensions will still be called.
- If the main module visitor raises
See: When
Method | __init__ |
Initialize the visitor extension. |
Method | attach |
Attach the parent visitor to this extension. |
Method | unknown |
Called before exiting unknown object types. |
Method | unknown |
Called when entering unknown object types. |
Instance Variable | visitor |
The parent visitor |
Inherited from _BaseVisitor
:
Method | depart |
Depart an object. |
Method | visit |
Visit an object. |
pydoctor.test.test_visitor.GenericDumpAfter
, pydoctor.test.test_visitor.GenericDumpBefore
Called before exiting unknown object types.
Raise exception unless overridden.
Parameters | |
ob:T | Undocumented |
pydoctor.test.test_visitor.GenericDumpAfter
, pydoctor.test.test_visitor.GenericDumpBefore
Called when entering unknown object types.
Raise an exception unless overridden.
Parameters | |
ob:T | Undocumented |