o
    IAf                     @   st   	 d dl Z d dlZdd e jD Zg dZdZdZd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__).0Zfnamer   r   /usr/lib/python3.10/codeop.py
<listcomp>&   s    r   )compile_commandCompileCommandCompileri   i @  c                 C   s  | dD ]}| }|r|d dkr nq|dkrd}t [ tdttf z| ||| W nB tys   z| |d || W Y W d    d S  typ } zdt|v rfW Y d }~Y W d    d S W Y d }~nd }~ww Y nw W d    n1 s~w   Y  | |||S )N
r   #evalpassignorezincomplete input)	splitstripwarningscatch_warningssimplefilterSyntaxWarningDeprecationWarningSyntaxErrorstr)compilersourcefilenamesymbollineer   r   r   _maybe_compile1   s8   
	r   c                 C   s4   t | }t |}d|v rd|v rdS ||krdS dS )Nzwas never closedFT)repr)Zerr1Zerr2Zrep1Zrep2r   r   r   _is_syntax_errorL   s   r!   c                 C   s   t | ||ttB S N)compilePyCF_DONT_IMPLY_DEDENTPyCF_ALLOW_INCOMPLETE_INPUTr   r   r   r   r   r   _compileU   s   r'   <input>singlec                 C   s   	 t t| ||S r"   )r   r'   r&   r   r   r   r   X   s   r   c                   @   s   e Zd Z	 dd Zdd ZdS )r	   c                 C   s   t tB | _d S r"   )r$   r%   flagsselfr   r   r   __init__r   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__u   s   zCompile.__call__N__name__
__module____qualname__r-   r0   r   r   r   r   r	   m   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
   r5   )r   r   Zall_feature_namesr.   __all__r$   r%   r   r!   r'   r   r	   r
   r   r   r   r   <module>   s    "	
