3 sݨ\#� � @ s� d Z ddlmZ ddlmZmZ ddlmZmZ ddl m Z edddd d ddd ddddg�Zeddddddg�Z ejejejejejejd�ZG dd� de�ZdS )z� jinja2.parser ~~~~~~~~~~~~~ Implements the template parser. :copyright: (c) 2017 by the Jinja Team. :license: BSD, see LICENSE for more details. � )�nodes)�TemplateSyntaxError�TemplateAssertionError)�describe_token�describe_token_expr)�imap�for�if�blockZextends�printZmacro�include�from�import�set�with� autoescape�eq�ne�ltZlteq�gtZgteq)�add�sub�mul�div�floordiv�modc @ s� e Zd ZdZdidd�Zdefdd�Zdd� Zdjd d �Zdkdd�Z dld d�Z dmdd�Zdd� Zdndd�Z dd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Zd.d/� Zd0d1� Zd2d3� Zd4d5� Zdod7d8�Zdpd9d:�Zd;d<� Z d=d>� Z!d?d@� Z"dAdB� Z#dCdD� Z$dEdF� Z%dGdH� Z&dIdJ� Z'dKdL� Z(dqdMdN�Z)dOdP� Z*drdQdR�Z+dSdT� Z,dUdV� Z-dWdX� Z.dYdZ� Z/d[d\� Z0d]d^� Z1d_d`� Z2dsdadb�Z3dcdd� Z4dtdedf�Z5dgdh� Z6dS )u�Parserz�This is the central parsing class Jinja2 uses. It's passed to extensions and can be used to parse expressions or statements. Nc C st || _ |j||||�| _|| _|| _d| _i | _x,|j� D ] }x|jD ]}|j | j|<