î
i fB ã @ sS d Z d d l m Z d d l m Z d d l m Z Gd d „ d e j ƒ Z d S)z©Fixer that changes 'a ,b' into 'a, b'.
This also changes '{a :b}' into '{a: b}', but does not touch other
uses of colons. It does not touch other uses of whitespace.
é )Úpytree)Útoken)Ú
fixer_basec @ s^ e Z d Z d Z d Z e j e j d ƒ Z e j e j d ƒ Z e e f Z
d d „ Z d S)Ú
FixWsCommaTzH
any<(not(',') any)+ ',' ((not(',') any)+ ',')* [not(',') any]>
ú,ú:c C s™ | j ƒ } d } x€ | j D]u } | | j k rg | j } | j ƒ r^ d | k r^ d | _ n d } q | r‹ | j } | s‹ d | _ q‹ n d } q W| S)NFÚ
Ú Tú )ZcloneZchildrenÚSEPSÚprefixÚisspace)ÚselfZnodeZresultsÚnewZcommaZchildr © r ú?/opt/alt/python34/lib64/python3.4/lib2to3/fixes/fix_ws_comma.pyÚ transform s
zFixWsComma.transformN)Ú__name__Ú
__module__Ú__qualname__ZexplicitZPATTERNr ZLeafr ÚCOMMAÚCOLONr r r r r r r s r N)Ú__doc__r r Zpgen2r r ZBaseFixr r r r r Ú