%PDF- %PDF-
Direktori : /snap/core20/2599/lib/python3/dist-packages/jinja2/__pycache__/ |
Current File : //snap/core20/2599/lib/python3/dist-packages/jinja2/__pycache__/compiler.cpython-38.pyc |
U ��g� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlm Z ddl mZ ddlm Z ddlmZ dd lmZ dd lmZ ddlmZmZmZ ddlmZmZmZmZmZmZmZ dd l m!Z!m"Z"m#Z#m$Z$m%Z% ddddddddd�Z&e'e(d�r�dZ)ndZ)dgZ*ze+d� e*�,d� W n e-k �r Y nX ze+d� W n e-k �rH dZ.Y nX dZ.dd � Z/d6d"d#�Z0d$d%� Z1d&d'� Z2G d(d)� d)e3�Z4G d*d+� d+e3�Z5G d,d-� d-e6�Z7G d.d/� d/e�Z8G d0d1� d1e�Z9G d2d3� d3e:�Z;G d4d5� d5e�Z<d!S )7z� jinja2.compiler ~~~~~~~~~~~~~~~ Compiles nodes into python code. :copyright: (c) 2017 by the Jinja Team. :license: BSD, see LICENSE for more details. � )�chain)�deepcopy)� iskeyword��update_wrapper)�nodes)�EvalContext)�NodeVisitor)� Optimizer)�TemplateAssertionError)�Markup�concat�escape)� range_type� text_type�string_types� iteritems�NativeStringIO�imap�izip)�Symbols�VAR_LOAD_PARAMETER�VAR_LOAD_RESOLVE�VAR_LOAD_ALIAS�VAR_LOAD_UNDEFINEDz==z!=�>z>=�<z<=�inznot in)�eq�ne�gtZgteq�ltZlteqr Znotinr �itemsZdivisionz%from __future__ import generator_stopZgenerator_stopzdef f(): yield from x()FTc s � fdd�}t |� �S )Nc sB | j r2|jjs2| j�||j�}||kr2| �||�S � | ||f|�S �N)� optimized�eval_ctx�volatile� optimizer�visit)�self�node�frame�kwargsZnew_node��f� �1/usr/lib/python3/dist-packages/jinja2/compiler.py�new_func@ s zoptimizeconst.<locals>.new_funcr )r. r1 r/ r- r0 � optimizeconst? s r2 Nc C sH t | tj�std��|�||||||�}|�| � |dkrD|j�� S dS )z+Generate the python source for a node tree.z Can't compile non template nodesN)� isinstancer ZTemplate� TypeErrorZcode_generator_classr( �stream�getvalue)r* �environment�name�filenamer5 � defer_initr$ � generatorr/ r/ r0 �generateJ s � r<