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

267 lines
25 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
<00>/<2F>]#<23><00> @s<>dZddlmZddlmZmZddlmZmZddl m
Z
e dddd d
d d d ddddg <0C>Z e ddddddg<06>Z ejejejejejejd<18>ZGdd<1A>de<15>ZdS)z<>
jinja2.parser
~~~~~~~~~~~~~
Implements the template parser.
:copyright: (c) 2017 by the Jinja Team.
:license: BSD, see LICENSE for more details.
<EFBFBD>)<01>nodes)<02>TemplateSyntaxError<6F>TemplateAssertionError)<02>describe_token<65>describe_token_expr)<01>imap<61>for<6F>if<69>blockZextends<64>print<6E>macro<72>include<64>from<6F>import<72>set<65>with<74>
autoescape<EFBFBD>eq<65>ne<6E>ltZlteq<65>gtZgteq)<06>add<64>sub<75>mul<75>div<69>floordiv<69>modc@s<>eZdZdZdidd<04>Zdefdd<06>Zdd<08>Zdjd d
<EFBFBD>Zdkd d <0C>Z dld d<0E>Z
dmdd<10>Z dd<12>Z dndd<15>Z dd<17>Zdd<19>Zdd<1B>Zdd<1D>Zdd<1F>Zd d!<21>Zd"d#<23>Zd$d%<25>Zd&d'<27>Zd(d)<29>Zd*d+<2B>Zd,d-<2D>Zd.d/<2F>Zd0d1<64>Zd2d3<64>Zd4d5<64>Zdod7d8<64>Zdpd9d:<3A>Zd;d<<3C>Z d=d><3E>Z!d?d@<40>Z"dAdB<64>Z#dCdD<64>Z$dEdF<64>Z%dGdH<64>Z&dIdJ<64>Z'dKdL<64>Z(dqdMdN<64>Z)dOdP<64>Z*drdQdR<64>Z+dSdT<64>Z,dUdV<64>Z-dWdX<64>Z.dYdZ<64>Z/d[d\<5C>Z0d]d^<5E>Z1d_d`<60>Z2dsdadb<64>Z3dcdd<64>Z4dtdedf<64>Z5dgdh<64>Z6dS)u<>Parserz<72>This is the central parsing class Jinja2 uses. It's passed to
extensions and can be used to parse expressions or statements.
NcCst||_|<01>||||<05>|_||_||_d|_i|_x,|<01><07>D] }x|jD]}|j |j|<qFWq:Wd|_
g|_ g|_ dS)NFr) <0A> environment<6E> _tokenize<7A>stream<61>name<6D>filename<6D>closed<65>
extensionsZiter_extensions<6E>tags<67>parse<73>_last_identifier<65>
_tag_stack<EFBFBD>_end_token_stack)<08>selfr<00>sourcer!r"<00>state<74> extension<6F>tag<61>r/<00>1/tmp/pip-install-c3kgu56x/Jinja2/jinja2/parser.py<70>__init__%s zParser.__init__cCs(|dkr|jjj}||||j|j<04><04>dS)z<>Convenience method that raises `exc` with the message, passed
line number or last line number as well as the current name and
filename.
N)r <00>current<6E>linenor!r")r*<00>msgr3<00>excr/r/r0<00>fail4s
z Parser.failcCs<>g}x|D]}|<04>tt|<05><02>q
W|r@d<01>dd<03>|dD<00><01>}nd}|dkrTdg}n
d|g}|r<>|dk r<>||kr<>|<07>d|<00>n|<07>d|<00>|jr<>|<07>d |jd<00>|<00>d
<EFBFBD>|<07>|<03>dS) Nz or css|]}dt|<01>VqdS)z'%s'N)r)<02>.0<EFBFBD>exprr/r/r0<00> <genexpr>Csz&Parser._fail_ut_eof.<locals>.<genexpr><3E><><EFBFBD><EFBFBD><EFBFBD>zUnexpected end of template.zEncountered unknown tag '%s'.z_You probably made a nesting mistake. Jinja is expecting this tag, but currently looking for %s.z-Jinja was looking for the following tags: %s.z4The innermost block that needs to be closed is '%s'.<2E> )<07>extendrr<00>join<69>appendr(r6)r*r!Zend_token_stackr3<00>expected<65>exprsZcurrently_looking<6E>messager/r/r0<00> _fail_ut_eof=s*


zParser._fail_ut_eofcCs|<00>||j|<02>S)z<>Called if the parser encounters an unknown tag. Tries to fail
with a human readable error message that could help to identify
the problem.
)rBr))r*r!r3r/r/r0<00>fail_unknown_tag\szParser.fail_unknown_tagcCs*t|j<01>}|dk r|<03>|<01>|<00>d||<02>S)z9Like fail_unknown_tag but for end of template situations.N)<04>listr)r>rB)r*<00>
end_tokensr3<00>stackr/r/r0<00>fail_eofcs

zParser.fail_eofcCs,|jjjdkrdS|dk r(|jj<01>|<01>SdS)zAre we at the end of a tuple?)<03> variable_end<6E> block_end<6E>rparenTNF)r r2<00>type<70>test_any)r*<00>extra_end_rulesr/r/r0<00> is_tuple_endjs
zParser.is_tuple_endcCs6|jd7_t<01>tj<04>}tjj|d|j|d<03>|S)zDReturn a new free identifier as :class:`~jinja2.nodes.InternalName`.<2E>zfi%d)r3)r'<00>object<63>__new__rZ InternalName<6D>Noder1)r*r3<00>rvr/r/r0<00>free_identifierrs zParser.free_identifiercCs<>|jj}|jdkr |<00>d|j<04>|j<05>|j<07>d}z<>|jtkrTt |d|jjj<00><02>S|jdkrf|<00>
<EFBFBD>S|jdkrx|<00> <0B>S|j <0C> |j<07>}|dk r<>||<00>S|j<05><0E>d}|<00>|j|j<04>Wd|r<>|j<05><0E>XdS) zParse a single statement.r!ztag name expectedTZparse_<65>call<6C>filterNF)r r2rKr6r3r(r><00>value<75>_statement_keywords<64>getattr<74>parse_call_block<63>parse_filter_blockr$<00>get<65>poprC)r*<00>tokenZpop_tag<61>extr/r/r0<00>parse_statementys(




zParser.parse_statementFcCsL|j<00>d<01>|j<00>d<02>|<00>|<01>}|jjjdkr:|<00>|<01>|rHt|j<00>|S)aRParse multiple statements into a list until one of the end tokens
is reached. This is used to parse the body of statements as it also
parses template data if appropriate. The parser checks first if the
current token is a colon and skips it if there is one. Then it checks
for the block end and parses until if one of the `end_tokens` is
reached. Per default the active token in the stream at the end of
the call is the matched end token. If this is not wanted `drop_needle`
can be set to `True` and the end token is removed.
<20>colonrI<00>eof)r <00>skip_if<69>expect<63>subparser2rKrG<00>next)r*rE<00> drop_needle<6C>resultr/r/r0<00>parse_statements<74>s  


zParser.parse_statementscCsft|j<01>j}|jdd<02>}|j<01>d<03>r<|<00><05>}tj|||d<04>S|<00>d<05>}|j ddd<07>}tj
||||d<04>S)zParse an assign statement.T)<01>with_namespace<63>assign)r3N)z name:endset)rg) rfr r3<00>parse_assign_targetrc<00> parse_tuplerZAssign<67> parse_filterriZ AssignBlock)r*r3<00>targetr8Z filter_node<64>bodyr/r/r0<00> parse_set<65>s   
zParser.parse_setc Cs<>|j<00>d<01>j}|jdd<03>}|j<00>d<04>|jddd<07>}d}|j<00>d <09>rL|<00><06>}|j<00>d
<EFBFBD>}|<00>d <0B>}t|j<00>j d krxg}n|jd dd<0F>}t
j |||||||d<10>S)zParse a for loop.zname:for)zname:in)rMzname:inF)zname:recursive)<02> with_condexprrMNzname:ifzname:recursive)z name:endforz name:elseZendfor)z name:endforT)rg)r3) r rdr3rlrmrc<00>parse_expressionrirfrWrZFor)r*r3ro<00>iter<65>test<73> recursiverp<00>else_r/r/r0<00> parse_for<6F>s    
zParser.parse_forcCs<>tj|j<02>d<01>jd<02>}}x||jdd<04>|_|<00>d<05>|_g|_ g|_
t |j<02>}|<03>d<06>rxtj|jj jd<02>}|j <09> |<01>qn|<03>d<07>r<>|jdd d
<EFBFBD>|_
PqW|S) zParse an if construct.zname:if)r3F)rr)z name:elifz name:elsez
name:endifz name:elifz name:else)z
name:endifT)rg)rZIfr rdr3rmrurirpZelif_rwrfr2r>)r*<00>noderhr^r/r/r0<00>parse_if<69>s  

 

zParser.parse_ifcCs<>tjt|j<03>jd<01>}g}g}xb|jjjdkr~|jjj}|rF|j<03>d<03>|<00><08>}|<05> d<04>|<02>
|<05>|j<03>d<05>|<03>
|<00> <0B><00>qW||_ ||_ |jddd<08>|_|S) N)r3rI<00>comma<6D>paramrk)z name:endwithT)rg)rZWithrfr r3r2rKrdrl<00>set_ctxr>rs<00>targets<74>valuesrirp)r*ryr~rr3ror/r/r0<00>
parse_with<EFBFBD>s"
 

 
zParser.parse_withcCsDtjt|j<03>jd<01>}t<00>d|<00><06><00>g|_|jddd<05>|_ t<00>
|g<01>S)N)r3r)zname:endautoescapeT)rg) rZScopedEvalContextModifierrfr r3<00>Keywordrs<00>optionsrirpZScope)r*ryr/r/r0<00>parse_autoescape<70>s

zParser.parse_autoescapecCsptjt|j<03>jd<01>}|j<03>d<02>j|_|j<03>d<03>|_ |jj
j dkrJ|<00> d<05>|j ddd<08>|_|j<03>d |j<00>|S)
N)r3r!z name:scopedrzpBlock names in Jinja have to be valid Python identifiers and may not contain hyphens, use an underscore instead.)z name:endblockT)rgzname:)rZBlockrfr r3rdrWr!rc<00>scopedr2rKr6rirp)r*ryr/r/r0<00> parse_block<63>s
zParser.parse_blockcCs"tjt|j<03>jd<01>}|<00><05>|_|S)N)r3)rZExtendsrfr r3rs<00>template)r*ryr/r/r0<00> parse_extendss
zParser.parse_extendscCsH|jj<01>dd<02>r>|j<00><03><00>d<03>r>t|j<00>jdk|_|j<00><08>n||_|S)Nz name:withz name:withoutz name:contextr) r r2rL<00>lookrurfrW<00> with_context<78>skip)r*ry<00>defaultr/r/r0<00>parse_import_contexts  zParser.parse_import_contextcCsbtjt|j<03>jd<01>}|<00><05>|_|jj<07>d<02>rP|j<03> <09><00>d<03>rPd|_
|j<03> d<05>nd|_
|<00> |d<04>S)N)r3z name:ignorez name:missingT<67>F) r<00>Includerfr r3rsr<>r2rur<>Zignore_missingr<67>r<>)r*ryr/r/r0<00> parse_includes
zParser.parse_includecCsFtjt|j<03>jd<01>}|<00><05>|_|j<03>d<02>|jdd<04>j |_
|<00> |d<05>S)N)r3zname:asT)<01> name_onlyF) rZImportrfr r3rsr<>rdrlr!ror<>)r*ryr/r/r0<00> parse_import)s

 zParser.parse_importcs tjt<02>j<03>jd<01><01><00><01><05><00>_<06>j<03>d<02>g<00>_<08><00>fdd<04>}x<><78>jrR<72>j<03>d<05><00>jj j
dkr<>|<01>rhP<00>j dd<08>}|j <0C> d <09>r<><72>jd
|jtd <0B><00>j<03>d <0C>r<><72>j dd<08>}<03>j<08>|j |j f<02>n<0E>j<08>|j <0C>|<01>s<><73>jj j
dkr<>Pq@<40>j<03>d<06>q@Wt<12>d <0A><02>sd<0E>_<13>S)N)r3z name:importcsB<00>jjjdkr><3E>j<00><03><00>d<02>r>t<05>j<00>jdk<02>_<06>j<00><07>dSdS)N)rZwithoutz name:contextrTF)r r2rWr<>rurfr<>r<>r/)ryr*r/r0<00> parse_context6s 
z(Parser.parse_from.<locals>.parse_contextr{r!T)r<><00>_z4names starting with an underline can not be imported)r5zname:asr<73>F)rZ
FromImportrfr r3rsr<>rd<00>namesr2rKrlr!<00>
startswithr6rrcr><00>hasattrr<72>)r*r<>ro<00>aliasr/)ryr*r0<00>
parse_from0s4
       zParser.parse_fromcCs<>g|_}g|_}|j<02>d<01>xl|jjjdkr<>|r@|j<02>d<03>|jdd<05>}|<04>d<06>|j<02>d<07>rr|<03> |<00>
<EFBFBD><00>n|r<>|<00> d<08>|<02> |<04>q"W|j<02>d<02>dS) N<>lparenrJr{T)r<>r|rkz-non-default argument follows default argument) <0C>args<67>defaultsr rdr2rKrlr}rcr>rsr6)r*ryr<>r<><00>argr/r/r0<00>parse_signatureVs

   
 
zParser.parse_signaturecCsttjt|j<03>jd<01>}|jjjdkr.|<00>|<01>n g|_g|_ |<00>
<EFBFBD>|_ t |j tj <0A>s`|<00>d|j<04>|jddd<06>|_|S)N)r3r<>z expected call)z name:endcallT)rg)rZ CallBlockrfr r3r2rKr<>r<>r<>rsrU<00>
isinstance<EFBFBD>Callr6rirp)r*ryr/r/r0rZfs 
zParser.parse_call_blockcCs8tjt|j<03>jd<01>}|jddd<03>|_|jddd<05>|_|S)N)r3T)<01> start_inline)zname:endfilter)rg) rZ FilterBlockrfr r3rnrVrirp)r*ryr/r/r0r[ts

zParser.parse_filter_blockcCsBtjt|j<03>jd<01>}|jdd<03>j|_|<00>|<01>|jddd<05>|_ |S)N)r3T)r<>)z name:endmacro)rg)
rZMacrorfr r3rlr!r<>rirp)r*ryr/r/r0<00> parse_macro{s 

zParser.parse_macrocCsTtjt|j<03>jd<01>}g|_x4|jjjdkrN|jr<|j<03>d<03>|j<00>|<00> <09><00>qW|S)N)r3rIr{)
r<00>Outputrfr r3r2rKrdr>rs)r*ryr/r/r0<00> parse_print<6E>s zParser.parse_printTcCs<>|rN|j<00><01>jdkrN|j<00>d<02>}t|j<00>|j<00>d<02>}tj|j|j|jd<03>}nL|rt|j<00>d<02>}tj |jd|jd<03>}n&|r<>|j
d|d<06>}n|<00> <0B>}|<07> d<04>|<07> <0A>s<>|<00>d|jj<10><11>|j<08>|S)aParse an assignment target. As Jinja2 allows assignments to
tuples, this function can parse all allowed assignment targets. Per
default assignments to tuples are parsed, that can be disable however
by setting `with_tuple` to `False`. If only assignments to names are
wanted `name_only` can be set to `True`. The `extra_end_rules`
parameter is forwarded to the tuple parsing function. If
`with_namespace` is enabled, a namespace assignment may be parsed.
<20>dotr!)r3<00>storeT)<02>
simplifiedrMzcan't assign to %r)r r<>rKrdrfrZNSRefrWr3<00>Namerm<00> parse_primaryr}Z
can_assignr6<00> __class__<5F>__name__<5F>lower)r*Z
with_tupler<EFBFBD>rMrjr^<00>attrror/r/r0rl<00>s"
 
  

zParser.parse_assign_targetcCs|r |<00><00>S|<00><01>S)z<>Parse an expression. Per default all expressions are parsed, if
the optional `with_condexpr` parameter is set to `False` conditional
expressions are not parsed.
)<02>parse_condexpr<70>parse_or)r*rrr/r/r0rs<00>szParser.parse_expressioncCsf|jjj}|<00><03>}xN|j<00>d<01>r`|<00><03>}|j<00>d<02>r>|<00><05>}nd}tj||||d<03>}|jjj}qW|S)Nzname:ifz name:else)r3)r r2r3r<>rcr<>rZCondExpr)r*r3<00>expr1Zexpr2Zexpr3r/r/r0r<><00>s
 
zParser.parse_condexprcCsJ|jjj}|<00><03>}x2|j<00>d<01>rD|<00><03>}tj|||d<02>}|jjj}qW|S)Nzname:or)r3)r r2r3<00> parse_andrcr<00>Or)r*r3<00>left<66>rightr/r/r0r<><00>s
zParser.parse_orcCsJ|jjj}|<00><03>}x2|j<00>d<01>rD|<00><03>}tj|||d<02>}|jjj}qW|S)Nzname:and)r3)r r2r3<00> parse_notrcr<00>And)r*r3r<>r<>r/r/r0r<><00>s
zParser.parse_andcCs4|jj<01>d<01>r,t|j<00>j}tj|<00><07>|d<02>S|<00><08>S)Nzname:not)r3) r r2rurfr3r<00>Notr<74><00> parse_compare)r*r3r/r/r0r<><00>s zParser.parse_notcCs<>|jjj}|<00><03>}g}x<>|jjj}|tkrLt|j<00>|<03>t<08> ||<00><03><00><02>nh|j<00>
d<01>rp|<03>t<08> d|<00><03><00><02>nD|jj<01> d<03>r<>|j<00> <0C><00> d<01>r<>|j<00> d<04>|<03>t<08> d|<00><03><00><02>nP|jjj}qW|s<>|Stj|||d<06>S)Nzname:in<69>inzname:notr<74><00>notin)r3)r r2r3<00> parse_math1rK<00>_compare_operatorsrfr>rZOperandrcrur<>r<>ZCompare)r*r3r8<00>ops<70>
token_typer/r/r0r<><00>s&


  zParser.parse_comparecCsb|jjj}|<00><03>}xJ|jjjdkr\t|jjj}t|j<00>|<00><03>}||||d<02>}|jjj}qW|S)N)rr)r3)r r2r3<00> parse_concatrK<00> _math_nodesrf)r*r3r<><00>clsr<73>r/r/r0r<><00>s

zParser.parse_math1cCsb|jjj}|<00><03>g}x*|jjjdkr>t|j<00>|<02>|<00><03><00>qWt|<02>dkrT|dStj ||d<04>S)N<>tilderOr)r3)
r r2r3<00> parse_math2rKrfr><00>lenrZConcat)r*r3r<>r/r/r0r<><00>s


 zParser.parse_concatcCsb|jjj}|<00><03>}xJ|jjjdkr\t|jjj}t|j<00>|<00><03>}||||d<02>}|jjj}qW|S)N)rrrr)r3)r r2r3<00> parse_powrKr<>rf)r*r3r<>r<>r<>r/r/r0r<>s

zParser.parse_math2cCsV|jjj}|<00><03>}x>|jjjdkrPt|j<00>|<00><03>}tj|||d<02>}|jjj}qW|S)N<>pow)r3)r r2r3<00> parse_unaryrKrfrZPow)r*r3r<>r<>r/r/r0r<>s

zParser.parse_powcCs<>|jjj}|jjj}|dkr<t|j<00>tj|<00>d<02>|d<03>}n0|dkrdt|j<00>tj|<00>d<02>|d<03>}n|<00> <09>}|<00>
|<04>}|r<>|<00> |<04>}|S)NrF)r3r) r r2rKr3rfrZNegr<67>ZPosr<73><00> parse_postfix<69>parse_filter_expr)r*Z with_filterr<72>r3ryr/r/r0r<>s





zParser.parse_unarycCsx|jj}|jdkrr|jdkr4tj|jdk|jd<04>}n0|jdkrPtjd|jd<04>}ntj|jd|jd<04>}t|j<00><00>n|jdkr<>t|j<00>|jg}|j}x,|jjjdkr<>|<03> |jjj<03>t|j<00>q<>Wtjd<08>
|<03>|d<04>}n<>|jd k<06>rt|j<00>tj|j|jd<04>}nr|jd
k<02>r2t|j<00>|j d d <0C>}|j<00> d <0A>nB|jdk<02>rH|<00> <0A>}n,|jdk<02>r^|<00><0E>}n|<00>dt|<01>|j<06>|S)Nr!)<04>true<75>false<73>True<75>False)r<>r<>)r3)<02>none<6E>None<6E>load<61>string<6E>)<02>integer<65>floatr<74>T)<01>explicit_parenthesesrJ<00>lbracket<65>lbracezunexpected '%s')r r2rKrWr<00>Constr3r<>rfr>r=rmrd<00>
parse_list<EFBFBD>
parse_dictr6r)r*r^ry<00>bufr3r/r/r0r<>(s<

  


 
 
  
 
zParser.parse_primaryc s<><00>jjj}|r<16>j}n|r"<22>j}n <0C>fdd<02>}g}d}xL|rH<72>j<00>d<04><00><00>|<03>rTP|<07>|<06><00><00>jjjdkrtd}nP<00>jjj}q8W|s<>|r<>|dS|s<><73><00> dt
<EFBFBD>jj<01><00>t j |d|d <09>S)
a<EFBFBD>Works like `parse_expression` but if multiple expressions are
delimited by a comma a :class:`~jinja2.nodes.Tuple` node is created.
This method could also return a regular expression instead of a tuple
if no commas where found.
The default parsing mode is a full tuple. If `simplified` is `True`
only names and literals are parsed. The `no_condexpr` parameter is
forwarded to :meth:`parse_expression`.
Because tuples do not require delimiters and may end in a bogus comma
an extra hint is needed that marks the end of a tuple. For example
for loops support tuples between `for` and `in`. In that case the
`extra_end_rules` is set to ``['name:in']``.
`explicit_parentheses` is true if the parsing was triggered by an
expression in parentheses. This is used to figure out if an empty
tuple is a valid expression or not.
cs <00>jdd<02>S)NF)rr)rsr/)r*r/r0<00><lambda>d<00>z$Parser.parse_tuple.<locals>.<lambda>Fr{Trz Expected an expression, got '%s'r<>)r3) r r2r3r<>rsrdrNr>rKr6rr<00>Tuple) r*r<>rrrMr<>r3r&r<>Zis_tupler/)r*r0rmJs2
  
 zParser.parse_tuplecCsn|j<00>d<01>}g}x@|jjjdkrP|r0|j<00>d<03>|jjjdkr@P|<02>|<00><05><00>qW|j<00>d<02>tj||jd<04>S)Nr<4E><00>rbracketr{)r3) r rdr2rKr>rsrZListr3)r*r^<00>itemsr/r/r0r<><00>s   zParser.parse_listcCs<>|j<00>d<01>}g}xf|jjjdkrv|r0|j<00>d<03>|jjjdkr@P|<00><04>}|j<00>d<04>|<00><04>}|<02>tj|||jd<05><03>qW|j<00>d<02>tj ||jd<05>S)Nr<4E><00>rbracer{ra)r3)
r rdr2rKrsr>rZPairr3<00>Dict)r*r^r<><00>keyrWr/r/r0r<><00>s    zParser.parse_dictcCsFx@|jjj}|dks|dkr(|<00>|<01>}q|dkr<|<00>|<01>}qPqW|S)Nr<4E>r<>r<>)r r2rK<00>parse_subscript<70>
parse_call)r*ryr<>r/r/r0r<><00>s
  zParser.parse_postfixcCs`xZ|jjj}|dkr |<00>|<01>}q|dkrB|jjjdkrB|<00>|<01>}q|dkrV|<00>|<01>}qPqW|S)N<>piper!<00>isr<73>)r r2rKrnrW<00>
parse_testr<EFBFBD>)r*ryr<>r/r/r0r<><00>s
   zParser.parse_filter_exprcCs t|j<01>}|jdkr<>|jj}t|j<01>|jdkrFtj||jd|jd<04>S|jdkr^|<00>d|j<07>tj |j|jd<04>}tj
||d|jd<04>S|jdk<02>rg}x0|jjjdkr<>|r<>|j<01> d <09>|<05> |<00> <0A><00>q<>W|j<01> d<08>t|<05>d
kr<>|d }ntj|d|jd<04>}tj
||d|jd<04>S|<00>d |j<07>dS) Nr<4E>r!r<>)r3r<>zexpected name or numberr<72>r<>r{rOrzexpected subscript expression)rfr rKr2rZGetattrrWr3r6r<>ZGetitemrdr><00>parse_subscribedr<64>r<>)r*ryr^Z
attr_tokenr<EFBFBD>r<>r/r/r0r<><00>s.



 

    
zParser.parse_subscriptcCs<>|jjj}|jjjdkr*t|j<00>dg}n*|<00><05>}|jjjdkrD|St|j<00>|g}|jjjdkrn|<02>d<00>n(|jjjdkr<>|<02>|<00><05><00>n
|<02>d<00>|jjjdkr<>t|j<00>|jjjdkr<>|<02>|<00><05><00>q<>|<02>d<00>n
|<02>d<00>tj|d|i<01>S)Nra)r<>r{r3) r r2r3rKrfrsr>rZSlice)r*r3r<>ryr/r/r0r<><00>s*


 

 
zParser.parse_subscribedc
s<><00>j<00>d<01><01>g}g}d}}d}<06><00>fdd<04>}<07>x"<22>jjjdk<03>rR|rb<72>j<00>d<06><00>jjjdkrbP<00>jjjdkr<>||dko<>|dk<08>t<04>j<00><00><00><05>}n<><6E>jjjdkr<>||dk<08>t<04>j<00><00><00><05>}n<>||dko<>|dk<08><00>jjjd k<02>r4<72>j<00><06>jd
k<02>r4<72>jjj}<08>j<00>d <0B><00><00><05>} |<03> t
j || | j d <0C><03>n|| <00>|<02> <09><00><05><00>d }q2W<00>j<00>d<05>|dk<08>rv||||fSt
j |||||<05>j d <0C>S)Nr<4E>Fcs|s<12><00>d<01>j<01>dS)Nz+invalid syntax for function call expression)r6r3)r8)r*r^r/r0<00>ensure<72>sz!Parser.parse_call.<locals>.ensurerJr{rr<>r!rkr<>)r3T)r rdr2rKrfrsr<>rWr<>r>rr<>r3r<>)
r*ryr<><00>kwargs<67>dyn_args<67>
dyn_kwargsZ require_commar<61>r<>rWr/)r*r^r0r<><00>sF  

 


  
 
 zParser.parse_callc Cs<>x<>|jjjdks|r<>|s"t|j<00>|j<00>d<02>}|j}x2|jjjdkrft|j<00>|d|j<00>d<02>j7}q6W|jjjdkr<>|<00>d<00>\}}}}ng}g}d}}tj|||||||j d<06>}d}qW|S)Nr<4E>r!r<><00>.r<>)r3F)
r r2rKrfrdrWr<>r<00>Filterr3) r*ryr<>r^r!r<>r<>r<>r<>r/r/r0rn s"
 
 zParser.parse_filterc Cst|j<01>}|jj<02>d<01>r(t|j<01>d}nd}|j<01>d<04>j}x2|jjjdkrlt|j<01>|d|j<01>d<04>j7}q<Wd}}g}|jjjdkr<>|<00>d<00>\}}}}nH|jjjdkr<>|jj<02>d d
d <0B>s<>|jj<02>d <0C>r<>|<00> d <0A>|<00>
<EFBFBD>g}ng}t j |||||||j d<0E>}|<03>rt j||j d<0E>}|S)Nzname:notTFr!r<>r<>r<>)r!r<>r<>r<>r<>r<>r<>z name:elsezname:orzname:andzname:isz'You cannot chain multiple tests with is)r3)rfr r2rurdrWrKr<>rLr6r<>rZTestr3r<>) r*ryr^Znegatedr!r<>r<>r<>r<>r/r/r0r<>4s2


 
  zParser.parse_testcsDg<00>g<00><01>j}|dk r"|j<01>|<01><00><00>fdd<02>}z<>x<EFBFBD>|j<02>r|jj}|jdkrv|jrj|tj|j|jd<04><02>t |j<02>q4|jdkr<>t |j<02>||j
dd<07><01>|j<02> d<08>q4|jd k<02>r|<03>t |j<02>|dk r<>|jjj |<01>S|<00> <0A>}t|t<0F>r<><72><00>|<05>n
<EFBFBD><00>|<05>|j<02> d
<EFBFBD>q4td <0B><01>q4W|<03>Wd|dk <09>r>|j<01><12>X<00>S) Ncs8<00>r4<72>dj}<00><00>tj<03>dd<00>|d<02><02><00>dd<00>=dS)Nr)r3)r3r>rr<>)r3)rp<00> data_bufferr/r0<00>
flush_data[s
z#Parser.subparse.<locals>.flush_data<74>data)r3Zvariable_beginT)rrrHZ block_beginrIzinternal parsing error)r>r)r r2rKrWrZ TemplateDatar3rfrmrdrLr`r<>rDr<<00>AssertionErrorr])r*rEZadd_datar<61>r^rSr/)rpr<>r0reSsD 


  

 

 
 

 zParser.subparsecCs"tj|<00><02>dd<02>}|<01>|j<04>|S)z0Parse the whole template into a `Template` node.rO)r3)r<00>TemplatereZset_environmentr)r*rhr/r/r0r&<00>s z Parser.parse)NNN)N)NN)N)N)F)TFNF)T)T)FTNF)F)N)7r<37><00>
__module__<EFBFBD> __qualname__<5F>__doc__r1rr6rBrCrGrNrTr`rirqrxrzr<>r<>r<>r<>r<>r<>r<>r<>r<>rZr[r<>r<>rlrsr<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>rmr<>r<>r<>r<>r<>r<>r<>rnr<>rer&r/r/r/r0r sl
 




    & 

    
 
"
6  /

0rN)r<>Zjinja2rZjinja2.exceptionsrrZ jinja2.lexerrrZjinja2._compatr<00> frozensetrXr<>ZAddZSubZMulZDivZFloorDivZModr<64>rPrr/r/r/r0<00><module>
s