�`^c@sWdZddlmZddlmZidd6dd6Zdejfd ��YZd
S(s�Fixer for unicode.
* Changes unicode to str and unichr to chr.
* If "...\u..." is not unicode literal change it into "...\\u...".
* Change u"..." into "...".
i(ttoken(t
fixer_baseuchruunichrustruunicodet
FixUnicodecBs&eZeZdZd�Zd�ZRS(sSTRING | 'unicode' | 'unichr'cCs/tt|�j||�d|jk|_dS(Ntunicode_literals(tsuperRt
start_treetfuture_featuresR(tselfttreetfilename((s//sys/lib/python2.7/lib2to3/fixes/fix_unicode.pyRscCs|jtjkr2|j�}t|j|_|S|jtjkr|j}|jr�|ddkr�d|kr�djg|j d�D]$}|j
dd�j
dd�^q��}n|dd kr�|d
}n||jkr�S|j�}||_|SdS(Niu'"u\u\\u\uu\\uu\Uu\\UuuUi(ttypeRtNAMEtclonet_mappingtvaluetSTRINGRtjointsplittreplace(Rtnodetresultstnewtvaltv((s//sys/lib/python2.7/lib2to3/fixes/fix_unicode.pyt transforms" &=
(t__name__t
__module__tTruet
BM_compatibletPATTERNRR(((s//sys/lib/python2.7/lib2to3/fixes/fix_unicode.pyRs N(t__doc__tpgen2RtRR
tBaseFixR(((s//sys/lib/python2.7/lib2to3/fixes/fix_unicode.pyt<module> s
|