ok

Mini Shell

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

�
��\c@sdZddlZddlmZddlmZddlmZmZm	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��YZNdme:fdn��YZOdoe:fdp��YZPdqe:fdr��YZQdse:fdt��YZRdue:fdv��YZSdwe:fdx��YZTdye:fdz��YZUd{e:fd|��YZVd}e:fd~��YZWde;fd���YZXd�e;fd���YZYd�e;fd���YZZd�e9fd���YZ[d�e9fd���YZ\d�e9fd���YZ]d�e9fd���YZ^d�e9fd���YZ_d�e9fd���YZ`d�e9fd���YZad�e)fd���YZbd�e)fd���YZcd�e)fd���YZdd�e)fd���YZed�eefd���YZfd��Zgeheg�e$_i[gdS(�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�xZdD]R}g}|jt|d|d��|j|j|d��t|�||<qW|jdt�tj||||�S(Ntfieldst
attributesitabstract(sfieldss
attributes(((textendtgetattrtgetttuplet
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(tselfR0t
template_name((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt__init__Qs
	cCs
|jj�S(N(t__dict__tcopy(R4((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytsaveYscCs!|jj�|jj|�dS(N(R7tcleartupdate(R4told((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytrevert\s
N(RRRtNoneR6R9R=(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR/Ls	cCs;|dkr7|jdkr*td��nt|j�S|S(NsIif no eval context is passed, the node must have an attached environment.(R>R0tRuntimeErrorR/(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.
    tlinenoR0c	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	TypeErrortlenRt	__class__RRtsetattrRtpopR>Rtiter(R4RRR*targR-((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR6s$			+ 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(RR>R"tAttributeError(R4texcludetonlyR*((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(RQt
isinstancetlistRC(R4RORPtfieldtitemtn((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(R4t	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(RWRRRX(R4RYtchildRZ((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRX�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.
        RA(RtpopleftRRAR!RW(R4RAttodoR@((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.RDN(RR]RRDR>R!RW(R4RDtoverrideR^R@((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]R0R!RW(R4R0R^R@((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytset_environment�s		cCs:t|�t|�ko9t|j��t|j��kS(N(R'R$RQ(R4tother((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt__eq__�scCs|j|�S(N(Rd(R4Rc((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"R>(t.0RM(R4(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>�s(RIRtjoinR(R4((R4s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt__repr__�s	((slinenosenvironmentN(RRRRRtTrueR R6R>RQRWR[RXR_R&RaRbRdRetobjectt__hash__Rh(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRCks 	
		
						tStmtcBseZdZeZRS(sBase node for all statements.(RRRRiR (((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRl�stHelpercBseZdZeZRS(s,Nodes that exist in a specific context only.(RRRRiR (((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRm�stTemplatecBseZdZdZRS(sjNode that represents a template.  This must be the outermost node that
    is passed to the compiler.
    tbody(Ro(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRnstOutputcBseZdZdZRS(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.pyRpstExtendscBseZdZdZRS(s Represents an extends statement.ttemplate(stemplate(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRrstForcBseZdZdZRS(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`.
    ttargetRLRotelse_ttestt	recursive(RusitersbodyRvstestRx(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRtstIfcBseZdZdZRS(s4If `test` is true, `body` is rendered, else `else_`.RwRoRv(stestsbodyselse_(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRystMacrocBseZdZdZRS(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*targstdefaultsRo(snamesargsR|sbody(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRz#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|Ro(scallsargssdefaultssbody(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR}+stFilterBlockcBseZdZdZRS(sNode for filter sections.Rotfilter(sbodysfilter(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR2stBlockcBseZdZdZRS(sA node that represents a block.R*Rotscoped(snamesbodyR�(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�7stIncludecBseZdZdZRS(s'A node that represents the include tag.Rst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.RsRuR�(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.
    RstnamesR�(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.R@(snode(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�TstAssigncBseZdZdZRS(s"Assigns an expression to a target.RuR@(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(R4teval_ctx((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytas_constbscCstS(s8Check if it's possible to assign something to this node.(R&(R4((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt
can_assignosN(RRRRiR R>R�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(RBR0t	sandboxedtoperatortintercepted_binopsRt_binop_to_funcR�R�R�t	Exception(R4R�tf((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�zs
)
(sleftsrightN(	RRRRR>R�RiR R�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�ts
t	UnaryExprcBs,eZdZdZdZeZdd�ZRS(s$Baseclass for all unary expressions.R@cCs�t||�}|jjr<|j|jjkr<t��nt|j}y||jj|��SWnt	k
rt��nXdS(N(
RBR0R�R�tintercepted_unopsRt
_uaop_to_funcR@R�R�(R4R�R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s

(snodeN(	RRRRR>R�RiR 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*RAcCs
|jdkS(NttruetfalsetnoneRiR&R>(R�R�R�sTruesFalsesNone(R*(R4((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.(RRRRiR (((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�(R4R�((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_reprRDR0(tcompilerR�R(R)R�RDR0R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytfrom_untrusted�s(svalueN(RRRRR>R�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(RBR3RR2RR�(R4R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s		
(sdataN(RRRRR>R�(((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.
    titemsRAcs,t|���t�fd�|jD��S(Nc3s|]}|j��VqdS(N(R�(Rftx(R�(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>�s(RBR$R�(R4R�((R�s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��scCs(x!|jD]}|j�s
tSq
WtS(N(R�R�R&Ri(R4RU((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(sitemssctxN(RRRRR>R�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(RBR�R�(R4R�R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(sitemsN(RRRRR>R�(((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�(RfR�(R�(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>�s(RBtdictR�(R4R�((R�s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(sitemsN(RRRRR>R�(((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(RBR�R�R�(R4R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(skeysvalueN(RRRRR>R�(((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(RBR�R�R�(R4R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�s(skeysvalueN(RRRRR>R�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�stCondExprcBs eZdZdZdd�ZRS(sZA conditional expression (inline if expression).  (``{{
    foo if bar else baz }}``)
    Rwtexpr1texpr2cCs\t||�}|jj|�r1|jj|�S|jdkrLt��n|jj|�S(N(RBRwR�R�R�R>R(R4R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�s(stestsexpr1sexpr2N(RRRRR>R�(((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.
    R@R*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�(RfR�(R�(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>7s(RBR3R@R>RR0tfiltersR#R*R"R&R�R{tinsertR�R�R�R!R�R�R;(R4R�tfilter_tobjR�R{R�((R�s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�%s6%


(snodesnamesargsskwargssdyn_argss
dyn_kwargsN(RRRRR>R�(((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`.
    R@R*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.
    R@R{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�(RfR�(R�(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>hs(RBR3R0R�RR@R�R{RRt_context_function_typesR"R&R�R�R�R�R>R!R�R�R;(R4R�R�R�R{R�((R�s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�Xs6%


(snodesargsskwargssdyn_argss
dyn_kwargsN(RRRRR>R�(((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.R@RMRAcCszt||�}|jdkr*t��ny/|jj|jj|�|jj|��SWntk
rut��nXdS(Ntload(	RBRARR0tgetitemR@R�RMR�(R4R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�}s
cCstS(N(R&(R4((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(snodesargsctxN(RRRRR>R�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.
    R@R-RAcCsq|jdkrt��ny5t||�}|jj|jj|�|j�SWntk
rlt��nXdS(NR�(	RARRBR0R"R@R�R-R�(R4R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s
cCstS(N(R&(R4((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(snodesattrsctxN(RRRRR>R�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(R>R�(R�(R�(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytconst�s(RBtsliceR�R�R�(R4R�R�((R�s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(sstartsstopsstepN(RRRRR>R�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stConcatcBs eZdZdZdd�ZRS(sXConcatenates the list of expressions provided after converting them to
    unicode.
    Rqcs/t|���dj�fd�|jD��S(NRFc3s$|]}t|j���VqdS(N(RR�(RfR�(R�(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys	<genexpr>�s(RBRgRq(R4R�((R�s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s(snodesN(RRRRR>R�(((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(RBR�R�R�t_cmpop_to_functopR�R(R4R�RZR�R�t	new_value((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��s

(sexprsopsN(RRRRR>R�(((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��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(RBR�R�R�(R4R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��sN(RRRR�R>R�(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��stOrcBs eZdZdZdd�ZRS(sShort circuited OR.torcCs1t||�}|jj|�p0|jj|�S(N(RBR�R�R�(R4R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�sN(RRRR�R>R�(((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.(RG(R4((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR6Bs(sname(RRRRR6(((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(RBRR�R�(R4R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�Ks(sexprN(RRRRR>R�(((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(RBR3RR�R�R2R(R4R�R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR�Xs		
(sexprN(RRRRR>R�(((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.Ro(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`.
    Ro(sbody(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR��scOstd��dS(Nscan't create custom node types(RG(R{R�((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt_failing_new�s(jRR�tcollectionsRtjinja2.utilsRtjinja2._compatRRRRRRR�tmulttruedivtfloordivtpowtmodtaddtsubR�tnot_tpostnegR�RRRtgeRtleR�R�RR'RRjR/RBRCRlRmRnRpRrRtRyRzR}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�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