
    cq                     $   d Z ddlZddlmZmZ  ej        d          d             Z ej        d          d             Z ej        d	                     ej
                     ej                    g                    Z ej        d          ZdS )	zRA module to ease code analysis

This module is here to help source code analysis.
    N)codeanalyzeutils   c                 "   t          j        |           }t          |           D ]o\  }}}| |         dk    r	d||z
  z  }n;d|                    dd                                          v rd}ndd||z
  dz
  z  z  }||                    |||           p|                                p| } t          j        |           }d	}t                              |           D ]b}|	                                }|
                                }	|	d
v r|dz  }|	dv r|dz  }|	dk    r |d	k    r|                    ||dz   d           c|                                p| } |                     dd                              dd                              dd          S )a7  Simplify `source` for analysis

    It replaces:

    * comments with spaces
    * strs with a new str filled with spaces
    * implicit and explicit continuations with spaces
    * tabs and semicolons with spaces

    The resulting code is a lot easier to analyze if we are interested
    only in offsets.
    # fprefix Nz"%s"   r   z({[   z)}]
z\
z  	;)r   ChangeCollectorignored_regionsgetlower
add_changeget_changed_parensfinditerstartgroupreplace)
source	collectorr   endmatchgroupsreplacementparensmatchics
             2lib/python3.11/site-packages/rope/base/simplify.py	real_coder&   
   s    +F33I#26#:#: : :sK%=C 	=u-KKKOOHb1177999 	=KK C3;?$;<K 	:  [999""$$.F+F33IF!!&)) 0 0KKMMKKMM: 	aKF: 	aKF9 	0! 	0  AE3///""$$.F>>&$''//c::BB3MMM    c                 J    d t                               |           D             S )z<Return ignored regions like strings and comments in `source`c                     g | ]=}|                                 |                                |                                f>S  )r   r   	groupdict).0r"   s     r%   
<listcomp>z#ignored_regions.<locals>.<listcomp>5   sI        
		U__%6%67  r'   )_strr   )r   s    r%   r   r   2   s/     ]]6**   r'   |z[\({\[\]}\)\n])__doc__re	rope.baser   r   cachedr&   r   compilejoinget_comment_patternget_any_string_patternr.   r   r*   r'   r%   <module>r8      s     
			 ( ( ( ( ( ( ( ( a$N $N $NN a   rzHH+K+--.K.00	
   "*&
'
'r'   