%PDF- %PDF-
| Direktori : /snap/core/17247/usr/lib/python3/dist-packages/jinja2/__pycache__/ |
| Current File : //snap/core/17247/usr/lib/python3/dist-packages/jinja2/__pycache__/visitor.cpython-35.pyc |
���S� � @ sF d Z d d l m Z Gd d � d e � Z Gd d � d e � Z d S)z�
jinja2.visitor
~~~~~~~~~~~~~~
This module implements a visitor for the nodes.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD.
� )�Nodec @ s: e Z d Z d Z d d � Z d d � Z d d � Z d S) �NodeVisitora 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.
c C s d | j j } t | | d � S)z�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.
Zvisit_N)� __class__�__name__�getattr)�self�node�method� r
�0/usr/lib/python3/dist-packages/jinja2/visitor.py�get_visitor s zNodeVisitor.get_visitorc O s>