o
    i                     @   sZ   d Z ddlmZ ddlmZ ddlmZ ddlm	Z	m
Z
mZmZ dZG dd dejZd	S )
z?
Fixer for:
it.__next__() -> it.next().
next(it) -> it.next().
    )token)python_symbols)
fixer_base)NameCallfind_bindingAttrz;Calls to builtin next() possibly shadowed by global bindingc                   @   s   e Zd ZdZdd ZdS )FixNextas  
    power< base=any+ trailer< '.' attr='__next__' > any* >
    |
    power< head='next' trailer< '(' arg=any ')' > any* >
    |
    classdef< 'class' base=any+ ':'
              suite< any*
                     funcdef< 'def'
                              attr='__next__'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    c                 C   s   |sJ | d}| d}| d}| d}|r5| }|ttt||jdtd |  d S |rC|td|jd d S d S )Nbaseattrheadarg)prefixnext)getclonereplacer   r   unicoder   remove)selfnoderesultsr
   r   r   Zarg_r    r   k/var/www/html/eduruby.in/lip-sync/lip-sync-env/lib/python3.10/site-packages/libpasteurize/fixes/fix_next.py	transform   s   



zFixNext.transformN)__name__
__module____qualname__ZPATTERNr   r   r   r   r   r	      s    r	   N)__doc__Zlib2to3.pgen2r   Zlib2to3.pygramr   ZsymsZlib2to3r   Zlib2to3.fixer_utilr   r   r   r   Zbind_warningZBaseFixr	   r   r   r   r   <module>   s    