+
    WBi                         R t ^ RIt^ RIHt ^ RIHt  ! R R4      t ! R R4      t ! R R	]4      t ! R
 R4      t ! R R]4      t	R# )zjutilities for analyzing expressions and blocks of Python
code, as well as generating Python from AST nodesN)
exceptions)pyparserc                   *   a  ] tR t^t o RtR tRtV tR# )
PythonCodez<represents information about a string containing Python codec                   Wn         \        4       V n        \        4       V n        \	        V\
        4      '       d(   \        P                  ! VP                  4       R 3/ VB pMTp\        P                  ! V 3/ VB pVP                  V4       R# )execN)codesetdeclared_identifiersundeclared_identifiers
isinstancestrr   parselstripFindIdentifiersvisitselfr   exception_kwargsexprfs   &&,  -/usr/lib/python3.14/site-packages/mako/ast.py__init__PythonCode.__init__   sp    	 %(E! '*e# dC  >>$++-L;KLDD$$T>-=>	    )r   r
   r   N__name__
__module____qualname____firstlineno____doc__r   __static_attributes____classdictcell____classdict__s   @r   r   r      s     F r   r   c                   *   a  ] tR t^2t o RtR tRtV tR# )ArgumentListzBparses a fragment of code as a comma-separated list of expressionsc                   . V n         . V n        \        4       V n        \        4       V n        \        V\        4      '       d]   \        P                  ! R V4      '       d'   \        P                  ! RV4      '       g
   VR,          p\        P                  ! VR3/ VB pMTp\        P                  ! V \        3/ VB pVP                  V4       R# )z\Sz,\s*$,r   N)codeargsargsr	   r
   r   r   r   rematchr   r   	FindTupler   r   r   s   &&,  r   r   ArgumentList.__init__6   s    	$'E!&)e#dC  xxt$$RXXh-E-E >>$C2BCDDtZD3CD	r   )r*   r)   r
   r   Nr   r#   s   @r   r&   r&   2   s     L r   r&   c                   6   a a ] tR t^Ht oRtV 3R ltRtVtV ;t# )PythonFragmentzextends PythonCode to provide identifier lookups in partial control
statements

e.g.::

    for x in 5:
    elif y==9:
    except (MyException, e):

c                ^  < \         P                  ! R VP                  4       \         P                  4      pV'       g   \        P
                  ! RV,          3/ VB hVP                  ^4      '       d   VRVP                  ^4       pVP                  ^^4      w  rEVR9   d   VR,           pMpVR8X  d   VR,           pM_VR9   d   RV,           R,           pMGVR8X  d   RV,           R,           pM/VR	8X  d   VR,           pM\        P
                  ! R
V,          3/ VB h\        SV `$  ! V3/ VB  R# )z^(\w+)(?:\s+(.*?))?:\s*(#|$)z0Fragment '%s' is not a partial control statementNpasstryzpass
except:passzif False:pass
exceptz	try:pass
withz!Unsupported control keyword: '%s')forifwhile)elifelse)
r+   r,   stripSr   CompileExceptiongroupstartsuperr   )r   r   r   mkeywordr   	__class__s   &&,   r   r   PythonFragment.__init__U   s   HH4djjlBDDI--BTI"  771::!''!*%D''!Q-,,&=D--D(($t+f4D $&/D&=D--3g="  	2!12r    	r   r   r   r   r    r   r!   r"   __classcell__rC   r$   s   @@r   r0   r0   H   s     	3 3r   r0   c                   H   a  ] tR t^qt o RtRR ltRR lt]R 4       tRt	V t
R# )	FunctionDeclzfunction declarationc                   Wn         \        P                  ! VR 3/ VB p\        P                  ! V 3/ VB pVP	                  V4       \        V R4      '       g   \        P                  ! RV,          3/ VB hV'       gD   V P                  '       d0   \        P                  ! RV P                  R,          ,          3/ VB hR# R# )r   funcnamez'Code '%s' is not a function declarationz('**%s' keyword argument not allowed hereN)
r   r   r   	ParseFuncr   hasattrr   r=   kwargs
kwargnames)r   r   allow_kwargsr   r   r   s   &&&,  r   r   FunctionDecl.__init__u   s    	~~dF?.>?t8'78	tZ((--9D@"  --://"%& #  !,|r   c                   . pV P                   RRR1,          pV P                  RRR1,          pV P                  RRR1,          pV P                  RRR1,          pV P                  '       d(   VP                  RVP                  ^ 4      ,           4       V F  pV'       d   VP                  V: RV: 24       K%  V'       de   VP                  ^ 4      pVf   VP                  V4       KU  VP                  V: R\        P                  ! V4      P                  4       : 24       K  VP                  V4       K  	  V P                  '       d(   VP                  RVP                  ^ 4      ,           4       V Fq  pV'       g	   V'       g   VP                  V4       K&  VP                  ^ 4      pVP                  V: R\        P                  ! V4      P                  4       : 24       Ks  	  VP                  4        V# )a  Return the argument declarations of this FunctionDecl as a printable
list.

By default the return value is appropriate for writing in a ``def``;
set `as_call` to true to build arguments to be passed to the function
instead (assuming locals with the same names as the arguments exist).
Nz**=*rM   )argnamesrQ   defaults
kwdefaultsrP   appendpopr   ExpressionGeneratorvaluevarargsreverse)	r   as_call	namedeclsrW   rQ   rX   rY   namedefaults	   &&       r   get_argument_expressions%FunctionDecl.get_argument_expressions   s    	 ==2&__TrT*
==2&__TrT*
 ;;;TJNN1$556D   D$!78$..+? $$T*$$!=!=g!F!L!L!NP
   &# ( <<<S8<<?23Dh  &",,q/  X99'BHHJL  	r   c                `    \        V P                  4      \        V P                  4      ,           # )N)tuplerW   rQ   )r   s   &r   allargnamesFunctionDecl.allargnames   s    T]]#eDOO&<<<r   )r   N)T)F)r   r   r   r   r    r   rd   propertyrh   r!   r"   r#   s   @r   rJ   rJ   q   s'     $7r = =r   rJ   c                   6   a a ] tR t^t oRtV 3R ltRtVtV ;t# )FunctionArgsz.the argument portion of a function declarationc                8   < \         SV `  ! R V,          3/ VB  R# )zdef ANON(%s):passN)r@   r   )r   r   rP   rC   s   &&,r   r   FunctionArgs.__init__   s    ,t3>v>r   rE   rF   rH   s   @@r   rl   rl      s     8? ?r   rl   )
r    r+   makor   r   r   r&   r0   rJ   rl   rE   r   r   <module>rp      sP   5 
   D ,&3Z &3RQ= Q=h?< ?r   