o
     JAfB  ã                   @   s<   	 d dl mZ d dlmZ d dl mZ G dd„ dejƒZdS )é   )Úpytree)Útoken)Ú
fixer_basec                   @   s@   e Zd ZdZdZe ejd¡Ze ej	d¡Z	ee	fZ
dd„ ZdS )Ú
FixWsCommaTzH
    any<(not(',') any)+ ',' ((not(',') any)+ ',')* [not(',') any]>
    ú,ú:c                 C   s`   |  ¡ }d}|jD ]$}|| jv r!|j}| ¡ rd|vrd|_d}q	|r+|j}|s+d|_d}q	|S )NFÚ
Ú Tú )ZcloneÚchildrenÚSEPSÚprefixÚisspace)ÚselfZnodeÚresultsÚnewZcommaÚchildr   © r   ú1/usr/lib/python3.10/lib2to3/fixes/fix_ws_comma.pyÚ	transform   s   

zFixWsComma.transformN)Ú__name__Ú
__module__Ú__qualname__ZexplicitZPATTERNr   ZLeafr   ÚCOMMAÚCOLONr   r   r   r   r   r   r      s    r   N)r	   r   Zpgen2r   r   ZBaseFixr   r   r   r   r   Ú<module>   s
    