Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | List of all members
jinja2.visitor.NodeVisitor Class Reference
Inheritance diagram for jinja2.visitor.NodeVisitor:
Inheritance graph
[legend]

Public Member Functions

"t.Optional[VisitCallable]" get_visitor (self, Node node)
 
t.Any visit (self, Node node, *t.Any args, **t.Any kwargs)
 
t.Any generic_visit (self, Node node, *t.Any args, **t.Any kwargs)
 

Detailed Description

Walks the abstract syntax tree and call visitor functions for every
node found.  The visitor functions may return values which will be
forwarded by the `visit` method.

Per default the visitor functions for the nodes are ``'visit_'`` +
class name of the node.  So a `TryFinally` node visit function would
be `visit_TryFinally`.  This behavior can be changed by overriding
the `get_visitor` function.  If no visitor function exists for a node
(return value `None`) the `generic_visit` visitor is used instead.

Member Function Documentation

◆ generic_visit()

t.Any jinja2.visitor.NodeVisitor.generic_visit (   self,
Node  node,
*t.Any  args,
**t.Any  kwargs 
)
Called if no explicit visitor function exists for a node.

Reimplemented in jinja2.visitor.NodeTransformer, jinja2.idtracking.RootVisitor, and jinja2.optimizer.Optimizer.

◆ get_visitor()

"t.Optional[VisitCallable]" jinja2.visitor.NodeVisitor.get_visitor (   self,
Node  node 
)
Return the visitor function for this node or `None` if no visitor
exists for this node.  In that case the generic visit function is
used instead.

◆ visit()

t.Any jinja2.visitor.NodeVisitor.visit (   self,
Node  node,
*t.Any  args,
**t.Any  kwargs 
)
Visit a node.

The documentation for this class was generated from the following file: