K i= |dZddlmZddlmZmZmZmZmZm Z m Z m Z ddl m Z ddgZGddeZGddeZy ) 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)TextCommentOperatorKeywordNameStringNumber Punctuation) get_bool_optSourcePawnLexer PawnLexerc.eZdZdZdZdgZdgZdgZdZdZ dZ d Z d e jd fd e jd fde zdze jd fde zdze jd fdefdefdefde jfde j fdefdedfdej&fdej*fdej*fdej,fdej.fdej0fdefd efd!efd"ej6fd#ej8fd$efgd%ed&fd'ej<fd(efdefd)efgd*e jfd+e j fd,e jd&fd-e jfd.e jfde jd&fgd/e jd0fd1e jd&fd2e fgd3Zhd4Z d5Z!d6Z"y7)8r zB For SourcePawn source code with preprocessor directives. SourcePawnspz*.spztext/x-sourcepawnz+https://github.com/alliedmodders/sourcepawnz1.6z(?:\s|//.*?\n|/\*.*?\*/)+\s*(?:/[*].*?[*]/\s*)*^#if\s+0if0^#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.*?(?ManyboolFloatTimerAPLResActionHandlePluginr TFCondTFTeamAdminIdGroupIdNetFlowRayTypeSDKTypeUserMsgDBResultExecTypeFileTypeFunctionIdentityMoveTypePathTypePropTypeRenderFxSMCErrorSortType 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 TopMenuObjectAdminCachePartListenOverrideNominateResultTFResourceTypeTopMenuPositionCookieMenuActionConVarQueryResultSDKFuncConfSourceTopMenuObjectTypeTraceEntityFilterConVarQueryFinishedc t|dd|_t|_|jr!ddlm}|jj |tj|fi|y)N sourcemodTr) FUNCTIONS) r smhighlightingset _functions#pygments.lexers._sourcemod_builtinsrupdater__init__)selfoptionsrs Z/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pygments/lexers/pawn.pyrzSourcePawnLexer.__init__ksR*7+6>%    E OO " "9 -D,G,c#Ktj||D]^\}}}|turI|jr=||jvrt j }n||jvrtj}|||f`yw)N) rget_tokens_unprocessedrrSM_TYPESrTyperBuiltin)rtextindextokenvalues rrz&SourcePawnLexer.get_tokens_unprocessedusp11$= & E5%}&& - ' $//1 $ % % &sA9A;N)#__name__ __module__ __qualname____doc__namealiases filenames mimetypesurl version_added_ws_ws1rPreprocrSingle Multiliner r Charr r>HexOctIntegerrrrConstantrEscapetokensrrrrrr r s% DfGI$%I 7CM '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 , [ )BCJ L -  0 0 1 d #7 <66 " ? O 6 " f  FO   )  1 1 2  0 7?? # 7?? + GOOV ,  $W__g > & @ w  [2Fh?H(- &rc"eZdZdZdZdgZgdZdgZdZdZ dZ d Z d e jd fd e jd fde zdze jd fde zdze jd fdefdefdefde jfde j fdefdedfdej&fdej*fdej*fdej,fdej.fdej0fdefd efd!efd"ej6fd#ej8fd$efgd%ed&fd'ej<fd(efdefd)efgd*e jfd+e j fd,e jd&fd-e jfd.e jfde jd&fgd/e jd0fd1e jd&fd2e fgd3Zd4Z y5)6rz For Pawn source code. Pawnpawn)z*.pz*.pwnz*.incz text/x-pawnz(https://www.compuphase.com/pawn/pawn.htmz2.0z (?:\s|//.*?\n|/[*][\w\W]*?[*]/)+rrrrrrrrrrrrz/(\\\n)?\*[\w\W]*?\*(\\\n)?/rrr 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/r0r1r2r3r4r5r6r7r8r9r:cd|vryy)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)rs r analyse_textzPawnLexer.analyse_texts d? rN)!rrrrrrrrrrrrrrrrrr r rr r>rrrrrrrrrrrrrrrrs DhG)II 4CM .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  [2FhrN)rpygments.lexerrpygments.tokenrrrrrr r r pygments.utilr __all__r rrrrrsH&& k *k&jk&\I Ir