
    <h                        S SK Jr  SSKJrJr  S SKr\R                  (       a  SSKJ	r	   " S S\5      r
 " S	 S
\5      r " S S\5      rg)    )annotations   )
AstVisitorFullAstVisitorN   )mparserc                  n    \ rS rSrSS jrSS jrSS jrSS jrSS jrSS jr	SS jr
SS	 jrSS
 jrSrg)AstIndentationGenerator   c                    SU l         g Nr   levelselfs    {/mnt/mint/home/seanl/mnt/public/Repos/ladybird/Build/vcpkg/downloads/tools/meson-1.9.0-d1fcc2/mesonbuild/ast/postprocess.py__init__ AstIndentationGenerator.__init__   s	    
    c                &    U R                   Ul         g Nr   r   nodes     r   visit_default_func*AstIndentationGenerator.visit_default_func   s    ZZ
r   c                    U R                  U5        U =R                  S-  sl        UR                  R                  U 5        U =R                  S-  sl        g Nr   r   r   argsacceptr   s     r   visit_ArrayNode'AstIndentationGenerator.visit_ArrayNode   <    %

a
		

a
r   c                    U R                  U5        U =R                  S-  sl        UR                  R                  U 5        U =R                  S-  sl        g r   r   r   s     r   visit_DictNode&AstIndentationGenerator.visit_DictNode   r#   r   c                    U R                  U5        UR                  R                  U 5        U =R                  S-  sl        UR                  R                  U 5        U =R                  S-  sl        g r   )r   source_objectr    r   r   r   s     r   visit_MethodNode(AstIndentationGenerator.visit_MethodNode"   sP    %!!$'

a
		

a
r   c                    U R                  U5        U =R                  S-  sl        UR                  R                  U 5        U =R                  S-  sl        g r   r   r   s     r   visit_FunctionNode*AstIndentationGenerator.visit_FunctionNode)   r#   r   c                    U R                  U5        U =R                  S-  sl        UR                  R                  U 5        UR                  R                  U 5        U =R                  S-  sl        g r   )r   r   itemsr    blockr   s     r   visit_ForeachClauseNode/AstIndentationGenerator.visit_ForeachClauseNode/   sN    %

a


$

$

a
r   c                   U R                  U5        UR                   H  nUR                  U 5        M     UR                  (       aF  U =R                  S-  sl        UR                  R                  U 5        U =R                  S-  sl        g g r   )r   ifsr    	elseblockr   )r   r   is      r   visit_IfClauseNode*AstIndentationGenerator.visit_IfClauseNode6   sa    %AHHTN >>JJ!OJNN!!$'JJ!OJ r   c                    U R                  U5        U =R                  S-  sl        UR                  R                  U 5        UR                  R                  U 5        U =R                  S-  sl        g r   )r   r   	conditionr    r0   r   s     r   visit_IfNode$AstIndentationGenerator.visit_IfNode?   sN    %

a
d#

$

a
r   r   NreturnNoner   zmparser.BaseNoder>   r?   )r   zmparser.ArrayNoder>   r?   )r   zmparser.DictNoder>   r?   )r   zmparser.MethodNoder>   r?   )r   zmparser.FunctionNoder>   r?   r   zmparser.ForeachClauseNoder>   r?   )r   zmparser.IfClauseNoder>   r?   r   zmparser.IfNoder>   r?   )__name__
__module____qualname____firstlineno__r   r   r!   r%   r)   r,   r1   r7   r;   __static_attributes__ r   r   r
   r
      s/     r   r
   c                  (    \ rS rSrSS jrSS jrSrg)AstIDGeneratorF   c                    0 U l         g r   counterr   s    r   r   AstIDGenerator.__init__G   s	    )+r   c                    [        U5      R                  nX R                  ;  a  SU R                  U'   US-   [        U R                  U   5      -   Ul        U R                  U==   S-  ss'   g )Nr   #r   )typerC   rN   strast_id)r   r   names      r   r   !AstIDGenerator.visit_default_funcJ   s[    Dz""||#!"DLLSj3t||D'9#::Tar   rM   Nr=   r@   )rC   rD   rE   rF   r   r   rG   rH   r   r   rJ   rJ   F   s    , r   rJ   c                  F    \ rS rSrS	S jrS
S jrSS jrSS jrSS jrSr	g)AstConditionLevelQ   c                    SU l         g r   condition_levelr   s    r   r   AstConditionLevel.__init__R   s
     r   c                &    U R                   Ul         g r   r[   r   s     r   
enter_nodeAstConditionLevel.enter_nodeU   s    #33r   c                :   U R                  U5        UR                  R                  U 5        UR                   H  nUR                  U 5        M     UR                   H  nUR                  U 5        M     UR
                  R                  U 5        UR                  R                  U 5        U =R                  S-  sl        UR                  R                  U 5        U =R                  S-  sl        UR                  R                  U 5        U R                  U5        g r   )r_   foreach_r    varnamescommascolonr/   r\   r0   
endforeach	exit_node)r   r   varnamecommas       r   r1   )AstConditionLevel.visit_ForeachClauseNodeX   s    T"}}GNN4  %[[ELL !

$

$!

$!t$tr   c                >   U R                  U5        UR                  R                  U 5        UR                  R                  U 5        U =R                  S-  sl        UR
                  R                  U 5        U =R                  S-  sl        U R                  U5        g r   )r_   if_r    r:   r\   r0   rg   r   s     r   r;   AstConditionLevel.visit_IfNodeg   sp    d#!

$!tr   c                   U R                  U5        UR                  R                  U 5        U =R                  S-  sl        UR                  R                  U 5        U =R                  S-  sl        U R                  U5        g r   )r_   else_r    r\   r0   rg   r   s     r   visit_ElseNode AstConditionLevel.visit_ElseNodep   s`    

$!

$!tr   r[   Nr=   r@   rA   rB   )r   zmparser.ElseNoder>   r?   )
rC   rD   rE   rF   r   r_   r1   r;   rp   rG   rH   r   r   rX   rX   Q   s    !4r   rX   )
__future__r   visitorr   r   typingTTYPE_CHECKING r   r
   rJ   rX   rH   r   r   <module>rx      s?    # / ??6j 6p	 Z 	 % %r   