a
    ´i¶  ã                   @   sf   d dl Z d dlZdd„ e jD ƒZg d¢ZdZdd„ Zdd	„ Zddd„ZG dd„ dƒZ	G dd„ dƒZ
dS )é    Nc                 C   s   g | ]}t t|ƒ‘qS © )ÚgetattrÚ
__future__)Ú.0Úfnamer   r   ú/usr/lib64/python3.9/codeop.pyÚ
<listcomp>>   s   ÿr   )Úcompile_commandÚCompileÚCommandCompileri   c                 C   sr  |  d¡D ] }| ¡ }|r
|d dkr
 q8q
|dkr8d}d  } }}d  } }	}
z| |||ƒ}W n tyr   Y n0 t ¡ �˜ t d¡ z| |d ||ƒ}	W n( tyÄ } z|}W Y d }~n
d }~0 0 z| |d ||ƒ}
W n* t�y } z|}W Y d }~n
d }~0 0 W d   ƒ n1 �s0    Y  z<|�r<|W d  }}S |	�sXt|ƒt|ƒk�rX|‚W d  }}n
d  }}0 d S )NÚ
r   ú#ÚevalÚpassÚerrorz

)ÚsplitÚstripÚSyntaxErrorÚwarningsÚcatch_warningsÚsimplefilterÚrepr)ÚcompilerÚsourceÚfilenameÚsymbolÚlineÚerrZerr1Zerr2ÚcodeÚcode1Úcode2Úer   r   r   Ú_maybe_compileE   s<    

:ür"   c                 C   s   t | ||tƒS ©N)ÚcompileÚPyCF_DONT_IMPLY_DEDENT©r   r   r   r   r   r   Ú_compilen   s    r'   ú<input>Úsinglec                 C   s   t t| ||ƒS r#   )r"   r'   r&   r   r   r   r	   q   s    r	   c                   @   s   e Zd Zdd„ Zdd„ ZdS )r
   c                 C   s
   t | _d S r#   )r%   Úflags©Úselfr   r   r   Ú__init__‹   s    zCompile.__init__c                 C   s<   t |||| jdƒ}tD ] }|j|j@ r|  j|jO  _q|S )NT)r$   r*   Ú	_featuresÚco_flagsZcompiler_flag)r,   r   r   r   ZcodeobZfeaturer   r   r   Ú__call__Ž   s
    zCompile.__call__N©Ú__name__Ú
__module__Ú__qualname__r-   r0   r   r   r   r   r
   †   s   r
   c                   @   s   e Zd Zdd„ Zddd„ZdS )	r   c                 C   s   t ƒ | _d S r#   )r
   r   r+   r   r   r   r-   œ   s    zCommandCompiler.__init__r(   r)   c                 C   s   t | j|||ƒS r#   )r"   r   )r,   r   r   r   r   r   r   r0   Ÿ   s    zCommandCompiler.__call__N)r(   r)   r1   r   r   r   r   r   •   s   r   )r(   r)   )r   r   Zall_feature_namesr.   Ú__all__r%   r"   r'   r	   r
   r   r   r   r   r   Ú<module>;   s   ÿ)
