3
V'ícÒ ã @ sp d Z ddlmZ ddlmZmZmZmZmZm Z m
Z
mZ ddlm
Z
ddgZG dd deZG dd deZd S )
zË
pygments.lexers.pawn
~~~~~~~~~~~~~~~~~~~~
Lexers for the Pawn languages.
:copyright: Copyright 2006-2022 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 N @ s e Zd ZdZdZdgZdgZdgZdZdZ de
jd fd
e
jdfde d
e
jd fde d e
jdfdefdefdefde
j
fde
jfdefdedfdejfdejfdejfdejfdejfdejfdefdefdefd ejfd!ejfd"efgd#ed$fd%ejfd&efdefd'efgd(e
jfd)e
jfd*e
j
d$fd+e
jfd,e
jfde
jd$fgd-e
jd.fd/e
jd$fd0e
fgd1Zd2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdId2dJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~hNZdd Zdd Z dS )r z]
For SourcePawn source code with preprocessor directives.
.. versionadded:: 1.6
Z
SourcePawnÚspz*.spztext/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[{}]zL?"Ú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]?z0x[0-9a-fA-F]+[LlUu]*z0[0-7]+[LlUu]*z
\d+[LlUu]*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ÚFloatZPluginr ÚanyZ AdminFlagZOverrideTypeZOverrideRuleZImmunityTypeZGroupIdZAdminIdZ
AdmAccessModeZAdminCachePartZCookieAccessZ
CookieMenuZCookieMenuActionZNetFlowZConVarBoundsZQueryCookieZReplySourceZConVarQueryResultZConVarQueryFinishedZFunctionZIdentityZPluginStatusZ
PluginInfoZDBResultZ
DBBindTypeZ
DBPriorityZPropTypeZ
PropFieldTypeZMoveTypeZ
RenderModeZRenderFxZ
EventHookModeZ EventHookÚFileTypeZFileTimeModeZPathTypeZ ParamTypeZExecTypeZ
DialogTypeÚHandleZKvDataTypesZNominateResultZ MapChangeZ MenuStyleZ
MenuActionZ
MenuSourceZ
RegexErrorZSDKCallTypeZ
SDKLibraryZSDKFuncConfSourceZSDKTypeZ
SDKPassMethodZRayTypeZTraceEntityFilterZListenOverrideZ SortOrderZSortTypeZ
SortFunc2DZAPLResZFeatureTypeZ
FeatureStatusZ SMCResultZSMCErrorZTFClassTypeZTFTeamZTFCondZTFResourceTypeÚTimerZ
TopMenuActionZTopMenuObjectTypeZTopMenuPositionZ
TopMenuObjectZUserMsgc K sF t |dd| _t | _| jr4ddlm} | jj| tj| f| d S )NZ sourcemodTr )Ú FUNCTIONS) r ÚsmhighlightingÚsetÚ
_functionsZ#pygments.lexers._sourcemod_builtinsr Úupdater Ú__init__)ÚselfÚoptionsr © r&