Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/jinja2/__pycache__/nodes.cpython-37.pyc

306 lines
35 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
<00>/<2F>]<5D>x<00>
@svdZddlZddlZddlmZddlmZddlmZm Z m
Z
m Z ej ej fZejejejejejejejd<06>Zejejejd<07>Zejejejejejej dd <09>d
d <09>d <0B>Z!Gd d <0A>d e"<22>Z#Gdd<0F>de$<24>Z%Gdd<11>de&<26>Z'dd<13>Z(Gdd<15>de e%e&<26><02>Z)Gdd<17>de)<29>Z*Gdd<19>de)<29>Z+Gdd<1B>de)<29>Z,Gdd<1D>de*<2A>Z-Gdd<1F>de*<2A>Z.Gd d!<21>d!e*<2A>Z/Gd"d#<23>d#e*<2A>Z0Gd$d%<25>d%e*<2A>Z1Gd&d'<27>d'e*<2A>Z2Gd(d)<29>d)e*<2A>Z3Gd*d+<2B>d+e*<2A>Z4Gd,d-<2D>d-e*<2A>Z5Gd.d/<2F>d/e*<2A>Z6Gd0d1<64>d1e*<2A>Z7Gd2d3<64>d3e*<2A>Z8Gd4d5<64>d5e*<2A>Z9Gd6d7<64>d7e*<2A>Z:Gd8d9<64>d9e*<2A>Z;Gd:d;<3B>d;e)<29>Z<Gd<d=<3D>d=e<<3C>Z=Gd>d?<3F>d?e<<3C>Z>Gd@dA<64>dAe<<3C>Z?GdBdC<64>dCe<<3C>Z@GdDdE<64>dEe<<3C>ZAGdFdG<64>dGeA<65>ZBGdHdI<64>dIeA<65>ZCGdJdK<64>dKeA<65>ZDGdLdM<64>dMeA<65>ZEGdNdO<64>dOeA<65>ZFGdPdQ<64>dQe+<2B>ZGGdRdS<64>dSe+<2B>ZHGdTdU<64>dUe<<3C>ZIdVdW<64>ZJGdXdY<64>dYe<<3C>ZKGdZd[<5B>d[e<<3C>ZLGd\d]<5D>d]e<<3C>ZMGd^d_<64>d_e<<3C>ZNGd`da<64>dae<<3C>ZOGdbdc<64>dce<<3C>ZPGddde<64>dee<<3C>ZQGdfdg<64>dge<<3C>ZRGdhdi<64>die+<2B>ZSeSjdjdk<64>TeUdldm<64>eVe<16>eVe<1A>BeVe!<21>BD<00><01><01>7_Gdndo<64>doe=<3D>ZWGdpdq<64>dqe=<3D>ZXGdrds<64>dse=<3D>ZYGdtdu<64>due=<3D>ZZGdvdw<64>dwe=<3D>Z[Gdxdy<64>dye=<3D>Z\Gdzd{<7B>d{e=<3D>Z]Gd|d}<7D>d}e=<3D>Z^Gd~d<64>de=<3D>Z_Gd<>d<EFBFBD><64>d<>e><3E>Z`Gd<>d<EFBFBD><64>d<>e><3E>ZaGd<>d<EFBFBD><64>d<>e><3E>ZbGd<>d<EFBFBD><64>d<>e<<3C>ZcGd<>d<EFBFBD><64>d<>e<<3C>ZdGd<>d<EFBFBD><64>d<>e<<3C>ZeGd<>d<EFBFBD><64>d<>e<<3C>ZfGd<>d<EFBFBD><64>d<>e<<3C>ZgGd<>d<EFBFBD><64>d<>e<<3C>ZhGd<>d<EFBFBD><64>d<>e<<3C>ZiGd<>d<EFBFBD><64>d<>e*<2A>ZjGd<>d<EFBFBD><64>d<>e*<2A>ZkGd<>d<EFBFBD><64>d<>e*<2A>ZlGd<>d<EFBFBD><64>d<>e*<2A>ZmGd<>d<EFBFBD><64>d<>e*<2A>ZnGd<>d<EFBFBD><64>d<>en<65>Zod<6F>d<EFBFBD><64>Zpeqep<65>e%_r[pdS)<29>a}
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) 2017 by the Jinja Team.
:license: BSD, see LICENSE for more details.
<EFBFBD>N)<01>deque)<01>Markup)<04>izip<69>with_metaclass<73> text_type<70>PY2)<07>*<2A>/z//z**<2A>%<25>+<2B>-)<03>notr r cCs||kS)N<>)<02>a<>brr<00>0/tmp/pip-install-c3kgu56x/Jinja2/jinja2/nodes.py<70><lambda>2<00>rcCs||kS)Nr)rrrrrr3r)<08>eq<65>ne<6E>gtZgteq<65>ltZlteq<65>in<69>notinc@seZdZdZdS)<03>
Impossiblez8Raised if the node could not perform a requested action.N)<04>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rrrrr7src@seZdZdZdd<03>ZdS)<05>NodeTypez<65>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<>xtdD]l}g}|<05>t|d|d<03><03>|<05>|<03>|d<03><02>t|<02>dksJtd<05><01>t|<05>tt|<05><01>ksftd<06><01>t|<05>||<qW|<03>dd<08>t<08> ||||<03>S) N)<02>fields<64>
attributesrr<00>z multiple inheritance not allowedzlayout conflict<63>abstractF)
<EFBFBD>extend<6E>getattr<74>get<65>len<65>AssertionError<6F>set<65>tuple<6C>
setdefault<EFBFBD>type<70>__new__)<06>cls<6C>name<6D>bases<65>d<>attrZstoragerrrr-@s
 zNodeType.__new__N)rrrrr-rrrrr;src@s*eZdZdZd dd<04>Zdd<06>Zdd<08>ZdS)
<EFBFBD> EvalContextzcHolds evaluation time information. Custom attributes can be attached
to it in extensions.
NcCs0||_t|j<02>r|<01>|<02>|_n|j|_d|_dS)NF)<04> environment<6E>callable<6C>
autoescape<EFBFBD>volatile)<03>selfr4Z template_namerrr<00>__init__Qs

zEvalContext.__init__cCs
|j<00><01>S)N)<02>__dict__<5F>copy)r8rrr<00>saveYszEvalContext.savecCs|j<00><01>|j<00>|<01>dS)N)r:<00>clear<61>update)r8<00>oldrrr<00>revert\s
zEvalContext.revert)N)rrrrr9r<r@rrrrr3Ls
r3cCs(|dkr$|jdkrtd<01><01>t|j<00>S|S)NzIif no eval context is passed, the node must have an attached environment.)r4<00> RuntimeErrorr3)<02>node<64>ctxrrr<00>get_eval_contextas


rDc@s<>eZdZdZdZdZdZdd<06>Zddd <09>Zd d
d <0B>Z d d <0A>Z
dd<0F>Z dd<11>Z d!dd<14>Z dd<16>Zdd<18>Zdd<1A>ZejZdd<1C>Zdd<1E>ZdS)"<22>Nodea<65>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.
r)<02>linenor4TcOs<>|jrtd<01><01>|r<>t|<01>t|j<03>krh|js:td|jj<00><01>td|jjt|j<03>t|j<03>dkr^dp`df<00><01>x$t|j|<01>D]\}}t|||<04>qvWx"|jD]}t|||<02> |d<00><02>q<>W|r<>tdt
t |<02><01><00><01>dS)Nz#abstract nodes are not instanciablez%r takes 0 argumentsz%r takes 0 or %d argument%sr"<00>s<>zunknown attribute %r) r#<00> TypeErrorr'r <00> __class__rr<00>setattrr!<00>pop<6F>next<78>iter)r8r r!r/<00>argr2rrrr9s$  z Node.__init__Nc cstxn|jD]d}||kr dksBn|dk r2||ksB|dk r||kry|t||<03>fVWqtk
rjYqXqWdS)aZThis 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)r r%<00>AttributeError)r8<00>exclude<64>onlyr/rrr<00> iter_fields<64>s zNode.iter_fieldsccsXxR|<00>||<02>D]B\}}t|t<02>r@x.|D]}t|t<03>r&|Vq&Wqt|t<03>r|VqWdS)z<>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)rS<00>
isinstance<EFBFBD>listrE)r8rQrR<00>field<6C>item<65>nrrr<00>iter_child_nodes<65>s


 
zNode.iter_child_nodescCsx|<00>|<01>D]}|SWdS)ziFind the first node of a given type. If no such node exists the
return value is `None`.
N)<01>find_all)r8<00> node_type<70>resultrrr<00>find<6E>sz Node.findccs@x:|<00><00>D].}t||<01>r|Vx|<02>|<01>D]
}|Vq*Wq
WdS)z<>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)r8r[<00>childr\rrrrZ<00>s

z Node.find_allcCs>t|g<01>}x.|r8|<02><01>}d|jkr(||_|<02>|<03><05><00>q W|S)aReset 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.
rC)r<00>popleftr rCr$rY)r8rC<00>todorBrrr<00>set_ctx<74>s

z Node.set_ctxFcCsLt|g<01>}x<|rF|<03><01>}d|jkr6|jdks0|r6||_|<03>|<04><05><00>q W|S)z.Set the line numbers of the node and children.rFN)rr_r!rFr$rY)r8rF<00>overrider`rBrrr<00>
set_lineno<EFBFBD>s

zNode.set_linenocCs4t|g<01>}x$|r.|<02><01>}||_|<02>|<03><04><00>q W|S)z"Set the environment for all nodes.)rr_r4r$rY)r8r4r`rBrrr<00>set_environment<6E>s 
zNode.set_environmentcCs(t|<00>t|<01>ko&t|<00><02><00>t|<01><02><00>kS)N)r,r*rS)r8<00>otherrrr<00>__eq__<5F>sz Node.__eq__cCs |<00>|<01> S)N)rf)r8rerrr<00>__ne__<5F>sz Node.__ne__cs&d<01>jjd<02><02>fdd<04><08>jD<00><01>fS)Nz%s(%s)z, c3s"|]}d|t<00>|d<01>fVqdS)z%s=%rN)r%)<02>.0rO)r8rr<00> <genexpr><3E>sz Node.__repr__.<locals>.<genexpr>)rJr<00>joinr )r8r)r8r<00>__repr__<5F>sz Node.__repr__cs$<00><00>fdd<02><08>g<00><01>|<00>d<03><00><01>S)Ncs<>t|t<01>s<1C><01>t|<00><01>dS<00><01>d|jj<00>|jsB<73><01>d<02>dSx<>t|j<06>D]t\}}|rd<72><01>d<03>t||<02>}t|t <09>r<><72><01>d<04>x*t|<03>D]\}}|r<><72><01>d<03><00>|<04>q<>W<00><01>d<05>qN<71>|<03>qNW<00><01>d<02>dS)Nz nodes.%s(<28>)z, <20>[<5B>])
rTrE<00>append<6E>reprrJrr <00> enumerater%rU)rB<00>idxrV<00>valuerW)<02>_dump<6D>bufrrrt<00>s(






   zNode.dump.<locals>._dumprH)rj)r8r)rtrur<00>dump<6D>sz Node.dump)NN)NN)F)rrrrr r!r#r9rSrYr]rZrarcrdrfrg<00>object<63>__hash__rkrvrrrrrEks"



 rEc@seZdZdZdZdS)<04>StmtzBase node for all statements.TN)rrrrr#rrrrrysryc@seZdZdZdZdS)<04>Helperz,Nodes that exist in a specific context only.TN)rrrrr#rrrrrzsrzc@seZdZdZdZdS)<04>TemplatezjNode that represents a template. This must be the outermost node that
is passed to the compiler.
)<01>bodyN)rrrrr rrrrr{sr{c@seZdZdZdZdS)<04>Outputz<74>A node that holds multiple expressions which are then printed out.
This is used both for the `print` statement and the regular template data.
)<01>nodesN)rrrrr rrrrr}$sr}c@seZdZdZdZdS)<04>Extendsz Represents an extends statement.)<01>templateN)rrrrr rrrrr+src@seZdZdZdZdS)<04>ForaxThe 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`.
)<06>targetrNr|<00>else_<65>test<73> recursiveN)rrrrr rrrrr<>0sr<>c@seZdZdZdZdS)<04>Ifz4If `test` is true, `body` is rendered, else `else_`.)r<>r|Zelif_r<5F>N)rrrrr rrrrr<>;sr<>c@seZdZdZdZdS)<04>Macroz<6F>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/<00>args<67>defaultsr|N)rrrrr rrrrr<>@sr<>c@seZdZdZdZdS)<04> CallBlockz<6B>Like a macro without a name but a call instead. `call` is called with
the unnamed macro as `caller` argument this node holds.
)<04>callr<6C>r<>r|N)rrrrr rrrrr<>Hsr<>c@seZdZdZdZdS)<04> FilterBlockzNode for filter sections.)r|<00>filterN)rrrrr rrrrr<>Osr<>c@seZdZdZdZdS)<04>Withz<68>Specific node for with statements. In older versions of Jinja the
with statement was implemented on the base of the `Scope` node instead.
.. versionadded:: 2.9.3
)<03>targets<74>valuesr|N)rrrrr rrrrr<>Tsr<>c@seZdZdZdZdS)<04>BlockzA node that represents a block.)r/r|<00>scopedN)rrrrr rrrrr<>]sr<>c@seZdZdZdZdS)<04>Includez'A node that represents the include tag.)r<><00> with_contextZignore_missingN)rrrrr rrrrr<>bsr<>c@seZdZdZdZdS)<04>Importz&A node that represents the import tag.)r<>r<>r<>N)rrrrr rrrrr<>gsr<>c@seZdZdZdZdS)<04>
FromImportaA 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.
)r<><00>namesr<73>N)rrrrr rrrrr<>ls
r<>c@seZdZdZdZdS)<04>ExprStmtzAA statement that evaluates an expression and discards the result.)rBN)rrrrr rrrrr<>zsr<>c@seZdZdZdZdS)<04>Assignz"Assigns an expression to a target.)r<>rBN)rrrrr rrrrr<>sr<>c@seZdZdZdZdS)<04> AssignBlockzAssigns a block to a target.)r<>r<>r|N)rrrrr rrrrr<><00>sr<>c@s&eZdZdZdZddd<05>Zdd<07>ZdS) <09>ExprzBaseclass for all expressions.TNcCs
t<00><00>dS)anReturn 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)r8<00>eval_ctxrrr<00>as_const<73>s z Expr.as_constcCsdS)z8Check if it's possible to assign something to this node.Fr)r8rrr<00>
can_assign<EFBFBD>szExpr.can_assign)N)rrrrr#r<>r<>rrrrr<><00>s
r<>c@s&eZdZdZdZdZdZddd<06>ZdS)<08>BinExprz%Baseclass for all binary expressions.)<02>left<66>rightNTcCsjt||<01>}|jjr&|j|jjkr&t<05><00>t|j}y||j<07>|<01>|j <09>|<01><01>St
k
rdt<05><00>YnXdS)N) rDr4<00> sandboxed<65>operatorZintercepted_binopsr<00>_binop_to_funcr<63>r<>r<><00> Exception)r8r<><00>frrrr<><00>s

zBinExpr.as_const)N)rrrrr r<>r#r<>rrrrr<><00>s
r<>c@s&eZdZdZdZdZdZddd<06>ZdS)<08> UnaryExprz$Baseclass for all unary expressions.)rBNTcCs`t||<01>}|jjr&|j|jjkr&t<05><00>t|j}y||j<07>|<01><01>St k
rZt<05><00>YnXdS)N)
rDr4r<>r<>Zintercepted_unopsr<00> _uaop_to_funcrBr<>r<>)r8r<>r<>rrrr<><00>s

zUnaryExpr.as_const)N)rrrrr r<>r#r<>rrrrr<><00>s
r<>c@seZdZdZdZdd<04>ZdS)<06>Namea 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/rCcCs
|jdkS)N)<06>true<75>false<73>none<6E>True<75>False<73>None)r/)r8rrrr<><00>szName.can_assignN)rrrrr r<>rrrrr<><00>sr<>c@seZdZdZdZdd<04>ZdS)<06>NSRefz)Reference to a namespace value assignment)r/r2cCsdS)NTr)r8rrrr<><00>szNSRef.can_assignN)rrrrr r<>rrrrr<><00>sr<>c@seZdZdZdZdS)<04>LiteralzBaseclass for literals.TN)rrrrr#rrrrr<><00>sr<>c@s,eZdZdZdZddd<05>Zed dd<07><01>ZdS)
<EFBFBD>ConstaAll 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).
)rsNcCsJ|j}trFt|<02>tkrF|jjdrFy|<02>d<02>}Wntk
rDYnX|S)Nzcompiler.ascii_str<74>ascii)rsrr,rr4Zpolicies<65>encode<64> UnicodeError)r8r<><00>rvrrrr<><00>s zConst.as_constcCs(ddlm}||<01>st<02><00>||||d<03>S)z<>Return a const object if the value is representable as
constant value in the generated code, otherwise it will raise
an `Impossible` exception.
r")<01> has_safe_repr)rFr4)<03>compilerr<72>r)r.rsrFr4r<>rrr<00>from_untrusted<65>s zConst.from_untrusted)N)NN)rrrrr r<><00> classmethodr<64>rrrrr<><00>s

r<>c@seZdZdZdZddd<05>ZdS)<07> TemplateDatazA constant template string.)<01>dataNcCs,t||<01>}|jrt<02><00>|jr&t|j<05>S|jS)N)rDr7rr6rr<>)r8r<>rrrr<>s 

zTemplateData.as_const)N)rrrrr r<>rrrrr<>sr<>c@s&eZdZdZdZddd<05>Zdd<07>ZdS) <09>Tuplez<65>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.
)<02>itemsrCNcs"t|<00><00><02>t<01>fdd<02>|jD<00><01>S)Nc3s|]}|<01><00><00>VqdS)N)r<>)rh<00>x)r<>rrrisz!Tuple.as_const.<locals>.<genexpr>)rDr*r<>)r8r<>r)r<>rr<>s
zTuple.as_constcCs x|jD]}|<01><01>sdSqWdS)NFT)r<>r<>)r8rWrrrr<>s zTuple.can_assign)N)rrrrr r<>r<>rrrrr<>s
r<>c@seZdZdZdZddd<05>ZdS)<07>Listz&Any list literal such as ``[1, 2, 3]``)r<>Ncst|<00><00><02><00>fdd<02>|jD<00>S)Ncsg|]}|<01><00><00><01>qSr)r<>)rhr<>)r<>rr<00>
<listcomp>(sz!List.as_const.<locals>.<listcomp>)rDr<>)r8r<>r)r<>rr<>&s
z List.as_const)N)rrrrr r<>rrrrr<>"sr<>c@seZdZdZdZddd<05>ZdS)<07>DictzeAny dict literal such as ``{1: 2, 3: 4}``. The items must be a list of
:class:`Pair` nodes.
)r<>Ncs"t|<00><00><02>t<01>fdd<02>|jD<00><01>S)Nc3s|]}|<01><00><00>VqdS)N)r<>)rhr<>)r<>rrri3sz Dict.as_const.<locals>.<genexpr>)rD<00>dictr<74>)r8r<>r)r<>rr<>1s
z Dict.as_const)N)rrrrr r<>rrrrr<>+sr<>c@seZdZdZdZddd<05>ZdS)<07>PairzA key, value pair for dicts.)<02>keyrsNcCs"t||<01>}|j<01>|<01>|j<03>|<01>fS)N)rDr<>r<>rs)r8r<>rrrr<>:s
z Pair.as_const)N)rrrrr r<>rrrrr<>6sr<>c@seZdZdZdZddd<05>ZdS)<07>Keywordz>A key, value pair for keyword arguments where key is a string.)r<>rsNcCst||<01>}|j|j<02>|<01>fS)N)rDr<>rsr<>)r8r<>rrrr<>Cs
zKeyword.as_const)N)rrrrr r<>rrrrr<>?sr<>c@seZdZdZdZddd<05>ZdS)<07>CondExprzZA conditional expression (inline if expression). (``{{
foo if bar else baz }}``)
)r<><00>expr1<72>expr2NcCs>t||<01>}|j<01>|<01>r"|j<03>|<01>S|jdkr2t<05><00>|j<04>|<01>S)N)rDr<>r<>r<>r<>r)r8r<>rrrr<>Ns 
  
zCondExpr.as_const)N)rrrrr r<>rrrrr<>Hsr<>cs<><00>fdd<02>|jD<00>}t<01>fdd<04>|jD<00><01>}|jdk rhy|<02>|j<03><05><00><01>Wntk
rft<07><00>YnX|jdk r<>y|<03> |j<08><05><00><01>Wntk
r<EFBFBD>t<07><00>YnX||fS)Ncsg|]}|<01><00><00><01>qSr)r<>)rhr<>)r<>rrr<>[sz!args_as_const.<locals>.<listcomp>c3s|]}|<01><00><00>VqdS)N)r<>)rhr<>)r<>rrri\sz args_as_const.<locals>.<genexpr>)
r<EFBFBD>r<><00>kwargs<67>dyn_argsr$r<>r<>r<00>
dyn_kwargsr>)rBr<>r<>r<>r)r<>r<00> args_as_constZs
 
 r<>c@seZdZdZdZddd<05>ZdS)<07>FilteraThis 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.
)rBr/r<>r<>r<>r<>NcCs<>t||<01>}|js|jdkr t<03><00>|jj<05>|j<07>}|dksDt|dd<02>rJt<03><00>|jj rdt|dd<02>rdt<03><00>t
||<01>\}}|<03> d|j<02> |<01><01>t|dd<02>r<>|<03> d|<01>nt|dd<02>r<>|<03> d|j<04>y
|||<04>St k
r<EFBFBD>t<03><00>YnXdS)NZ contextfilterFZasyncfiltervariantrZevalcontextfilterZenvironmentfilter)rDr7rBrr4<00>filtersr&r/r%Zis_asyncr<63><00>insertr<74>r<>)r8r<>Zfilter_r<5F>r<>rrrr<>ws&
   
zFilter.as_const)N)rrrrr r<>rrrrr<>msr<>c@seZdZdZdZddd<05>ZdS)<07>Testz<74>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`.
)rBr/r<>r<>r<>r<>NcCst|jj<01>|j<03>}|dkrt<04><00>t||<01>}t||<01>\}}|<03>d|j<08> |<01><01>y
|||<04>St
k
rnt<04><00>YnXdS)Nr) r4<00>testsr&r/rrDr<>r<>rBr<>r<>)r8r<>r<>r<>r<>rrrr<><00>s

z Test.as_const)N)rrrrr r<>rrrrr<><00>sr<>c@seZdZdZdZdS)<04>Calla/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.
)rBr<>r<>r<>r<>N)rrrrr rrrrr<><00>sr<>c@s&eZdZdZdZddd<05>Zdd<07>ZdS) <09>Getitemz@Get an attribute or item from an expression and prefer the item.)rBrOrCNcCsXt||<01>}|jdkrt<02><00>y|j<03>|j<05>|<01>|j<07>|<01><01>Stk
rRt<02><00>YnXdS)N<>load) rDrCrr4<00>getitemrBr<>rOr<>)r8r<>rrrr<><00>s

zGetitem.as_constcCsdS)NFr)r8rrrr<><00>szGetitem.can_assign)N)rrrrr r<>r<>rrrrr<><00>s
r<EFBFBD>c@s&eZdZdZdZddd<05>Zdd<07>ZdS) <09>GetattrznGet an attribute or item from an expression that is a ascii-only
bytestring and prefer the attribute.
)rBr2rCNcCsR|jdkrt<01><00>y"t||<01>}|j<03>|j<05>|<01>|j<07>Stk
rLt<01><00>YnXdS)Nr<4E>) rCrrDr4r%rBr<>r2r<>)r8r<>rrrr<><00>s

zGetattr.as_constcCsdS)NFr)r8rrrr<><00>szGetattr.can_assign)N)rrrrr r<>r<>rrrrr<><00>s
r<EFBFBD>c@seZdZdZdZddd<05>ZdS)<07>Slicez_Represents a slice object. This must only be used as argument for
:class:`Subscript`.
)<03>start<72>stop<6F>stepNcs4t|<00><00><02><00>fdd<02>}t||j<02>||j<03>||j<04><01>S)Ncs|dkr dS|<00><00><00>S)N)r<>)<01>obj)r<>rr<00>const<73>szSlice.as_const.<locals>.const)rD<00>slicer<65>r<>r<>)r8r<>r<>r)r<>rr<><00>s
 zSlice.as_const)N)rrrrr r<>rrrrr<><00>sr<>c@seZdZdZdZddd<05>ZdS)<07>ConcatzXConcatenates the list of expressions provided after converting them to
unicode.
)r~Ncs$t|<00><00><02>d<01><01>fdd<03>|jD<00><01>S)NrHc3s|]}t|<01><01><00><01>VqdS)N)rr<>)rhr<>)r<>rrri<00>sz"Concat.as_const.<locals>.<genexpr>)rDrjr~)r8r<>r)r<>rr<><00>s
zConcat.as_const)N)rrrrr r<>rrrrr<><00>sr<>c@seZdZdZdZddd<05>ZdS)<07>CompareziCompares an expression with some other expressions. `ops` must be a
list of :class:`Operand`\s.
)<02>expr<70>opsNcCsnt||<01>}|j<01>|<01>}}y4x.|jD]$}|j<01>|<01>}t|j||<05>}|}q$WWntk
rht<07><00>YnX|S)N)rDr<>r<>r<><00>_cmpop_to_func<6E>opr<70>r)r8r<>r\rsr<>Z new_valuerrrr<>s
    zCompare.as_const)N)rrrrr r<>rrrrr<><00>sr<>c@seZdZdZdZdS)<04>Operandz$Holds an operator and an expression.)r<>r<>N)rrrrr rrrrr<>sr<>z(
The following operators are available: z, ccs|]}d|VqdS)z``%s``Nr)rhr<>rrrrisric@seZdZdZdZdS)<04>Mulz(Multiplies the left with the right node.rN)rrrrr<>rrrrr<>sr<>c@seZdZdZdZdS)<04>Divz#Divides the left by the right node.r N)rrrrr<>rrrrr<> sr<>c@seZdZdZdZdS)<04>FloorDivzjDivides the left by the right node and truncates conver the
result into an integer by truncating.
z//N)rrrrr<>rrrrr<>%sr<>c@seZdZdZdZdS)<04>AddzAdd the left to the right node.r N)rrrrr<>rrrrr<>,sr<>c@seZdZdZdZdS)<04>Subz&Subtract the right from the left node.r N)rrrrr<>rrrrr<>1sr<>c@seZdZdZdZdS)<04>ModzLeft modulo right.r
N)rrrrr<>rrrrr<>6sr<>c@seZdZdZdZdS)<04>PowzLeft to the power of right.z**N)rrrrr<>rrrrr<>;sr<>c@seZdZdZdZddd<05>ZdS)<07>AndzShort circuited AND.<2E>andNcCs"t||<01>}|j<01>|<01>o |j<03>|<01>S)N)rDr<>r<>r<>)r8r<>rrrr<>Ds
z And.as_const)N)rrrrr<>r<>rrrrr<>@sr<>c@seZdZdZdZddd<05>ZdS)<07>OrzShort circuited OR.<2E>orNcCs"t||<01>}|j<01>|<01>p |j<03>|<01>S)N)rDr<>r<>r<>)r8r<>rrrr<>Ms
z Or.as_const)N)rrrrr<>r<>rrrrr<>Isr<>c@seZdZdZdZdS)<04>NotzNegate the expression.r N)rrrrr<>rrrrr<>Rsr<>c@seZdZdZdZdS)<04>NegzMake the expression negative.r N)rrrrr<>rrrrr<>Wsr<>c@seZdZdZdZdS)<04>Posz8Make the expression positive (noop for most expressions)r N)rrrrr<>rrrrr<>\sr<>c@seZdZdZdZdS)<04>EnvironmentAttributez<65>Loads an attribute from the environment object. This is useful for
extensions that want to call a callback stored on the environment.
)r/N)rrrrr rrrrr<>dsr<>c@seZdZdZdZdS)<04>ExtensionAttributez<65>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.
)<02>
identifierr/N)rrrrr rrrrr<>ksr<>c@seZdZdZdZdS)<04> ImportedNamea&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.
)Z
importnameN)rrrrr rrrrr<>usr<>c@seZdZdZdZdd<04>ZdS)<06> InternalNamea7An 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/cCs td<01><01>dS)NzKCan't create internal names. Use the `free_identifier` method on a parser.)rI)r8rrrr9<00>szInternalName.__init__N)rrrrr r9rrrrr<>~sr<>c@seZdZdZdZddd<05>ZdS)<07>MarkSafez:Mark the wrapped expression as safe (wrap it as `Markup`).)r<>NcCst||<01>}t|j<02>|<01><01>S)N)rDrr<>r<>)r8r<>rrrr<><00>s
zMarkSafe.as_const)N)rrrrr r<>rrrrr<><00>sr<>c@seZdZdZdZddd<05>ZdS)<07>MarkSafeIfAutoescapez<65>Mark the wrapped expression as safe (wrap it as `Markup`) but
only if autoescaping is active.
.. versionadded:: 2.5
)r<>NcCs4t||<01>}|jrt<02><00>|j<03>|<01>}|jr0t|<02>S|S)N)rDr7rr<>r<>r6r)r8r<>r<>rrrr<><00>s
 zMarkSafeIfAutoescape.as_const)N)rrrrr r<>rrrrr<><00>sr<>c@seZdZdZdS)<03>ContextReferencearReturns 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'))
N)rrrrrrrrr<><00>s
r<EFBFBD>c@seZdZdZdS)<03>ContinuezContinue a loop.N)rrrrrrrrr<><00>sr<>c@seZdZdZdS)<03>Breakz Break a loop.N)rrrrrrrrr<><00>sr<>c@seZdZdZdZdS)<04>ScopezAn artificial scope.)r|N)rrrrr rrrrr<><00>sr<>c@seZdZdZdZdS)<04> OverlayScopea<65>An overlay scope for extensions. This is a largely unoptimized scope
that however can be used to introduce completely arbitrary variables into
a sub scope from a dictionary or dictionary like object. The `context`
field has to evaluate to a dictionary object.
Example usage::
OverlayScope(context=self.call_method('get_context'),
body=[...])
.. versionadded:: 2.10
)<02>contextr|N)rrrrr rrrrr<><00>s r<>c@seZdZdZdZdS)<04>EvalContextModifiera
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))])
)<01>optionsN)rrrrr rrrrr<00>src@seZdZdZdZdS)<04>ScopedEvalContextModifierz<72>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`.
)r|N)rrrrr rrrrr<00>srcOs td<01><01>dS)Nzcan't create custom node types)rI)r<>r<>rrr<00> _failing_new<65>sr)sr<00>typesr<73><00> collectionsrZ jinja2.utilsrZjinja2._compatrrrr<00> FunctionType<70>
MethodTypeZ_context_function_types<65>mul<75>truediv<69>floordiv<69>pow<6F>mod<6F>add<64>subr<62><00>not_<74>pos<6F>negr<67>rrr<00>ger<00>ler<65>r<>rr,rrwr3rDrEryrzr{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<>r<>r<>r<>r<>r<>r<>r<>r<>rj<00>sortedr)r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>rrr<00> staticmethodr-rrrr<00><module>s<>   

 
)        0
  &