a
    .;b                     @   s   zd dl mZ W n ey.   dZeeY n0 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).
    ZNumba_IRZ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)delZjumpZcallbranch )suffixz(\n|\s))rootr   r   N)__name__
__module____qualname____doc__namealiases	filenamesZ
identifierZ
fun_or_varr   r   r   ZLabelr   r   r   VariableZFunctionZ	AttributeZConstantr   r   r	   r
   tokens r#   r#   4lib/python3.9/site-packages/numba/misc/dump_style.pyr      sB   

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#888888ZCustomDefaultStylestyles)Zno_colorZdark_bgZlight_bgZblue_bgZ
jupyter_nb)r   r%   copyupdater   r!   typer   r   r   r   numbaZcoreZconfigZCOLOR_SCHEME)r%   Zcustom_defaultZ	style_mapr#   r#   r$   by_colorschemeA   s    
r*   )Zpygments.styles.defaultr   ImportErrormsgZnumba.core.configr)   Zpygments.styles.mannir   Zpygments.styles.monokair   Zpygments.styles.nativer   Zpygments.lexerr   r   r   r	   Zpygments.tokenr
   r   r   r   r   r   r   Zpygments.styler   r   r*   r#   r#   r#   r$   <module>   s   $.