3

V'ícÒã@spdZddlmZddlmZmZmZmZmZm	Z	m
Z
mZddlm
Z
ddgZGdd„deƒZGdd„deƒZd	S)
    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Ú	PawnLexercN@seZdZdZdZdgZdgZdgZdZdZ	de
jd	fd
e
jdfde	d
e
jd	fde	de
jdfdefdefdefde
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
fgd1œZd2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdId2dJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~hNZdd€„Zdd‚„Z dƒS)„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)ÚrootrrrÚActionÚboolÚFloatZPluginrÚanyZ	AdminFlagZOverrideTypeZOverrideRuleZImmunityTypeZGroupIdZAdminIdZ
AdmAccessModeZAdminCachePartZCookieAccessZ
CookieMenuZCookieMenuActionZNetFlowZConVarBoundsZQueryCookieZReplySourceZConVarQueryResultZConVarQueryFinishedZFunctionZIdentityZPluginStatusZ
PluginInfoZDBResultZ
DBBindTypeZ
DBPriorityZPropTypeZ
PropFieldTypeZMoveTypeZ
RenderModeZRenderFxZ
EventHookModeZ	EventHookÚFileTypeZFileTimeModeZPathTypeZ	ParamTypeZExecTypeZ
DialogTypeÚHandleZKvDataTypesZNominateResultZ	MapChangeZ	MenuStyleZ
MenuActionZ
MenuSourceZ
RegexErrorZSDKCallTypeZ
SDKLibraryZSDKFuncConfSourceZSDKTypeZ
SDKPassMethodZRayTypeZTraceEntityFilterZListenOverrideZ	SortOrderZSortTypeZ
SortFunc2DZAPLResZFeatureTypeZ
FeatureStatusZ	SMCResultZSMCErrorZTFClassTypeZTFTeamZTFCondZTFResourceTypeÚTimerZ
TopMenuActionZTopMenuObjectTypeZTopMenuPositionZ
TopMenuObjectZUserMsgcKsFt|ddƒ|_tƒ|_|jr4ddlm}|jj|ƒtj|f|ŽdS)NZ	sourcemodTr)Ú	FUNCTIONS)	rÚsmhighlightingÚsetÚ
_functionsZ#pygments.lexers._sourcemod_builtinsrÚupdaterÚ__init__)ÚselfÚoptionsr©r&ú8/tmp/pip-build-gk9425m9/Pygments/pygments/lexers/pawn.pyr#ks
zSourcePawnLexer.__init__ccs\xVtj||ƒD]F\}}}|tkrH|jrH||jkr8tj}n||jkrHtj}|||fVqWdS)N)	rÚget_tokens_unprocessedrrÚSM_TYPESrÚTyper!ZBuiltin)r$ÚtextÚindexÚtokenÚvaluer&r&r'r(us

z&SourcePawnLexer.get_tokens_unprocessedN)!Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚ_wsÚ_ws1rÚPreprocrÚSingleÚ	Multiliner
rÚCharr	rÚHexÚOctÚIntegerrrr*ÚConstantrÚEscapeÚtokensr)r#r(r&r&r&r'rs„









c@sxeZdZdZdZdgZdddgZdgZdZd	Z	d
e
jdfde
jd
fde	de
jdfde	de
jd
fdefdefdefde
j
fde
jfdefdedfdejfdejfdejfdejfdejfdejfdefd efd!efd"ejfd#ejfd$efgd%ed&fd'ejfd(efdefd)efgd*e
jfd+e
jfd,e
j
d&fd-e
jfd.e
jfde
jd&fgd/e
jd0fd1e
jd&fd2e
fgd3œZd4d5„Zd6S)7r
z:
    For Pawn source code.

    .. versionadded:: 2.0
    ZPawnZpawnz*.pz*.pwnz*.incztext/x-pawnz (?:\s|//.*?\n|/[*][\w\W]*?[*]/)+z\s*(?:/[*].*?[*]/\s*)*z^#if\s+0rz^#rrz#if\s+0rz\nz\s+z\\\nz/(\\\n)?/(\n|(.|\n)*?[^\\]\n)z/(\\\n)?\*[\w\W]*?\*(\\\n)?/z[{}]zL?"rz4L?'(\\.|\\[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[()\[\],.;]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*rz#popz/\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})z	[^\\"\n]+z\\z[^/\n]+z/\*(.|\n)*?\*/z//.*?\nrz	(?<=\\)\nz^\s*#if.*?(?<!\\)\nz#pushz^\s*#endif.*?(?<!\\)\nz.*?\n)rrrrcCsd|krdSdS)zvThis is basically C. There is a keyword which doesn't exist in C
        though and is nearly unique to this language.Ztagofg{®Gáz„?Nr&)r+r&r&r'Úanalyse_textÆszPawnLexer.analyse_textN)r/r0r1r2r3r4r5r6r7r8rr9rr:r;r
rr<r	rr=r>r?rrr*r@rrArBrCr&r&r&r'r
s\





N)r2Zpygments.lexerrZpygments.tokenrrrrrrr	r
Z
pygments.utilrÚ__all__rr
r&r&r&r'Ú<module>	s(n