
    ,h=                      |    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e      Z G d de      Zy	)
z
    pygments.lexers.pawn
    ~~~~~~~~~~~~~~~~~~~~

    Lexers for the Pawn languages.

    :copyright: Copyright 2006-2025 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                   .   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z   dz   ej                  dfdez   dz   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j0                  fdefd efd!efd"ej6                  fd#ej8                  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 d5 Z!d6 Z"y7)8r   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|(.|\n)*?[^\\]\n)z/(\\\n)?\*(.|\n)*?\*(\\\n)?/[{}]L?"string4L?'(\\.|\\[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   anyboolFloatTimerAPLResActionHandlePluginr	   TFCondTFTeamAdminIdGroupIdNetFlowRayTypeSDKTypeUserMsgDBResultExecTypeFileTypeFunctionIdentityMoveTypePathTypePropTypeRenderFxSMCErrorSortType	AdminFlag	EventHook	MapChange	MenuStyle	ParamType	SMCResult	SortOrder
CookieMenu
DBBindType
DBPriority
DialogType
MenuAction
MenuSource
PluginInfo
RegexError
RenderMode
SDKLibrary
SortFunc2DFeatureTypeKvDataTypesQueryCookieReplySourceSDKCallTypeTFClassTypeConVarBoundsCookieAccessFileTimeModeImmunityTypeOverrideRuleOverrideTypePluginStatusAdmAccessModeEventHookModeFeatureStatusPropFieldTypeSDKPassMethodTopMenuActionTopMenuObjectAdminCachePartListenOverrideNominateResultTFResourceTypeTopMenuPositionCookieMenuActionConVarQueryResultSDKFuncConfSourceTopMenuObjectTypeTraceEntityFilterConVarQueryFinishedc                     t        |dd      | _        t               | _        | j                  r!ddlm} | j                  j                  |       t        j                  | fi | y )N	sourcemodTr   )	FUNCTIONS)	r   smhighlightingset
_functions#pygments.lexers._sourcemod_builtinsr   updater   __init__)selfoptionsr   s      V/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/pygments/lexers/pawn.pyr   zSourcePawnLexer.__init__k   sR    *7+6> %EOO""9-D,G,    c              #      K   t        j                  | |      D ]^  \  }}}|t        u rI| j                  r=|| j                  v rt
        j                  }n|| j                  v rt        j                  }|||f ` y w)N)	r   get_tokens_unprocessedr   r   SM_TYPESr   Typer   Builtin)r   textindextokenvalues        r   r   z&SourcePawnLexer.get_tokens_unprocessedu   sp     11$=	&E5%}&&- '$//1 $%%	&s   A9A;N)#__name__
__module____qualname____doc__namealiases	filenames	mimetypesurlversion_added_ws_ws1r   Preprocr   Single	Multiliner   r	   Charr
   r>   HexOctIntegerr   r   r   Constantr   Escapetokensr   r   r    r   r   r   r      s%    DfGI$%I
7CM 'C$D
 '//517??G,4Z*$goou=4Z#w8DMTNdO-w~~>,g.?.?@k"VX&DfkkR7F-v||<%vzz2

+FNN+!8,[)BCJL - 0 01d#7
< 66"?O6"fFO
 ) 1 1207??#7??+GOOV,
 $W__g>&@w
[2Fh?H(-	&r   c                   "   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z   dz   ej                  dfdez   dz   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j0                  fdefd efd!efd"ej6                  fd#ej8                  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d4 Z y5)6r   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/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   c                     d| v ryy)zvThis is basically C. There is a keyword which doesn't exist in C
        though and is nearly unique to this language.tagofg{Gz?Nr   )r   s    r   analyse_textzPawnLexer.analyse_text   s     d? r   N)!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   r   r   r   r   r   r   r   r   r   r   r   r   r      s    DhG)II
4CM .C$D
 '//517??G,4Z*$goou=4Z#w8DMTNdO-w~~>,g.?.?@k"VX&DfkkR7F-v||<%vzz2

+FNN+!8,[)9:AC - 0 01d#7
< 66"?O6"fFO
 ) 1 1207??#7??+GOOV,
 $W__g>&@w
[2Fhr   N)r   pygments.lexerr   pygments.tokenr   r   r   r   r   r	   r
   r   pygments.utilr   __all__r   r   r   r   r   <module>r      sH    &   &k
*k&j k&\I
 Ir   