???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................3

  \.  ã               @   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
mZ G dd„ dejƒZdS )	zÖFixer for generator.throw(E, V, T).

g.throw(E)       -> g.throw(E)
g.throw(E, V)    -> g.throw(E(V))
g.throw(E, V, T) -> g.throw(E(V).with_traceback(T))

g.throw("foo"[, V[, T]]) will warn about string exceptions.é   )Úpytree)Útoken)Ú
fixer_base)ÚNameÚCallÚArgListÚAttrÚis_tuplec               @   s   e Zd ZdZdZdd„ ZdS )ÚFixThrowTzÉ
    power< any trailer< '.' 'throw' >
           trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' >
    >
    |
    power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > >
    c             C   sê   | j }|d jƒ }|jtjkr.| j|dƒ d S |jdƒ}|d krDd S |jƒ }t|ƒrndd„ |jdd… D ƒ}nd|_	|g}|d }d	|krÖ|d	 jƒ }d|_	t
||ƒ}	t|	td
ƒƒt|gƒg }
|jtj|j|
ƒƒ n|jt
||ƒƒ d S )NÚexcz+Python 3 does not support string exceptionsÚvalc             S   s   g | ]}|j ƒ ‘qS © )Úclone)Ú.0Úcr   r   ú//usr/lib64/python3.6/lib2to3/fixes/fix_throw.pyú
<listcomp>)   s    z&FixThrow.transform.<locals>.<listcomp>é   Ú ÚargsÚtbÚwith_tracebackéÿÿÿÿ)Úsymsr   Útyper   ÚSTRINGZcannot_convertÚgetr	   ZchildrenÚprefixr   r   r   r   Úreplacer   ZNodeZpower)ÚselfZnodeZresultsr   r   r   r   Z
throw_argsr   ÚeZwith_tbr   r   r   Ú	transform   s*    

zFixThrow.transformN)Ú__name__Ú
__module__Ú__qualname__ZBM_compatibleZPATTERNr!   r   r   r   r   r
      s   r
   N)Ú__doc__r   r   Zpgen2r   r   Z
fixer_utilr   r   r   r   r	   ZBaseFixr
   r   r   r   r   Ú<module>   s
   