HOME


sh-3ll 1.0
DIR:/usr/local/lib/python3.6/site-packages/libpasteurize/fixes/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.6/site-packages/libpasteurize/fixes/__pycache__/fix_raise_.cpython-36.pyc
3

+��h��@sBdZddlmZddlmZmZmZmZmZGdd�dej	�Z
dS)z�Fixer for
              raise E(V).with_traceback(T)
    to:
              from future.utils import raise_
              ...
              raise_(E, V, T)

TODO: FIXME!!

�)�
fixer_base)�Comma�Node�Leaf�token�symsc@seZdZdZdd�ZdS)�FixRaisez�
    raise_stmt< 'raise' (power< name=any [trailer< '(' val=any* ')' >]
        [trailer< '.' 'with_traceback' > trailer< '(' trc=any ')' >] > | any) ['from' chain=any] >c	Cs�t|jd�|jd�|jd�}}}|jd�}|dk	rV|j|d�|jj�|j�|dk	r�|rj|dn
ttjd�}d|_|_ttjd	�|j	�t
�|j	�t
�|j	�g}ttj
|�}|j|�dS)
N�name�val�trc�chainz8explicit exception chaining is not supported in Python 2r�None� �raise)ZFIXME�get�warningZprev_sibling�removerr�NAME�prefix�clonerrr�
raise_stmt�replace)	�self�node�resultsr	r
rrZkidsr�r�E/root/tmp/pip-build-yeh9mt8d/future/libpasteurize/fixes/fix_raise_.py�	transforms"

zFixRaise.transformN)�__name__�
__module__�__qualname__ZPATTERNrrrrrrsrN)�__doc__Zlib2to3rZlib2to3.fixer_utilrrrrrZBaseFixrrrrr�<module>
s