o
    Td                     @   s   zd dl mZ W n ey   dZeew d dlZd dlmZ d dlm	Z	 d dl
mZ d dlmZmZmZmZ d dlmZmZmZmZmZmZmZ d d	lmZ G d
d deZdd ZdS )    )DefaultStylez0Please install pygments to see highlighted dumpsN)
ManniStyle)MonokaiStyle)NativeStyle)
RegexLexerincludebygroupswords)TextNameStringPunctuationKeywordOperatorNumber)Stylec                   @   s   e Zd ZdZdZdgZdgZdZdZde	e
ejefdefed	ed
eejfed e	ejefed e	ejefeejfdefdefdefgeddde
fgdefgdZdS )NumbaIRLexerzL
    Pygments style lexer for Numba IR (for use with highlighting etc).
    Numba_IRnumba_irz
*.numba_irz\$[a-zA-Z0-9._]+z([a-zA-Z_]+[a-zA-Z0-9]*)z(label)(\ [0-9]+)(:)$z = 
whitespacekeywordz(\()z(\=)z[0-9]+z	<[^>\n]*>z[=<>{}\[\]()*.,!\':]|x\b)deljumpcallbranch )suffixz(\n|\s))rootr   r   N)__name__
__module____qualname____doc__namealiases	filenames
identifier
fun_or_varr   r   r   Labelr   r   r   VariableFunction	AttributeConstantr   r   r	   r
   tokens r-   r-   h/home/ncw/WWW/www-new/content/articles/pi-bbp/venv/lib/python3.10/site-packages/numba/misc/dump_style.pyr      sD    


r   c                  C   sJ   t j } | tjdi tdtfd| i}|tt	t
t d}|tjjj S )z\
    Get appropriate style for highlighting according to
    NUMBA_COLOR_SCHEME setting
    z#888888CustomDefaultStylestyles)no_colordark_bglight_bgblue_bg
jupyter_nb)r   r0   copyupdater   r(   typer   r   r   r   numbacoreconfigCOLOR_SCHEME)r0   custom_default	style_mapr-   r-   r.   by_colorschemeA   s   
r?   )pygments.styles.defaultr   ImportErrormsgnumba.core.configr9   pygments.styles.mannir   pygments.styles.monokair   pygments.styles.nativer   pygments.lexerr   r   r   r	   pygments.tokenr
   r   r   r   r   r   r   pygments.styler   r   r?   r-   r-   r-   r.   <module>   s    $.