B
    v9a                  @   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 )   )token)
fixer_base)Numberc               @   s"   e Zd ZejZdd Zdd ZdS )FixNumliteralsc             C   s   |j dp|j d dkS )N0Ll)value
startswith)selfnode r   %/usr/lib/python3.7/fix_numliterals.pymatch   s    zFixNumliterals.matchc             C   s`   |j }|d dkr |d d }n2|drR| rRtt|dkrRd|dd   }t||jdS )Nr   r   r      Z0o)prefix)r	   r
   isdigitlensetr   r   )r   r   resultsvalr   r   r   	transform   s    "zFixNumliterals.transformN)__name__
__module____qualname__r   NUMBERZ_accept_typer   r   r   r   r   r   r      s   r   N)Zpgen2r    r   Z
fixer_utilr   ZBaseFixr   r   r   r   r   <module>   s   