a
    êÑT_U  ã                   @   st   d Z ddlmZ ddlmZmZmZmZmZm	Z	m
Z
mZmZ ddlmZ ddgZG dd„ deƒZG dd„ deƒZd	S )
zË
    pygments.lexers.pawn
    ~~~~~~~~~~~~~~~~~~~~

    Lexers for the Pawn languages.

    :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    )Ú
RegexLexer)	ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚError)Úget_bool_optÚSourcePawnLexerÚ	PawnLexerc                   @   sŠ  e Zd ZdZdZdgZdgZdgZdZdZ	de
jd	fd
e
jdfde	 d e
jd	fde	 d e
jdfdefdefdefde
jfde
jfdefdedfdejfdejfdejfdejfdejfdejfdefdefdefd efd!ejfd"ejfd#efgd$ed%fd&ejfd'efdefd(efgd)e
jfd*e
jfd+e
jd%fd,e
jfd-e
jfde
jd%fgd.e
jd/fd0e
jd%fd1e
fgd2œZh d3£Zd4d5„ Z d6d7„ Z!d8S )9r   z]
    For SourcePawn source code with preprocessor directives.

    .. versionadded:: 1.6
    Z
SourcePawnZspz*.spztext/x-sourcepawnz(?:\s|//.*?\n|/\*.*?\*/)+ú\s*(?:/[*].*?[*]/\s*)*ú^#if\s+0Úif0ú^#Úmacroú^ú#if\s+0ú#ú\nú\s+ú\\\nú/(\\\n)?/(\n|(.|\n)*?[^\\]\n)z/(\\\n)?\*(.|\n)*?\*(\\\n)?/ú[{}]úL?"Ústringú4L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'ú'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*ú(\d+\.\d*|\.\d+|\d+[fF])[fF]?ú0x[0-9a-fA-F]+[LlUu]*ú0[0-7]+[LlUu]*ú
\d+[LlUu]*ú\*/ú[~!%^&*+=|?:<>/-]ú[()\[\],.;]zs(case|const|continue|native|default|else|enum|for|if|new|operator|public|return|sizeof|static|decl|struct|switch)\bú(bool|Float)\bú(true|false)\bú[a-zA-Z_]\w*ú"ú#popú/\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})ú	[^\\"\n]+ú\\ú[^/\n]+ú/\*(.|\n)*?\*/ú//.*?\nú/ú	(?<=\\)\nú^\s*#if.*?(?<!\\)\nú#pushú^\s*#endif.*?(?<!\\)\nú.*?\n©Úrootr   r   r   >M   ZSDKCallTypeZ
SortFunc2DZConVarQueryFinishedZTraceEntityFilterZOverrideRuleZTopMenuObjectZSMCErrorZConVarBoundsZKvDataTypesZRayTypeZFileTypeZTopMenuActionZAdminCachePartZ
CookieMenuZAdminIdZOverrideTypeZQueryCookieZ	AdminFlagÚboolZNominateResultZFeatureStatusZ	MenuStyleZTFCondZPropFieldTypeZPluginStatusZ	MapChangeZEventHookModeZTopMenuObjectTypeZ
MenuActionZ	SMCResultZSDKFuncConfSourceZListenOverrideZExecTypeZ	SortOrderr   ZHandleZSortTypeZFunctionZGroupIdZTFClassTypeZPropTypeZFeatureTypeZIdentityZUserMsgZConVarQueryResultZ	ParamTypeZFileTimeModeZRenderFxZ
SDKLibraryZ
DBPriorityZNetFlowZ
RegexErrorZAdmAccessModeZCookieMenuActionZTFTeamZSDKTypeZAPLResÚanyZ
DialogTypeZTFResourceTypeZ
DBBindTypeZ	EventHookZImmunityTypeZ
MenuSourceZTimerÚFloatZ
RenderModeZReplySourceZTopMenuPositionZDBResultZMoveTypeZCookieAccessZPathTypeZActionZSDKPassMethodZPluginZ
PluginInfoc                 K   sJ   t |ddƒ| _tƒ | _| jr4ddlm} | j |¡ tj| fi |¤Ž d S )NZ	sourcemodTr   )Ú	FUNCTIONS)	r   ÚsmhighlightingÚsetÚ
_functionsZ#pygments.lexers._sourcemod_builtinsr=   Úupdater   Ú__init__)ÚselfZoptionsr=   © rD   ú6/usr/lib/python3/dist-packages/pygments/lexers/pawn.pyrB   m   s    ÿzSourcePawnLexer.__init__c                 c   sX   t  | |¡D ]F\}}}|tu rF| jrF|| jv r6tj}n|| jv rFtj}|||fV  qd S )N)	r   Úget_tokens_unprocessedr   r>   ÚSM_TYPESr   ÚTyper@   ZBuiltin)rC   ÚtextÚindexÚtokenÚvaluerD   rD   rE   rF   w   s    
ÿ

z&SourcePawnLexer.get_tokens_unprocessedN)"Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚ_wsÚ_ws1r   ÚPreprocr   ÚSingleÚ	Multiliner
   r   ÚCharr	   r<   ÚHexÚOctÚIntegerr   r   r   rH   ÚConstantr   ÚEscapeÚtokensrG   rB   rF   rD   rD   rD   rE   r      sn   

þäû

ú	

ýÒ5
c                   @   st  e Zd ZdZdZdgZg d¢ZdgZdZdZ	de
jd	fd
e
jdfde	 d e
jd	fde	 d e
jdfdefdefdefde
jfde
jfdefdedfdejfdejfdejfdejfdejfdejfdefdefdefd efd!ejfd"ejfd#efgd$ed%fd&ejfd'efdefd(efgd)e
jfd*e
jfd+e
jd%fd,e
jfd-e
jfde
jd%fgd.e
jd/fd0e
jd%fd1e
fgd2œZd3S )4r   z:
    For Pawn source code.

    .. versionadded:: 2.0
    ZPawnZpawn)z*.pz*.pwnz*.incztext/x-pawnz (?:\s|//.*?\n|/[*][\w\W]*?[*]/)+r   r   r   r   r   r   r   r   r   r   r   r   z/(\\\n)?\*[\w\W]*?\*(\\\n)?/r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   z…(switch|case|default|const|new|static|char|continue|break|if|else|for|while|do|operator|enum|public|return|sizeof|tagof|state|goto)\br'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   N)rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   r   rW   r   rX   rY   r
   r   rZ   r	   r<   r[   r\   r]   r   r   r   rH   r^   r   r_   r`   rD   rD   rD   rE   r   ƒ   sh   

þäû

ú	

ýÒN)rP   Zpygments.lexerr   Zpygments.tokenr   r   r   r   r   r   r	   r
   r   Zpygments.utilr   Ú__all__r   r   rD   rD   rD   rE   Ú<module>   s   
,o