ok

Mini Shell

Direktori : /proc/self/root/proc/self/root/usr/lib/python2.7/site-packages/jinja2/
Upload File :
Current File : //proc/self/root/proc/self/root/usr/lib/python2.7/site-packages/jinja2/nodes.pyc

�
��\c	@sUdZddlZddlmZddlmZddlmZmZm	Z	m
Z
mZmZeefZ
iejd6ejd6ejd6ejd	6ejd
6ejd6ejd6Ziejd
6ejd6ejd6Ziejd6ejd6ejd6ejd6ejd6ejd6d�d6d�d6Z de!fd��YZ"de#fd��YZ$de%fd��YZ&d�Z'de	e$e%�fd ��YZ(d!e(fd"��YZ)d#e(fd$��YZ*d%e(fd&��YZ+d'e)fd(��YZ,d)e)fd*��YZ-d+e)fd,��YZ.d-e)fd.��YZ/d/e)fd0��YZ0d1e)fd2��YZ1d3e)fd4��YZ2d5e)fd6��YZ3d7e)fd8��YZ4d9e)fd:��YZ5d;e)fd<��YZ6d=e)fd>��YZ7d?e)fd@��YZ8dAe(fdB��YZ9dCe9fdD��YZ:dEe9fdF��YZ;dGe9fdH��YZ<dIe9fdJ��YZ=dKe=fdL��YZ>dMe=fdN��YZ?dOe=fdP��YZ@dQe=fdR��YZAdSe=fdT��YZBdUe*fdV��YZCdWe*fdX��YZDdYe9fdZ��YZEd[e9fd\��YZFd]e9fd^��YZGd_e9fd`��YZHdae9fdb��YZIdce9fdd��YZJdee9fdf��YZKdge9fdh��YZLdie9fdj��YZMdke*fdl��YZNeNjdmdnjOePdo�eQe�eQe�BeQe �BD���7_dpe:fdq��YZRdre:fds��YZSdte:fdu��YZTdve:fdw��YZUdxe:fdy��YZVdze:fd{��YZWd|e:fd}��YZXd~e:fd��YZYd�e:fd���YZZd�e;fd���YZ[d�e;fd���YZ\d�e;fd���YZ]d�e9fd���YZ^d�e9fd���YZ_d�e9fd���YZ`d�e9fd���YZad�e9fd���YZbd�e9fd���YZcd�e9fd���YZdd�e)fd���YZed�e)fd���YZfd�e)fd���YZgd�e)fd���YZhd�ehfd���YZid��Zjekej�e$_l[jdS(�s}
    jinja2.nodes
    ~~~~~~~~~~~~

    This module implements additional nodes derived from the ast base node.

    It also provides some node tree helper functions like `in_lineno` and
    `get_nodes` used by the parser and translator in order to normalize
    python and jinja nodes.

    :copyright: (c) 2010 by the Jinja Team.
    :license: BSD, see LICENSE for more details.
i����N(tdeque(tMarkup(tnexttiziptwith_metaclasst	text_typetmethod_typet
function_typet*t/s//s**t%t+t-tnotteqtnetgttgteqtlttlteqcCs
||kS(N((tatb((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt<lambda>2stincCs
||kS(N((RR((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR3stnotint
ImpossiblecBseZdZRS(s8Raised if the node could not perform a requested action.(t__name__t
__module__t__doc__(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR7stNodeTypecBseZdZd�ZRS(s�A metaclass for nodes that handles the field and attribute
    inheritance.  fields and attributes from the parent class are
    automatically forwarded to the child.cCs�x�dD]�}g}|jt|d|d	��|j|j|d
��t|�dksgtd��t|�tt|��ks�td��t|�||<qW|jdt�t	j
||||�S(Ntfieldst
attributesiis multiple inheritance not allowedslayout conflicttabstract(sfieldss
attributes(((textendtgetattrtgettlentAssertionErrortsetttuplet
setdefaulttFalsettypet__new__(tclstnametbasestdtattrtstorage((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR+@s
*(RRRR+(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR;stEvalContextcBs,eZdZdd�Zd�Zd�ZRS(scHolds evaluation time information.  Custom attributes can be attached
    to it in extensions.
    cCsF||_t|j�r-|j|�|_n|j|_t|_dS(N(tenvironmenttcallablet
autoescapeR)tvolatile(tselfR3t
template_name((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt__init__Qs
	cCs
|jj�S(N(t__dict__tcopy(R7((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytsaveYscCs!|jj�|jj|�dS(N(R:tcleartupdate(R7told((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytrevert\s
N(RRRtNoneR9R<R@(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR2Ls	cCs;|dkr7|jdkr*td��nt|j�S|S(NsIif no eval context is passed, the node must have an attached environment.(RAR3tRuntimeErrorR2(tnodetctx((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytget_eval_contextas

tNodecBs�eZdZdZdZeZd�Zddd�Z	ddd�Z
d�Zd�Zd�Z
ed	�Zd
�Zd�Zd�ZejZd
�ZRS(s�Baseclass for all Jinja2 nodes.  There are a number of nodes available
    of different types.  There are four major types:

    -   :class:`Stmt`: statements
    -   :class:`Expr`: expressions
    -   :class:`Helper`: helper nodes
    -   :class:`Template`: the outermost wrapper node

    All nodes have fields and attributes.  Fields may be other nodes, lists,
    or arbitrary values.  Fields are passed to the constructor as regular
    positional arguments, attributes as keyword arguments.  Each node has
    two attributes: `lineno` (the line number of the node) and `environment`.
    The `environment` attribute is set at the end of the parsing process for
    all nodes automatically.
    tlinenoR3c	Os0|jrtd��n|r�t|�t|j�kr�|js[td|jj��ntd|jjt|j�t|j�dkr�dp�df��nx3t|j|�D]\}}t|||�q�Wnx-|jD]"}t|||j	|d��q�W|r,tdtt|����ndS(Ns#abstract nodes are not instanciables%r takes 0 argumentss%r takes 0 or %d argument%sitstsunknown attribute %r(
R t	TypeErrorR$Rt	__class__RRtsetattrRtpopRARtiter(R7RRR-targR0((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR9s$			+ ccs�x�|jD]�}||ko'dkns\|dk	rD||ks\|dk	r
||kr
y|t||�fVWq�tk
r�q�Xq
q
WdS(sZThis method iterates over all fields that are defined and yields
        ``(key, value)`` tuples.  Per default all fields are returned, but
        it's possible to limit that to some fields by providing the `only`
        parameter or to exclude some using the `exclude` parameter.  Both
        should be sets or tuples of field names.
        N(RRAR"tAttributeError(R7texcludetonlyR-((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytiter_fields�s
ccsxxq|j||�D]]\}}t|t�rYx?|D]}t|t�r5|Vq5q5Wqt|t�r|VqqWdS(s�Iterates over all direct child nodes of the node.  This iterates
        over all fields and yields the values of they are nodes.  If the value
        of a field is a list all the nodes in that list are returned.
        N(RSt
isinstancetlistRF(R7RQRRtfieldtitemtn((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytiter_child_nodes�s
cCsx|j|�D]}|SWdS(siFind the first node of a given type.  If no such node exists the
        return value is `None`.
        N(tfind_all(R7t	node_typetresult((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytfind�sccsQxJ|j�D]<}t||�r*|Vnx|j|�D]}|Vq:Wq
WdS(s�Find all the nodes of a given type.  If the type is a tuple,
        the check is performed for any of the tuple items.
        N(RYRTRZ(R7R[tchildR\((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRZ�s
cCsZt|g�}xD|rU|j�}d|jkr?||_n|j|j��qW|S(sReset the context of a node and all child nodes.  Per default the
        parser will all generate nodes that have a 'load' context as it's the
        most common one.  This method is used in the parser to set assignment
        targets and other nodes to a store context.
        RD(RtpopleftRRDR!RY(R7RDttodoRC((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytset_ctx�s	cCsrt|g�}x\|rm|j�}d|jkrW|jdksH|rW||_qWn|j|j��qW|S(s.Set the line numbers of the node and children.RGN(RR_RRGRAR!RY(R7RGtoverrideR`RC((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt
set_lineno�s	cCsHt|g�}x2|rC|j�}||_|j|j��qW|S(s"Set the environment for all nodes.(RR_R3R!RY(R7R3R`RC((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytset_environment�s		cCs:t|�t|�ko9t|j��t|j��kS(N(R*R'RS(R7tother((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt__eq__�scCs|j|�S(N(Rf(R7Re((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt__ne__�scs0d�jjdj�fd��jD��fS(Ns%s(%s)s, c3s+|]!}d|t�|d�fVqdS(s%s=%rN(R"RA(t.0RO(R7(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>�s(RKRtjoinR(R7((R7s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt__repr__�s	((slinenosenvironmentN(RRRRRtTrueR R9RARSRYR]RZRaR)RcRdRfRgtobjectt__hash__Rj(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRFks 	
		
						tStmtcBseZdZeZRS(sBase node for all statements.(RRRRkR (((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRn�stHelpercBseZdZeZRS(s,Nodes that exist in a specific context only.(RRRRkR (((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRo�stTemplatecBseZdZdZRS(sjNode that represents a template.  This must be the outermost node that
    is passed to the compiler.
    tbody(Rq(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRpstOutputcBseZdZdZRS(s�A node that holds multiple expressions which are then printed out.
    This is used both for the `print` statement and the regular template data.
    tnodes(snodes(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRrstExtendscBseZdZdZRS(s Represents an extends statement.ttemplate(stemplate(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRtstForcBseZdZdZRS(sxThe for loop.  `target` is the target for the iteration (usually a
    :class:`Name` or :class:`Tuple`), `iter` the iterable.  `body` is a list
    of nodes that are used as loop-body, and `else_` a list of nodes for the
    `else` block.  If no else node exists it has to be an empty list.

    For filtered nodes an expression can be stored as `test`, otherwise `None`.
    ttargetRNRqtelse_ttestt	recursive(RwsitersbodyRxstestRz(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRvstIfcBseZdZdZRS(s4If `test` is true, `body` is rendered, else `else_`.RyRqRx(stestsbodyselse_(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR{stMacrocBseZdZdZRS(s�A macro definition.  `name` is the name of the macro, `args` a list of
    arguments and `defaults` a list of defaults if there are any.  `body` is
    a list of nodes for the macro body.
    R-targstdefaultsRq(snamesargsR~sbody(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR|#st	CallBlockcBseZdZdZRS(s�Like a macro without a name but a call instead.  `call` is called with
    the unnamed macro as `caller` argument this node holds.
    tcallR}R~Rq(scallsargssdefaultssbody(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR+stFilterBlockcBseZdZdZRS(sNode for filter sections.Rqtfilter(sbodysfilter(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�2stBlockcBseZdZdZRS(sA node that represents a block.R-Rqtscoped(snamesbodyR�(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�7stIncludecBseZdZdZRS(s'A node that represents the include tag.Rutwith_contexttignore_missing(stemplateR�R�(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�<stImportcBseZdZdZRS(s&A node that represents the import tag.RuRwR�(stemplatestargetswith_context(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�Ast
FromImportcBseZdZdZRS(sA node that represents the from import tag.  It's important to not
    pass unsafe names to the name attribute.  The compiler translates the
    attribute lookups directly into getattr calls and does *not* use the
    subscript callback of the interface.  As exported variables may not
    start with double underscores (which the parser asserts) this is not a
    problem for regular Jinja code, but if this node is used in an extension
    extra care must be taken.

    The list of names may contain tuples if aliases are wanted.
    RutnamesR�(stemplatesnamesswith_context(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�Fs
tExprStmtcBseZdZdZRS(sAA statement that evaluates an expression and discards the result.RC(snode(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�TstAssigncBseZdZdZRS(s"Assigns an expression to a target.RwRC(stargetsnode(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�YstExprcBs)eZdZeZdd�Zd�ZRS(sBaseclass for all expressions.cCs
t��dS(snReturn the value of the expression as constant or raise
        :exc:`Impossible` if this was not possible.

        An :class:`EvalContext` can be provided, if none is given
        a default context is created which requires the nodes to have
        an attached environment.

        .. versionchanged:: 2.4
           the `eval_ctx` parameter was added.
        N(R(R7teval_ctx((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytas_constbscCstS(s8Check if it's possible to assign something to this node.(R)(R7((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt
can_assignosN(RRRRkR RAR�R�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�^s
tBinExprcBs,eZdZdZdZeZdd�ZRS(s%Baseclass for all binary expressions.tlefttrightcCs�t||�}|jjr<|j|jjkr<t��nt|j}y)||jj|�|j	j|��SWnt
k
r�t��nXdS(N(RER3t	sandboxedtoperatortintercepted_binopsRt_binop_to_funcR�R�R�t	Exception(R7R�tf((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�zs
)
(sleftsrightN(	RRRRRAR�RkR R�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�ts
t	UnaryExprcBs,eZdZdZdZeZdd�ZRS(s$Baseclass for all unary expressions.RCcCs�t||�}|jjr<|j|jjkr<t��nt|j}y||jj|��SWnt	k
rt��nXdS(N(
RER3R�R�tintercepted_unopsRt
_uaop_to_funcRCR�R�(R7R�R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s

(snodeN(	RRRRRAR�RkR R�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s
tNamecBseZdZdZd�ZRS(sLooks up a name or stores a value in a name.
    The `ctx` of the node can be one of the following values:

    -   `store`: store a value in the name
    -   `load`: load that name
    -   `param`: like `store` but if the name was defined as function parameter.
    R-RDcCs
|jdkS(NttruetfalsetnoneRkR)RA(R�R�R�sTruesFalsesNone(R-(R7((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(snamesctx(RRRRR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stLiteralcBseZdZeZRS(sBaseclass for literals.(RRRRkR (((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stConstcBs5eZdZdZdd�Zeddd��ZRS(sAll constant values.  The parser will return this node for simple
    constants such as ``42`` or ``"foo"`` but it can be used to store more
    complex values such as lists too.  Only constants with a safe
    representation (objects where ``eval(repr(x)) == x`` is true).
    tvaluecCs|jS(N(R�(R7R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��scCs>ddlm}||�s(t��n||d|d|�S(s�Return a const object if the value is representable as
        constant value in the generated code, otherwise it will raise
        an `Impossible` exception.
        i(t
has_safe_reprRGR3(tcompilerR�R(R,R�RGR3R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytfrom_untrusted�s(svalueN(RRRRRAR�tclassmethodR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s
tTemplateDatacBs eZdZdZdd�ZRS(sA constant template string.tdatacCsAt||�}|jr$t��n|jr:t|j�S|jS(N(RER6RR5RR�(R7R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s		
(sdataN(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stTuplecBs)eZdZdZdd�Zd�ZRS(s�For loop unpacking and some other things like multiple arguments
    for subscripts.  Like for :class:`Name` `ctx` specifies if the tuple
    is used for loading the names or storing.
    titemsRDcs,t|���t�fd�|jD��S(Nc3s|]}|j��VqdS(N(R�(Rhtx(R�(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>�s(RER'R�(R7R�((R�s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��scCs(x!|jD]}|j�s
tSq
WtS(N(R�R�R)Rk(R7RW((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(sitemssctxN(RRRRRAR�R�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stListcBs eZdZdZdd�ZRS(s&Any list literal such as ``[1, 2, 3]``R�cCs2t||�}g|jD]}|j|�^qS(N(RER�R�(R7R�R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(sitemsN(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stDictcBs eZdZdZdd�ZRS(seAny dict literal such as ``{1: 2, 3: 4}``.  The items must be a list of
    :class:`Pair` nodes.
    R�cs,t|���t�fd�|jD��S(Nc3s|]}|j��VqdS(N(R�(RhR�(R�(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>�s(REtdictR�(R7R�((R�s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(sitemsN(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stPaircBs eZdZdZdd�ZRS(sA key, value pair for dicts.tkeyR�cCs1t||�}|jj|�|jj|�fS(N(RER�R�R�(R7R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(skeysvalueN(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stKeywordcBs eZdZdZdd�ZRS(s>A key, value pair for keyword arguments where key is a string.R�R�cCs(t||�}|j|jj|�fS(N(RER�R�R�(R7R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�s(skeysvalueN(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�stCondExprcBs eZdZdZdd�ZRS(sZA conditional expression (inline if expression).  (``{{
    foo if bar else baz }}``)
    Rytexpr1texpr2cCs\t||�}|jj|�r1|jj|�S|jdkrLt��n|jj|�S(N(RERyR�R�R�RAR(R7R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�s(stestsexpr1sexpr2N(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�
stFiltercBs eZdZdZd	d�ZRS(
sThis node applies a filter on an expression.  `name` is the name of
    the filter, the rest of the fields are the same as for :class:`Call`.

    If the `node` of a filter is `None` the contents of the last buffer are
    filtered.  Buffers are created by macros and filter blocks.
    RCR-R}tkwargstdyn_argst
dyn_kwargscs�t|����js'|jdkr3t��n|jjj|j�}|dksit	|dt
�rut��n|jj��}g|jD]}|j��^q�}t	|dt
�r�|j
d��n(t	|dt
�r�|j
d|j�nt�fd�|jD��}|jdk	rdy|j|jj���Wqdtk
r`t��qdXn|jdk	r�y|j|jj���Wq�tk
r�t��q�Xny||||�SWntk
r�t��nXdS(Nt
contextfiltertevalcontextfilteritenvironmentfilterc3s|]}|j��VqdS(N(R�(RhR�(R�(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>7s(RER6RCRARR3tfiltersR#R-R"R)R�R}tinsertR�R�R�R!R�R�R>(R7R�tfilter_tobjR�R}R�((R�s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�%s6%


(snodesnamesargsskwargssdyn_argss
dyn_kwargsN(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�stTestcBseZdZdZRS(s�Applies a test on an expression.  `name` is the name of the test, the
    rest of the fields are the same as for :class:`Call`.
    RCR-R}R�R�R�(snodesnamesargsskwargssdyn_argss
dyn_kwargs(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�HstCallcBs eZdZdZdd�ZRS(	s/Calls an expression.  `args` is a list of arguments, `kwargs` a list
    of keyword arguments (list of :class:`Keyword` nodes), and `dyn_args`
    and `dyn_kwargs` has to be either `None` or a node that is used as
    node for dynamic positional (``*args``) or keyword (``**kwargs``)
    arguments.
    RCR}R�R�R�cs�t|����js$�jjr0t��n|jj��}g|jD]}|j��^qL}t|t	�r�t
|dt�r�t��q�t
|dt�r�|jd��q�t
|dt�r�|jd|j�q�nt
�fd�|jD��}|jdk	rOy|j|jj���WqOtk
rKt��qOXn|jdk	r�y|j|jj���Wq�tk
r�t��q�Xny|||�SWntk
r�t��nXdS(Ntcontextfunctiontevalcontextfunctionitenvironmentfunctionc3s|]}|j��VqdS(N(R�(RhR�(R�(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>hs(RER6R3R�RRCR�R}RTt_context_function_typesR"R)R�R�R�R�RAR!R�R�R>(R7R�R�R�R}R�((R�s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�Xs6%


(snodesargsskwargssdyn_argss
dyn_kwargsN(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�OstGetitemcBs)eZdZdZdd�Zd�ZRS(s@Get an attribute or item from an expression and prefer the item.RCRORDcCszt||�}|jdkr*t��ny/|jj|jj|�|jj|��SWntk
rut��nXdS(Ntload(	RERDRR3tgetitemRCR�ROR�(R7R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�}s
cCstS(N(R)(R7((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(snodesargsctxN(RRRRRAR�R�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�ys
tGetattrcBs)eZdZdZdd�Zd�ZRS(snGet an attribute or item from an expression that is a ascii-only
    bytestring and prefer the attribute.
    RCR0RDcCsq|jdkrt��ny5t||�}|jj|jj|�|j�SWntk
rlt��nXdS(NR�(	RDRRER3R"RCR�R0R�(R7R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s
cCstS(N(R)(R7((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(snodesattrsctxN(RRRRRAR�R�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s
tSlicecBs eZdZdZdd�ZRS(s_Represents a slice object.  This must only be used as argument for
    :class:`Subscript`.
    tstarttstoptstepcsIt|����fd�}t||j�||j�||j��S(Ncs|dkrdS|j��S(N(RAR�(R�(R�(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytconst�s(REtsliceR�R�R�(R7R�R�((R�s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(sstartsstopsstepN(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stConcatcBs eZdZdZdd�ZRS(sXConcatenates the list of expressions provided after converting them to
    unicode.
    Rscs/t|���dj�fd�|jD��S(NRIc3s$|]}t|j���VqdS(N(RR�(RhR�(R�(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>�s(RERiRs(R7R�((R�s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(snodesN(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stComparecBs eZdZdZdd�ZRS(siCompares an expression with some other expressions.  `ops` must be a
    list of :class:`Operand`\s.
    texprtopscCs�t||�}|jj|�}}yFx?|jD]4}|jj|�}t|j||�}|}q2WWntk
r�t��nX|S(N(RER�R�R�t_cmpop_to_functopR�R(R7R�R\R�R�t	new_value((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s

(sexprsopsN(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stOperandcBseZdZdZRS(s$Holds an operator and an expression.R�R�(sopsexpr(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��ss(
The following operators are available: s, ccs|]}d|VqdS(s``%s``N((RhR�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>�stMulcBseZdZdZRS(s(Multiplies the left with the right node.R(RRRR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stDivcBseZdZdZRS(s#Divides the left by the right node.R	(RRRR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stFloorDivcBseZdZdZRS(sjDivides the left by the right node and truncates conver the
    result into an integer by truncating.
    s//(RRRR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stAddcBseZdZdZRS(sAdd the left to the right node.R(RRRR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stSubcBseZdZdZRS(s'Substract the right from the left node.R(RRRR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stModcBseZdZdZRS(sLeft modulo right.R
(RRRR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stPowcBseZdZdZRS(sLeft to the power of right.s**(RRRR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stAndcBs eZdZdZdd�ZRS(sShort circuited AND.tandcCs1t||�}|jj|�o0|jj|�S(N(RER�R�R�(R7R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��sN(RRRR�RAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stOrcBs eZdZdZdd�ZRS(sShort circuited OR.torcCs1t||�}|jj|�p0|jj|�S(N(RER�R�R�(R7R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�sN(RRRR�RAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�stNotcBseZdZdZRS(sNegate the expression.R
(RRRR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�
stNegcBseZdZdZRS(sMake the expression negative.R(RRRR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�stPoscBseZdZdZRS(s8Make the expression positive (noop for most expressions)R(RRRR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�stEnvironmentAttributecBseZdZdZRS(s�Loads an attribute from the environment object.  This is useful for
    extensions that want to call a callback stored on the environment.
    R-(sname(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�stExtensionAttributecBseZdZdZRS(s�Returns the attribute of an extension bound to the environment.
    The identifier is the identifier of the :class:`Extension`.

    This node is usually constructed by calling the
    :meth:`~jinja2.ext.Extension.attr` method on an extension.
    t
identifierR-(R�sname(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�&stImportedNamecBseZdZdZRS(s&If created with an import name the import name is returned on node
    access.  For example ``ImportedName('cgi.escape')`` returns the `escape`
    function from the cgi module on evaluation.  Imports are optimized by the
    compiler so there is no need to assign them to local variables.
    t
importname(R�(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�0stInternalNamecBseZdZdZd�ZRS(s7An internal name in the compiler.  You cannot create these nodes
    yourself but the parser provides a
    :meth:`~jinja2.parser.Parser.free_identifier` method that creates
    a new identifier for you.  This identifier is not available from the
    template and is not threated specially by the compiler.
    R-cCstd��dS(NsKCan't create internal names.  Use the `free_identifier` method on a parser.(RJ(R7((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR9Bs(sname(RRRRR9(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�9stMarkSafecBs eZdZdZdd�ZRS(s:Mark the wrapped expression as safe (wrap it as `Markup`).R�cCs%t||�}t|jj|��S(N(RERR�R�(R7R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�Ks(sexprN(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�GstMarkSafeIfAutoescapecBs eZdZdZdd�ZRS(s�Mark the wrapped expression as safe (wrap it as `Markup`) but
    only if autoescaping is active.

    .. versionadded:: 2.5
    R�cCsMt||�}|jr$t��n|jj|�}|jrIt|�S|S(N(RER6RR�R�R5R(R7R�R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�Xs		
(sexprN(RRRRRAR�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�PstContextReferencecBseZdZRS(srReturns the current template context.  It can be used like a
    :class:`Name` node, with a ``'load'`` ctx and will return the
    current :class:`~jinja2.runtime.Context` object.

    Here an example that assigns the current template name to a
    variable named `foo`::

        Assign(Name('foo', ctx='store'),
               Getattr(ContextReference(), 'name'))
    (RRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�bs
tContinuecBseZdZRS(sContinue a loop.(RRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�ostBreakcBseZdZRS(s
Break a loop.(RRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�sstScopecBseZdZdZRS(sAn artificial scope.Rq(sbody(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�wstEvalContextModifiercBseZdZdZRS(s
Modifies the eval context.  For each option that should be modified,
    a :class:`Keyword` has to be added to the :attr:`options` list.

    Example to change the `autoescape` setting::

        EvalContextModifier(options=[Keyword('autoescape', Const(True))])
    toptions(R�(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�|stScopedEvalContextModifiercBseZdZdZRS(s�Modifies the eval context and reverts it later.  Works exactly like
    :class:`EvalContextModifier` but will only modify the
    :class:`~jinja2.nodes.EvalContext` for nodes in the :attr:`body`.
    Rq(sbody(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��scOstd��dS(Nscan't create custom node types(RJ(R}R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt_failing_new�s(mRR�tcollectionsRtjinja2.utilsRtjinja2._compatRRRRRRR�tmulttruedivtfloordivtpowtmodtaddtsubR�tnot_tpostnegR�RRRtgeRtleR�R�RR*RRlR2RERFRnRoRpRrRtRvR{R|RR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RitsortedR&R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�tstaticmethodR+(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt<module>s�.

















	
�
			,*
-		
		
		

Zerion Mini Shell 1.0