
    Kwgl                        d Z dZdZ ddlZd Zg dZdZdZ eed	d
      dz    eed	d      z   ZdZdj                  ej                               Z eed	d
      dz    eed	d      z   Z
dZedz   dj                  e      z   dz   ez   Zedz   ez   dz   e
z   dz   ez   Z ej                  e      ZdZ ej                  e      ZddZd Zy)z3.3.0a|  
Module to analyze Python source code; for syntax coloring tools.

Interface::

    tags = fontify(pytext, searchfrom, searchto)

 - The 'pytext' argument is a string containing Python source code.
 - The (optional) arguments 'searchfrom' and 'searchto' may contain a slice in pytext.
 - The returned value is a list of tuples, formatted like this::
    [('keyword', 0, 6, None), ('keyword', 11, 17, None), ('comment', 23, 53, None), etc. ]

 - The tuple contents are always like this::
    (tag, startindex, endindex, sublist)

 - tag is one of 'keyword', 'string', 'comment' or 'identifier'
 - sublist is not used, hence always None.
z0.4    Nc                 B    |j                  | j                  |            S N)joinsplit)srcsepreps      N/var/www/horilla/myenv/lib/python3.12/site-packages/reportlab/lib/PyFontify.pyreplacer   (   s    88CIIcN##    )asassertexecdelfromlambdareturnandelifglobalnottrybreakelseiforwhileclassexceptimportpasscontinuefinallyinprintdefforisraiseyieldwithz#[^\n]*z$q[^\\q\n]*(\\[\000-\377][^\\q\n]*)*qq'|"a  
    qqq
    [^\\q]*
    (
        (   \\[\000-\377]
        |   q
            (   \\[\000-\377]
            |   [^\q]
            |   q
                (   \\[\000-\377]
                |   [^\\q]
                )
            )
        )
        [^\\q]*
    )*
    qqq
 z(^|[^a-zA-Z0-9_.\"'])()z[ 	]*[A-Za-z_][A-Za-z_0-9.]*c                 X   |t        |       }t        j                  }t        j                  }g }|j                  }d}d}d}	d}
d}|}	  || |      }|	 |S |j                         }||k\  r	 |S |j                  d      }|t        |      z   }|d   }|dvrv||k7  r|dd }|dz   }n|d d }|dz
  } ||	||d f       |d	v rj || |      }|_|j                         }||k(  rJ|j                  d      }|t        |      z   } ||
||d f       n|d
k(  r ||||d f       n ||||d f       )Ncommentstringkeyword
identifierr      z#'")r&   r   #)lenmatchREsearchidREappendstartgroup)pytext
searchfromsearchtor=   idSearchtagstags_append
commentTag	stringTag
keywordTagidentifierTagr@   endmmatchcs                   r
   fontifyrP   d   s   v;^^F{{HD++KJIJ ME
C
639B KA 	H< K; 
c%j !HF?
"a	 cr
'CUC67 ((VS)=GGIE| !
#c%j0#]E3$EF#XUC67E356G r   c           	          t        |       }|j                         }|j                          t        |      }|D ]  \  }}}}t	        |t        |||              ! y r   )openreadcloserP   r%   repr)pathftextrF   tagr@   rL   sublists           r
   testr[      sU    T
A668DGGI4=D$( * UCc4U3()*r   )r   N)__version____doc__rer   keywordsList
commentPatpatquotePatr   r   tripleQuotePat	nonKeyPatkeyPatmatchPatcompiler<   idKeyPatr>   rP   r[    r   r
   <module>rj      s   	>  	$
 
-3S!C''#sC*@@$ 	ggciikc3'#-S#0FF %		S388L1	1C	7)	Cf$s*^;cAHL
"**X
*rzz(4n*r   