L]c@sdZddlZddlmZddlmZddlmZmZm Z m Z m Z m Z e e fZ iejd6ejd6ejd6ejd 6ejd 6ejd 6ejd 6Ziejd 6ejd 6ejd 6Ziejd6ejd6ejd6ejd6ejd6ejd6dd6dd6Z de!fdYZ"de#fdYZ$de%fdYZ&dZ'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)fd0YZ0d1e)fd2YZ1d3e)fd4YZ2d5e)fd6YZ3d7e)fd8YZ4d9e)fd:YZ5d;e)fd<YZ6d=e)fd>YZ7d?e)fd@YZ8dAe(fdBYZ9dCe9fdDYZ:dEe9fdFYZ;dGe9fdHYZ<dIe9fdJYZ=dKe=fdLYZ>dMe=fdNYZ?dOe=fdPYZ@dQe=fdRYZAdSe=fdTYZBdUe*fdVYZCdWe*fdXYZDdYe9fdZYZEd[e9fd\YZFd]e9fd^YZGd_e9fd`YZHdae9fdbYZIdce9fddYZJdee9fdfYZKdge9fdhYZLdie9fdjYZMdke*fdlYZNdme:fdnYZOdoe:fdpYZPdqe:fdrYZQdse:fdtYZRdue:fdvYZSdwe:fdxYZTdye:fdzYZUd{e:fd|YZVd}e:fd~YZWde;fdYZXde;fdYZYde;fdYZZde9fdYZ[de9fdYZ\de9fdYZ]de9fdYZ^de9fdYZ_de9fdYZ`de9fdYZade)fdYZbde)fdYZcde)fdYZdde)fdYZedeefdYZfdZgehege$_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. iN(tdeque(tMarkup(tnexttiziptwith_metaclasst text_typet method_typet function_typet*t/s//s**t%t+t-tnotteqtnetgttgteqtlttlteqcCs ||kS(N((tatb((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt2stincCs ||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.pyR7stNodeTypecBseZdZdZRS(sA metaclass for nodes that handles the field and attribute inheritance. fields and attributes from the parent class are automatically forwarded to the child.cCsxZdD]R}g}|jt|d|d|j|j|dt|||R0t RuntimeErrorR/(tnodetctx((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytget_eval_contextas   tNodecBseZdZdZdZeZdZdddZ dddZ dZ dZ dZ ed Zd Zd Zd ZejZd ZRS(sBaseclass 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|jrtdn|rt|t|jkr|js[td|jjntd|jjt|jt|jdkrdpdfnx3t|j|D]\}}t|||qWnx-|jD]"}t|||j |dqW|r,tdt t |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$    + c csx|jD]}||ko'dkns\|dk rD||ks\|dk r ||kr y|t||fVWqtk rqXq 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.pyt iter_fieldss ccsxxq|j||D]]\}}t|trYx?|D]}t|tr5|Vq5q5Wqt|tr|VqqWdS(sIterates 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_nodess 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.pytfindsccsQxJ|jD]<}t||r*|Vnx|j|D] }|Vq:Wq WdS(sFind 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.pyRXs cCsZt|g}xD|rU|j}d|jkr?||_n|j|jqW|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_ctxs   cCsrt|g}x\|rm|j}d|jkrW|jdksH|rW||_qWn|j|jqW|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_linenos  cCsHt|g}x2|rC|j}||_|j|jqW|S(s"Set the environment for all nodes.(RR]R0R!RW(R4R0R^R@((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytset_environments    cCs:t|t|ko9t|jt|jkS(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__scs0djjdjfdjDfS(Ns%s(%s)s, c3s+|]!}d|t|dfVqdS(s%s=%rN(R"R>(t.0RM(R4(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys s(RIRtjoinR(R4((R4s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt__repr__s ((slinenos environmentN(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.pyRlstHelpercBseZdZeZRS(s,Nodes that exist in a specific context only.(RRRRiR (((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRmstTemplatecBseZdZdZRS(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(sA 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(sA 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(sLike 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}+st FilterBlockcBseZdZdZRS(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.pyR7stIncludecBseZdZdZRS(s'A node that represents the include tag.Rst with_contexttignore_missing(stemplateRR(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.pyRAst 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.pyRFs tExprStmtcBseZdZdZRS(sAA statement that evaluates an expression and discards the result.R@(snode(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRTstAssigncBseZdZdZRS(s"Assigns an expression to a target.RuR@(stargetsnode(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRYstExprcBs)eZdZeZddZdZRS(sBaseclass for all expressions.cCs tdS(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_constbs cCstS(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>RR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR^s tBinExprcBs,eZdZdZdZeZddZRS(s%Baseclass for all binary expressions.tlefttrightcCst||}|jjr<|j|jjkr<tnt|j}y)||jj||j j|SWnt k rtnXdS(N( RBR0t sandboxedtoperatortintercepted_binopsRt_binop_to_funcRRRt Exception(R4Rtf((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRzs   ) (sleftsrightN( RRRRR>RRiR R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRts t UnaryExprcBs,eZdZdZdZeZddZRS(s$Baseclass for all unary expressions.R@cCst||}|jjr<|j|jjkr<tnt|j}y||jj|SWnt k rtnXdS(N( RBR0RRtintercepted_unopsRt _uaop_to_funcR@RR(R4RR((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs    (snodeN( RRRRR>RRiR R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs tNamecBseZdZdZdZRS(s Looks 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>(RRRsTruesFalsesNone(R*(R4((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs(snamesctx(RRRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstLiteralcBseZdZeZRS(sBaseclass for literals.(RRRRiR (((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstConstcBs5eZdZdZddZedddZRS(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.pyRscCs>ddlm}||s(tn||d|d|S(sReturn 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(tcompilerRR(R)RRDR0R((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytfrom_untrusteds  (svalueN(RRRRR>Rt classmethodR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs  t TemplateDatacBs eZdZdZddZRS(sA constant template string.tdatacCsAt||}|jr$tn|jr:t|jS|jS(N(RBR3RR2RR(R4R((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs     (sdataN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstTuplecBs)eZdZdZddZdZRS(sFor 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|tfd|jDS(Nc3s|]}|jVqdS(N(R(Rftx(R(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys s(RBR$R(R4R((Rs0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRscCs(x!|jD]}|js tSq WtS(N(RRR&Ri(R4RU((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs (sitemssctxN(RRRRR>RR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs tListcBs eZdZdZddZRS(s&Any list literal such as ``[1, 2, 3]``RcCs2t||}g|jD]}|j|^qS(N(RBRR(R4RR((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs(sitemsN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstDictcBs eZdZdZddZRS(seAny dict literal such as ``{1: 2, 3: 4}``. The items must be a list of :class:`Pair` nodes. Rcs,t|tfd|jDS(Nc3s|]}|jVqdS(N(R(RfR(R(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys s(RBtdictR(R4R((Rs0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs(sitemsN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstPaircBs eZdZdZddZRS(sA key, value pair for dicts.tkeyRcCs1t||}|jj||jj|fS(N(RBRRR(R4R((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs(skeysvalueN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstKeywordcBs eZdZdZddZRS(s>A key, value pair for keyword arguments where key is a string.RRcCs(t||}|j|jj|fS(N(RBRRR(R4R((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs(skeysvalueN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstCondExprcBs eZdZdZddZRS(sZA conditional expression (inline if expression). (``{{ foo if bar else baz }}``) Rwtexpr1texpr2cCs\t||}|jj|r1|jj|S|jdkrLtn|jj|S(N(RBRwRRRR>R(R4R((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs  (stestsexpr1sexpr2N(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyR stFiltercBs eZdZdZd dZRS( 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_kwargscst|js'|jdkr3tn|jjj|j}|dksit |dt rutn|jj }g|j D]}|j ^q}t |dt r|j dn(t |dt r|j d|jntfd|jD}|jdk rdy|j|jj Wqdtk r`tqdXn|jdk ry|j|jj Wqtk rtqXny||||SWntk rtnXdS(Nt contextfiltertevalcontextfilteritenvironmentfilterc3s|]}|jVqdS(N(R(RfR(R(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys 7s(RBR3R@R>RR0tfiltersR#R*R"R&RR{tinsertRRRR!RRR;(R4Rtfilter_tobjRR{R((Rs0/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.pyRstTestcBseZdZdZRS(sApplies 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{RRR(snodesnamesargsskwargssdyn_argss dyn_kwargs(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRHstCallcBs eZdZdZddZRS( 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{RRRcst|js$jjr0tn|jj}g|jD]}|j^qL}t|t rt |dt rtqt |dt r|j dqt |dt r|j d|jqnt fd|jD}|jdk rOy|j|jjWqOtk rKtqOXn|jdk ry|j|jjWqtk rtqXny|||SWntk rtnXdS(Ntcontextfunctiontevalcontextfunctionitenvironmentfunctionc3s|]}|jVqdS(N(R(RfR(R(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys hs(RBR3R0RRR@RR{RRt_context_function_typesR"R&RRRRR>R!RRR;(R4RRRR{R((Rs0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRXs6 %    (snodesargsskwargssdyn_argss dyn_kwargsN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyROstGetitemcBs)eZdZdZddZdZRS(s@Get an attribute or item from an expression and prefer the item.R@RMRAcCszt||}|jdkr*tny/|jj|jj||jj|SWntk rutnXdS(Ntload( RBRARR0tgetitemR@RRMR(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.pyRs(snodesargsctxN(RRRRR>RR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRys tGetattrcBs)eZdZdZddZdZRS(snGet an attribute or item from an expression that is a ascii-only bytestring and prefer the attribute. R@R-RAcCsq|jdkrtny5t||}|jj|jj||jSWntk rltnXdS(NR( RARRBR0R"R@RR-R(R4R((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs  cCstS(N(R&(R4((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs(snodesattrsctxN(RRRRR>RR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs tSlicecBs eZdZdZddZRS(s_Represents a slice object. This must only be used as argument for :class:`Subscript`. tstarttstoptstepcsIt|fd}t||j||j||jS(Ncs|dkrdS|jS(N(R>R(R(R(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pytconsts (RBtsliceRRR(R4RR((Rs0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs(sstartsstopsstepN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstConcatcBs eZdZdZddZRS(sXConcatenates the list of expressions provided after converting them to unicode. Rqcs/t|djfd|jDS(NRFc3s$|]}t|jVqdS(N(RR(RfR(R(s0/usr/lib/python2.7/site-packages/jinja2/nodes.pys s(RBRgRq(R4R((Rs0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs(snodesN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstComparecBs eZdZdZddZRS(siCompares an expression with some other expressions. `ops` must be a list of :class:`Operand`\s. texprtopscCst||}|jj|}}yFx?|jD]4}|jj|}t|j||}|}q2WWntk rtnX|S(N(RBRRRt_cmpop_to_functopRR(R4RRZRRt new_value((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRs  (sexprsopsN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstOperandcBseZdZdZRS(s$Holds an operator and an expression.RR(sopsexpr(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstMulcBseZdZdZRS(s(Multiplies the left with the right node.R(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstDivcBseZdZdZRS(s#Divides the left by the right node.R (RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstFloorDivcBseZdZdZRS(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.pyRstAddcBseZdZdZRS(sAdd the left to the right node.R (RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstSubcBseZdZdZRS(s'Substract the right from the left node.R (RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstModcBseZdZdZRS(sLeft modulo right.R (RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstPowcBseZdZdZRS(sLeft to the power of right.s**(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstAndcBs eZdZdZddZRS(sShort circuited AND.tandcCs1t||}|jj|o0|jj|S(N(RBRRR(R4R((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRsN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstOrcBs eZdZdZddZRS(sShort circuited OR.torcCs1t||}|jj|p0|jj|S(N(RBRRR(R4R((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRsN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstNotcBseZdZdZRS(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.pyRstPoscBseZdZdZRS(s8Make the expression positive (noop for most expressions)R (RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRstEnvironmentAttributecBseZdZdZRS(sLoads 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.pyRstExtensionAttributecBseZdZdZRS(sReturns 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*(Rsname(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.pyR0st InternalNamecBseZdZdZdZRS(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*cCstddS(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.pyR9stMarkSafecBs eZdZdZddZRS(s:Mark the wrapped expression as safe (wrap it as `Markup`).RcCs%t||}t|jj|S(N(RBRRR(R4R((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRKs(sexprN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRGstMarkSafeIfAutoescapecBs eZdZdZddZRS(sMark the wrapped expression as safe (wrap it as `Markup`) but only if autoescaping is active. .. versionadded:: 2.5 RcCsMt||}|jr$tn|jj|}|jrIt|S|S(N(RBR3RRRR2R(R4RR((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRXs    (sexprN(RRRRR>R(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRPstContextReferencecBseZdZRS(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.pyRbs tContinuecBseZdZRS(sContinue a loop.(RRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRostBreakcBseZdZRS(s Break a loop.(RRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRsstScopecBseZdZdZRS(sAn artificial scope.Ro(sbody(RRRR(((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyRwstEvalContextModifiercBseZdZdZRS(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(sModifies 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.pyRscOstddS(Nscan't create custom node types(RG(R{R((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyt _failing_news(jRRt collectionsRt jinja2.utilsRtjinja2._compatRRRRRRRtmulttruedivtfloordivtpowtmodtaddtsubRtnot_tpostnegRRRRtgeRtleRRRR'RRjR/RBRCRlRmRnRpRrRtRyRzR}RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRt staticmethodR((((s0/usr/lib/python2.7/site-packages/jinja2/nodes.pyts .                          ,*