File: //opt/alt/python311/lib/python3.11/site-packages/pygments/lexers/__pycache__/pawn.cpython-311.pyc
�
�;f= � � � d Z ddlmZ ddlmZmZmZmZmZm Z m
Z
mZ ddlm
Z
ddgZ G d� de� � Z G d� de� � Zd S )
z�
pygments.lexers.pawn
~~~~~~~~~~~~~~~~~~~~
Lexers for the Pawn languages.
:copyright: Copyright 2006-2024 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 �J � e Zd ZdZdZdgZdgZdgZdZdZ dZ
d Zd
ej
dfdej
d
fdez dz ej
dfdez dz ej
d
fdefdefdefdej fdej fdefdedfdej fdej fdej fdej fdej fdej fdefd efd!efd"ej fd#ej fd$efgd%ed&fd'ej fd(efdefd)efgd*ej
fd+ej fd,ej d&fd-ej
fd.ej
fdej
d&fgd/ej
d0fd1ej
d&fd2efgd3�Zh d4�Z d5� Z!d6� Z"d7S )8r
zB
For SourcePawn source code with preprocessor directives.
�
SourcePawn�spz*.spztext/x-sourcepawnz+https://github.com/alliedmodders/sourcepawnz1.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?"�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]+�/\*(.|\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 |dd� � | _ t � � | _ | j r ddlm} | j � |� � t j | fi |�� d S )N� sourcemodTr )� FUNCTIONS) r �smhighlighting�set�
_functions�#pygments.lexers._sourcemod_builtinsr� �updater �__init__)�self�optionsr� s �G/opt/alt/python311/lib/python3.11/site-packages/pygments/lexers/pawn.pyr� zSourcePawnLexer.__init__k sz � �*�7�+6��>� >��� �%�%����� .�E�E�E�E�E�E��O�"�"�9�-�-�-���D�,�,�G�,�,�,�,�,� c # �� K � t j | |� � D ]H\ }}}|t u r2| j r+|| j v r
t
j }n|| j v rt j }|||fV � �Id S )N) r �get_tokens_unprocessedr r� �SM_TYPESr �Typer� �Builtin)r� �text�index�token�values r� r� z&SourcePawnLexer.get_tokens_unprocessedu s� � � � ��1�$��=�=� &� &��E�5�%���}�}��&� -���
�-�-� '�����$�/�1�1� $������%�%�%�%�%� &� &r� N)#�__name__�
__module__�__qualname__�__doc__�name�aliases� filenames� mimetypes�url�
version_added�_ws�_ws1r �Preprocr �Single� Multiliner r �Charr
r>