YBFj@ dZddlmZddlmZmZmZmZmZm Z m Z m Z ddl m Z ddgZGddeZGddeZd S) z pygments.lexers.pawn ~~~~~~~~~~~~~~~~~~~~ Lexers for the Pawn languages. :copyright: Copyright 2006-present by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. ) RegexLexer)TextCommentOperatorKeywordNameStringNumber Punctuation) get_bool_optSourcePawnLexer PawnLexercJeZdZdZdZdgZdgZdgZdZdZ dZ d Z d e j d fd e j d fde zdze j d fde zdze j d fdefdefdefde jfde jfdefdedfdejfdejfdejfdejfdejfdejfdefd efd!efd"ejfd#ejfd$efgd%ed&fd'ejfd(efdefd)efgd*e j fd+e jfd,e jd&fd-e j fd.e j fde j d&fgd/e j d0fd1e j d&fd2e fgd3Zhd4Z d5Z!d6Z"d7S)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}|j|tj|fi|dS)N sourcemodTr) FUNCTIONS) r smhighlightingset _functions#pygments.lexers._sourcemod_builtinsrupdater__init__)selfoptionsrs BC:\PYTHON\_runtimes\venv\Lib\site-packages\pygments/lexers/pawn.pyrzSourcePawnLexer.__init__ksz*7+6>>%%   . E E E E E E O " "9 - - -D,,G,,,,,c#Ktj||D]H\}}}|tur2|jr+||jvr t j}n||jvr tj}|||fVIdS)N) rget_tokens_unprocessedrrSM_TYPESrTyperBuiltin)rtextindextokenvalues rrz&SourcePawnLexer.get_tokens_unprocessedus1$== & & E5%}}&- -- ' $/11 $ % % % % % & &rN)#__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* $gou = 4Z# w 8 DM TN dO -w~ > ,g.? @ k " VX & Dfk R 7 F -v| < %vz 2  + FN + !8 , [ )BCJ L -  0 1 d #7 <66 " ? O 6 " f  FO   )  1 2  0 7? # 7? + GOV ,  $W_g > & @ w  [22Fh???H(--- & & & & &rc>eZdZdZdZdgZgdZdgZdZdZ dZ d Z d e j d fd e j d fde zdze j d fde zdze j d fdefdefdefde jfde jfdefdedfdejfdejfdejfdejfdejfdejfdefd efd!efd"ejfd#ejfd$efgd%ed&fd'ejfd(efdefd)efgd*e j fd+e jfd,e jd&fd-e j fd.e j fde j d&fgd/e j d0fd1e j d&fd2e fgd3Zd4Z d5S)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|vrdSdS)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??4 ?rN)!rrrrrrrrrrrrrrrrrr r rr r>rrrrrrrrrrrrrrrrs DhG)))II 4CM .C $D '/5 1 7?G , 4Z* $gou = 4Z# w 8 DM TN dO -w~ > ,g.? @ k " VX & Dfk R 7 F -v| < %vz 2  + FN + !8 , [ )9:A C -  0 1 d #7 <66 " ? O 6 " f  FO   )  1 2  0 7? # 7? + GOV ,  $W_g > & @ w  [22FhrN)rpygments.lexerrpygments.tokenrrrrrr r r pygments.utilr __all__r rrrrrs&%%%%%&&&&&& k *k&k&k&k&k&jk&k&k&\IIIII IIIIIr