a
    ñ»j@   ã                   @   sp   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 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-present by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    )Ú
RegexLexer)ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuation)Ú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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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d0fd1ejd&fd2efgd3œZh d4£Z d5d6„ Z!d7d8„ Z"d9S ):r   zB
    For SourcePawn source code with preprocessor directives.
    Ú
SourcePawnÚspz*.spztext/x-sourcepawnz+https://github.com/alliedmodders/sourcepawnz1.6z(?:\s|//.*?\n|/\*.*?\*/)+ú\s*(?:/[*].*?[*]/\s*)*ú^#if\s+0Úif0ú^#Úmacroú^ú#if\s+0ú#ú\nú\s+ú\\\nú/(\\\n)?/(\n|[\s\S]*?[^\\]\n)z/(\\\n)?\*[\s\S]*?\*(\\\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]+ú/\*[\s\S]*?\*/ú//.*?\nú/ú	(?<=\\)\nú^\s*#if.*?(?<!\\)\nú#pushú^\s*#endif.*?(?<!\\)\nú.*?\n©Úrootr   r   r   >M   ZTopMenuObjectTypeZPropTypeZ	MenuStyleZEventHookModeZUserMsgZ
DialogTypeZRenderFxZIdentityZ
RenderModeZExecTypeZTopMenuObjectZAdmAccessModeZPathTypeZImmunityTypeZTFClassTypeZCookieMenuActionÚTimerZ
DBBindTypeÚanyZOverrideTypeZMoveTypeZRayTypeÚFileTypeZFileTimeModeZ	MapChangeZ	ParamTypeZSDKTyper   Z
MenuSourceZ
PluginInfoZ
RegexErrorZ
DBPriorityZSortTypeZ
SDKLibraryÚboolZKvDataTypesZSDKPassMethodZSDKFuncConfSourceZTraceEntityFilterÚFloatZConVarQueryResultZAdminCachePartZCookieAccessZFeatureTypeZTopMenuActionZQueryCookieZConVarQueryFinishedZSDKCallTypeZTFTeamZConVarBoundsZAdminIdZ	SMCResultZNominateResultZPluginZGroupIdZDBResultZPluginStatusZ
CookieMenuZFeatureStatusZNetFlowZActionZ	EventHookZOverrideRuleZ	AdminFlagZTopMenuPositionZTFResourceTypeZPropFieldTypeZReplySourceZ	SortOrderÚFunctionZListenOverrideZTFCondZ
MenuActionÚHandleZ
SortFunc2DZAPLResZSMCErrorc                 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_builtinsrA   Úupdater   Ú__init__)ÚselfÚoptionsrA   © rI   ú:E:\soccer\ml_env\Lib\site-packages\pygments/lexers/pawn.pyrF   k   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   rB   ÚSM_TYPESr   ÚTyperD   ÚBuiltin)rG   ÚtextÚindexÚtokenÚvaluerI   rI   rJ   rK   u   s    
ÿ

z&SourcePawnLexer.get_tokens_unprocessedN)#Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚurlÚversion_addedÚ_wsÚ_ws1r   ÚPreprocr   ÚSingleÚ	Multiliner
   r   ÚCharr	   r>   ÚHexÚOctÚIntegerr   r   rM   ÚConstantr   ÚEscapeÚtokensrL   rF   rK   rI   rI   rI   rJ   r      sp   

þåû

ú	

ýÓ4
c                   @   s~  e Zd ZdZdZdgZg d¢ZdgZdZd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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d0fd1ejd&fd2efgd3œZd4d5„ Z d6S )7r   z
    For Pawn source code.
    ÚPawnÚpawn)z*.pz*.pwnz*.incztext/x-pawnz(https://www.compuphase.com/pawn/pawn.htmz2.0z (?:\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&   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   c                 C   s   d| v rdS dS )zvThis is basically C. There is a keyword which doesn't exist in C
        though and is nearly unique to this language.Ztagofg{®Gáz„?NrI   )rO   rI   rI   rJ   Úanalyse_textÆ   s    zPawnLexer.analyse_textN)!rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r   r_   r   r`   ra   r
   r   rb   r	   r>   rc   rd   re   r   r   rM   rf   r   rg   rh   rk   rI   rI   rI   rJ   r   �   sl   

þåû

ú	

ýÓ4N)rV   Zpygments.lexerr   Zpygments.tokenr   r   r   r   r   r   r	   r
   Zpygments.utilr   Ú__all__r   r   rI   rI   rI   rJ   Ú<module>   s   
(n