o
    4f                     @   s:   d Z ddlmZ ddlmZmZmZ G dd dejZdS )zFixer for exec.

This converts usages of the exec statement into calls to a built-in
exec() function.

exec code in ns1, ns2 -> exec(code, ns1, ns2)
   )
fixer_base)CommaNameCallc                   @   s   e Zd ZdZdZdd ZdS )FixExecTzx
    exec_stmt< 'exec' a=any 'in' b=any [',' c=any] >
    |
    exec_stmt< 'exec' (not atom<'(' [any] ')'>) a=any >
    c                 C   s   |sJ | j }|d }|d}|d}| g}d|d _|d ur-|t | g |d ur;|t | g ttd||jdS )Nabc     exec)prefix)symsgetZcloner   extendr   r   r   )selfZnoderesultsr   r   r   r	   args r   h/home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/host/lib/python3.10/lib2to3/fixes/fix_exec.py	transform   s   



zFixExec.transformN)__name__
__module____qualname__ZBM_compatibleZPATTERNr   r   r   r   r   r      s    r   N)	__doc__r
   r   Z
fixer_utilr   r   r   ZBaseFixr   r   r   r   r   <module>   s   	