3
.ßL]¢  ã               @   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-2019 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            O   @   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ed…ƒZ d€d�„ Z!d‚dƒ„ Z"d„S )†r   z]
    For SourcePawn source code with preprocessor directives.

    .. versionadded:: 1.6
    Z
SourcePawnÚspz*.spztext/x-sourcepawnz(?:\s|//.*?\n|/\*.*?\*/)+z\s*(?:/[*].*?[*]/\s*)*z^#if\s+0Úif0z^#Úmacroú^z#if\s+0ú#z\nz\s+z\\\nz/(\\\n)?/(\n|(.|\n)*?[^\\]\n)z/(\\\n)?\*(.|\n)*?\*(\\\n)?/z[{}]zL?"Ústringz4L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'z'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*z(\d+\.\d*|\.\d+|\d+[fF])[fF]?z0x[0-9a-fA-F]+[LlUu]*z0[0-7]+[LlUu]*z
\d+[LlUu]*z\*/z[~!%^&*+=|?:<>/-]z[()\[\],.;]zs(case|const|continue|native|default|else|enum|for|if|new|operator|public|return|sizeof|static|decl|struct|switch)\bz(bool|Float)\bz(true|false)\bz[a-zA-Z_]\w*ú"z#popz/\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})z	[^\\"\n]+z\\z[^/\n]+z/\*(.|\n)*?\*/z//.*?\nú/z	(?<=\\)\nz^\s*#if.*?(?<!\\)\nz#pushz^\s*#endif.*?(?<!\\)\nz.*?\n)Úrootr   r   r   ÚActionÚboolÚFloatÚPluginr   ÚanyÚ	AdminFlagÚOverrideTypeÚOverrideRuleÚImmunityTypeÚGroupIdÚAdminIdÚAdmAccessModeÚAdminCachePartÚCookieAccessÚ
CookieMenuÚCookieMenuActionÚNetFlowÚConVarBoundsÚQueryCookieÚReplySourceÚConVarQueryResultÚConVarQueryFinishedÚFunctionÚIdentityÚPluginStatusÚ
PluginInfoÚDBResultÚ
DBBindTypeÚ
DBPriorityÚPropTypeÚPropFieldTypeÚMoveTypeÚ
RenderModeÚRenderFxÚEventHookModeÚ	EventHookÚFileTypeÚFileTimeModeÚPathTypeÚ	ParamTypeÚExecTypeÚ
DialogTypeÚHandleÚKvDataTypesÚNominateResultÚ	MapChangeÚ	MenuStyleÚ
MenuActionÚ
MenuSourceÚ
RegexErrorÚSDKCallTypeÚ
SDKLibraryÚSDKFuncConfSourceÚSDKTypeÚSDKPassMethodÚRayTypeÚTraceEntityFilterÚListenOverrideÚ	SortOrderÚSortTypeÚ
SortFunc2DÚAPLResÚFeatureTypeÚFeatureStatusÚ	SMCResultÚSMCErrorÚTFClassTypeÚTFTeamÚTFCondÚTFResourceTypeÚTimerÚTopMenuActionÚTopMenuObjectTypeÚTopMenuPositionÚTopMenuObjectÚUserMsgc             K   sF   t |ddƒ| _tƒ | _| jr4ddlm} | jj|ƒ tj| f|Ž d S )NZ	sourcemodTr   )Ú	FUNCTIONS)	r   ÚsmhighlightingÚsetÚ
_functionsZ#pygments.lexers._sourcemod_builtinsrd   Úupdater   Ú__init__)ÚselfÚoptionsrd   © rl   ú:/tmp/pip-install-5sebvq2j/pygments/pygments/lexers/pawn.pyri   m   s    
zSourcePawnLexer.__init__c             c   s\   xVt j| |ƒD ]F\}}}|tkrH| jrH|| jkr8tj}n|| jkrHtj}|||fV  qW d S )N)	r   Úget_tokens_unprocessedr   re   ÚSM_TYPESr   ÚTyperg   ZBuiltin)rj   ÚtextÚindexÚtokenÚvaluerl   rl   rm   rn   w   s    

z&SourcePawnLexer.get_tokens_unprocessedN)Nr   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   )#Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚ_wsÚ_ws1r   ÚPreprocr   ÚSingleÚ	Multiliner
   r   ÚCharr	   r   ÚHexÚOctÚIntegerr   r   r   rp   ÚConstantr   ÚEscapeÚtokensrf   ro   ri   rn   rl   rl   rl   rm   r      s†   




                 
c               @   sv  e Zd ZdZdZdgZdd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d0e
jd1fd2e
jd'fd3e
fgd4œZd5S )6r   z:
    For Pawn source code.

    .. versionadded:: 2.0
    ZPawnZpawnz*.pz*.pwnz*.incztext/x-pawnz (?:\s|//.*?\n|/[*][\w\W]*?[*]/)+z\s*(?:/[*].*?[*]/\s*)*z^#if\s+0r   z^#r   r   z#if\s+0r   z\nz\s+z\\\nz/(\\\n)?/(\n|(.|\n)*?[^\\]\n)z/(\\\n)?\*[\w\W]*?\*(\\\n)?/z[{}]zL?"r   z4L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'z'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*z(\d+\.\d*|\.\d+|\d+[fF])[fF]?z0x[0-9a-fA-F]+[LlUu]*z0[0-7]+[LlUu]*z
\d+[LlUu]*z\*/z[~!%^&*+=|?:<>/-]z[()\[\],.;]z…(switch|case|default|const|new|static|char|continue|break|if|else|for|while|do|operator|enum|public|return|sizeof|tagof|state|goto)\bz(bool|Float)\bz(true|false)\bz[a-zA-Z_]\w*r   z#popz/\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})z	[^\\"\n]+z\\z[^/\n]+z/\*(.|\n)*?\*/z//.*?\nr   z	(?<=\\)\nz^\s*#if.*?(?<!\\)\nz#pushz^\s*#endif.*?(?<!\\)\nz.*?\n)r   r   r   r   N)ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r€   r�   r
   r   r‚   r	   r   rƒ   r„   r…   r   r   r   rp   r†   r   r‡   rˆ   rl   rl   rl   rm   r   ƒ   s\   





N)rx   Zpygments.lexerr   Zpygments.tokenr   r   r   r   r   r   r	   r
   r   Zpygments.utilr   Ú__all__r   r   rl   rl   rl   rm   Ú<module>
   s   ,o