U
    ]g                     @   s4  d Z ddl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mZmZmZmZmZmZmZmZmZmZ ddlmZ ddlmZ ddlmZ dd	d
dddddgZG dd deZG dd	 d	eZ G dd
 d
eZ!G dd deZ"G dd deZ#G dd deZ$G dd deZ%G dd deZ&G dd deZ'dS )z
    pygments.lexers.dotnet
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for .net languages.

    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)
RegexLexerDelegatingLexerbygroupsincludeusingthisdefaultwords)PunctuationTextCommentOperatorKeywordNameStringNumberLiteralOther
Whitespace)get_choice_opt)	unistring)XmlLexerCSharpLexerNemerleLexerBooLexer
VbNetLexerCSharpAspxLexerVbNetAspxLexerFSharpLexerXppLexerc                   @   sd  e Zd ZdZdZdZdddgZdgZdgZd	Z	e
je
jB Zd
deddddd d d edddddddddd
 d dedddddd d d eddddddddddd d dZi ZdZe D ]\ZZedd e d! e d" eeeeejeefd#eeejfd$efd%ee efd&e!j"fd'e!j#fd(efe$d)e%fd*e%fd+efd,efd-e&fd.e&fd/e&j'fd0e(fd1ee!j)ee!j)e!j)efd2ee*ee*fe$d3d4d5e*fd6ee*ee*fd7ee*efd8e*j+fd9ee*ed:fd;ee*ed<feefgd=e(j,fd>e(j-fd?e(j.fgd@e(j/fgedAedBgeej0dCfe1dCgdDe dCfdEe dF ej2dCfgdGee< qdHdI Z3dJS )Kr   a  
    For C# source code.

    Additional options accepted:

    `unicodelevel`
      Determines which Unicode characters this lexer allows for identifiers.
      The possible values are:

      * ``none`` -- only the ASCII letters and numbers are allowed. This
        is the fastest selection.
      * ``basic`` -- all Unicode characters from the specification except
        category ``Lo`` are allowed.
      * ``full`` -- all Unicode characters as specified in the C# specs
        are allowed.  Note that this means a considerable slowdown since the
        ``Lo`` category has more than 40,000 characters in it!

      The default value is ``basic``.

      .. versionadded:: 0.8
    zC#z/https://docs.microsoft.com/en-us/dotnet/csharp/Zcsharpzc#csz*.csztext/x-csharp @?[_a-zA-Z]\w*@?[_LuLlLtLmNl][NdPcCfMnMc]*	@?(?:_|[^Lo])[^nonebasicfullTnumbers^([ \t]*)((?:(?:\[\])?\s+)+?)(
)(\s*)(\()^(\s*)(\[.*?\])[^\S\n]+(\\)(\n)//.*?\n/[*].*?[*]/\n)(z>>>=z>>=z<<=<=>=+=-=*=/=z%=z&=z|=z^=z??=z=>z??z?.!===&&||z>>>>><<++--+-*/%&|^<>?!~==~|!=|==|<<|>>|[-+/*%=<>&^|]z[()\[\];:,.][{}]@"(""|[^"])*"!\$?"(\\\\|\\[^\\]|[^"\\\n])*["\n]'\\.'|'[^\\]'B[0-9]+(\.[0-9]*)?([eE][+-][0-9]+)?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?zb(#)([ \t]*)(if|endif|else|elif|define|undef|line|error|warning|region|endregion|pragma)\b(.*?)(\n)\b(extern)(\s+)(alias)\b)aabstractasasyncawaitbasebreakbycasecatchcheckedconstcontinuer   delegatedoelseenumeventexplicitexternfalsefinallyfixedforZforeachgotoifZimplicitin	interfaceinternalisletlocknewnullonoperatoroutoverrideparamsprivate	protectedpublicreadonlyrefreturnsealedsizeofZ
stackallocstaticswitchr   throwtruetrytypeof	uncheckedZunsafevirtualvoidwhilegetsetr   partialyieldaddremovevaluealiasZ	ascendingZ
descendingfromgroupZintoZorderbyselectZthenbywherejoinequalsrecordZallowsandinitZmanagedZnameofZnintnotZnotnullZnuintorscopedZ	unmanagedwhenwith\bsuffixz;(file)(\s+)(record|class|abstract|enum|new|sealed|static)\b(global)(::)zk(bool|byte|char|decimal|double|dynamic|float|int|long|object|sbyte|short|string|uint|ulong|ushort|var)\b\??z(class|struct)(\s+)class(namespace|using)(\s+)	namespacez)0[xX][0-9a-fA-F]+(([uU][lL]?)|[lL][uU]?)?z"0[bB][01]+(([uU][lL]?)|[lL][uU]?)?z[0-9]+(([uU][lL]?)|[lL][uU]?)?z([0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fFdDmM]?)|(\.[0-9]+([eE][+-]?[0-9]+)?[fFdDmM]?)|([0-9]+([eE][+-]?[0-9]+)[fFdDmM]?)|([0-9]+[fFdDmM])numbers_floatnumbers_int#pop(?=\()(|\.)+)rootr   r   r9   r   r   c                 K   sL   t |dt| jd}|| jkr.| j|| _n| j| | _tj| f| d S NZunicodelevelr7   	r   listtokensZ_all_tokens	__class__Zprocess_tokendefZ_tokensr   __init__selfoptionslevel r   :/tmp/pip-unpacked-wheel-zak7uw41/pygments/lexers/dotnet.pyr      s
    
zCSharpLexer.__init__N)4__name__
__module____qualname____doc__nameurlaliases	filenames	mimetypesversion_addedre	MULTILINEDOTALLflagsunicombine	allexceptlevelsr   token_variantsitems	levelnamecs_identr   r   r   r   r   r   Functionr
   	Attributer   r   Single	Multiliner	   r   r   Charr   Preprocr   TypeHexBinIntegerFloatClassr   	Namespacer   r   r   r   r   r      s   
      
 
A
Zc                !   @   s2  e Zd ZdZdZdZdgZdgZdgZdZ	e
je
jB Zdd	ed
dddd d d ed
ddddddddd
 d ded
ddddd d d ed
dddddddddd d dZi ZdZe D ]P\ZZde d e d eeeeejeefd eeejfd!efd"eeefd#e j!fd$e j"fd%efd&ee#ee#d'fd(ee#ee#d)fd*e#d+fd,e d- ee$ee$fd.e$fd/e efd0eeed1fd2efd3efd4e#fd5e#fd6e#j%fd7e&fd8e&fd9ee j'ee j'd:fd;ee$ee$fd<e$fd=ee$efd>e$j(fd?e d@ eeee$j(fdAee$edBfdCee$edDfeefgeej)dEfgdFe j'fdGefd%edEfgdHedEfdIe dJ ej*dEfgdKe#fd/e efd0eeed1fdLe#fdMe#dEfgdNe#fd/e efd0eeed1fd*e#dOfdPe#dEfgdQe#fd*e#dOfdPe#dEfgdRe$fdSefeefdTe&fdUedOfdVedEfgdWee< qdXdY Z+dZd[ Z,d\S )]r   a  
    For Nemerle source code.

    Additional options accepted:

    `unicodelevel`
      Determines which Unicode characters this lexer allows for identifiers.
      The possible values are:

      * ``none`` -- only the ASCII letters and numbers are allowed. This
        is the fastest selection.
      * ``basic`` -- all Unicode characters from the specification except
        category ``Lo`` are allowed.
      * ``full`` -- all Unicode characters as specified in the C# specs
        are allowed.  Note that this means a considerable slowdown since the
        ``Lo`` category has more than 40,000 characters in it!

      The default value is ``basic``.
    ZNemerlezhttp://nemerle.orgZnemerlez*.nztext/x-nemerle1.5r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   Tr:   r;   r<   r=   r>   r?   r@   rA   rB   z(\$)(\s*)(")splice-stringz(\$)(\s*)(<#)splice-string2z<#recursive-stringz(<\[)(\s*)(z:)?z\]\>z\$z(\$)(\()splice-string-contentz[~!%^&*()+=|\[\]:;,.<>/?-]r`   ra   z"(\\\\|\\[^\\]|[^"\\\n])*["\n]rc   z0[xX][0-9a-fA-F]+[Ll]?z*[0-9](\.[0-9]*)?([eE][+-][0-9]+)?[flFLdD]?zY(#)([ \t]*)(if|endif|else|elif|define|undef|line|error|warning|region|endregion|pragma)\bpreprocre   a  (abstract|and|as|base|catch|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|syntax|this|throw|true|try|type|typeof|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\br   zo(bool|byte|char|decimal|double|float|int|long|object|sbyte|short|string|uint|ulong|ushort|void|array|list)\b\??z(:>?)(\s*)(z\??)z"(class|struct|variant|module)(\s+)r   r   r   r   z\w+z[ \t]+r   r   r   z[^"$]z\\""z[^#<>$]#pushz#>z[^#<>]zif|matchz[~!%^&*+=|\[\]:;,.<>/?-\\"$ ]\d+\(\))r   r   r   r   r   r   r   r   c                 K   sL   t |dt| jd}|| jkr.| j|| _n| j| | _tj| f| d S r   r   r   r   r   r   r   K  s    
zNemerleLexer.__init__c                 C   s   d}d| kr|d7 }|S )zUNemerle is quite similar to Python, but @if is relatively uncommon
        elsewhere.r   z@ifg?r   textresultr   r   r   analyse_textV  s    zNemerleLexer.analyse_textN)-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   r   r   r   r   r   r   r   r   r   r   r   r      s        




 
 
@


	

	kc                   @   sZ  e Zd ZdZdZdZdgZdgZdgZdZ	de
fd	ejfd
ejdfdefdeee
fdefdejfdejfdejfdefdefdefdeee
dfdeee
dfdeee
dfdejfdejfdejfdejfdefd ejfd!efd"ejfd#ejfd$ejjfd%ejfgd
ejd&fd'ejd(fd)ejfd*ejfgdejd(fgdej d(fgd+ej!d(fgd,Z"d-S ).r   z
    For Boo source code.
    ZBoozhttps://github.com/boo-lang/booZbooz*.booz
text/x-boor!   \s+z	(#|//).*$z/[*]commentz[]{}:(),.;[]r?   z\\z(in|is|and|or|not)\bz/(\\\\|\\[^\\]|[^/\\\s])/z@/(\\\\|\\[^\\]|[^/\\])*/r_   aO  (as|abstract|callable|constructor|destructor|do|import|enum|event|final|get|interface|internal|of|override|partial|private|protected|public|return|set|static|struct|transient|virtual|yield|super|and|break|cast|continue|elif|else|ensure|except|for|given|goto|if|in|is|isa|not|or|otherwise|pass|raise|ref|try|unless|when|while|from|as)\bzdef(?=\s+\(.*?\))z
(def)(\s+)funcnamez(class)(\s+)	classnamez(namespace)(\s+)r   z(?<!\.)(true|false|null|self|__eval__|__switch__|array|assert|checked|enumerate|filter|getter|len|lock|map|matrix|max|min|normalArrayIndexing|print|property|range|rawArrayIndexing|required|typeof|unchecked|using|yieldAll|zip)\bz"""(\\\\|\\"|.*?)"""z"(\\\\|\\[^\\]|[^"\\])*"z'(\\\\|\\[^\\]|[^'\\])*'z[a-zA-Z_]\w*z%(\d+\.\d*|\d*\.\d+)([fF][+-]?[0-9]+)?z[0-9][0-9.]*(ms?|d|h|s)z0\d+z0x[a-fA-F0-9]+z\d+Lr   r   z[*]/r   z[^/*]z[*/]z[a-zA-Z_][\w.]*)r   r  r  r  r   N)#r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
   r   r   r   Wordr   Regexr   r   BuiltinDoubler   r   Octr   r   ZLongr   r   r   r   r   r   r   r   r   a  sd   

'




c                   @   s  e Zd ZdZdZdZdddddd	d
gZddgZddgZdZ	de
dddd d d e
ddddddddd	 d ZejejB Zdejfdefdefd eeefd!eeefd"ejfd#efd$eejeejeejfed%d&d'd(efd)ed*fd+ed,fd-eeed.fd/eeed0fd1eeed2fd3ejfd4ejfd5efd6ed7fd8eeefed9 efd:e j!fd;e"j#fd<e"j$fd=e"j$fd>e"j$fgd?efd@edAfdBefgeej%dAfe&dAgeej'dAfgeej(dAfgeej)fdCej)fe&dAgdefdDedAfe&dAgdEZ*dFdG Z+dHS )Ir   zo
    For Visual Basic.NET source code.
    Also LibreOffice Basic, OpenOffice Basic, and StarOffice Basic.
    zVB.netz5https://docs.microsoft.com/en-us/dotnet/visual-basic/zvb.netZvbnetZlobasZoobasZsobaszvisual-basicZvisualbasicz*.vbz*.basztext/x-vbnetz
text/x-vbar!   z[_r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   z	^\s*<.*?>r   rB   z(rem\b.*?)(\n)z
('.*?)(\n)z#If\s.*?\sThen|#ElseIf\s.*?\sThen|#Else|#End\s+If|#Const|#ExternalSource.*?\n|#End\s+ExternalSource|#Region.*?\n|#End\s+Region|#ExternalChecksumz[(){}!#,.:]z?(Option)(\s+)(Strict|Explicit|Compare)(\s+)(On|Off|Binary|Text))lZ
AddHandlerZAliasZByRefZByValZCallZCaseZCatchZCBoolZCByteZCCharZCDateZCDecZCDblZCIntZCLngZCObjContinueZCSByteZCShortZCSngZCStrCTypeZCUIntZCULngZCUShortZDeclareZDefaultZDelegateZ
DirectCastZDoEachZElseZElseIfZEndIfZEraseErrorEventZExitFalseZFinallyZForZFriendZGetZGlobalZGoSubZGoToZHandlesZIfZ
ImplementsZInheritsZ	InterfaceZLetLibZLoopZMeZMustInheritZMustOverrideZMyBaseZMyClassZ	NarrowingZNewZNextZNotZNothingZNotInheritableZNotOverridableZOfZOnr   OptionOptionalZ	OverloadsZOverridableZ	OverridesZ
ParamArrayZPartialZPrivateZ	ProtectedZPublicZ
RaiseEventZReadOnlyZReDimZRemoveHandlerZResumeZReturnZSelectSetZShadowsZSharedr   ZStaticZStepZStopZSyncLockZThenZThrowToTrueZTryZTryCastZWendZUsingZWhenZWhileZWideningZWithZ
WithEventsZ	WriteOnlyz(?<!\.)r   )prefixr   z(?<!\.)End\bendz(?<!\.)(Dim|Const)\bdimz#(?<!\.)(Function|Sub|Property)(\s+)r  z"(?<!\.)(Class|Structure|Enum)(\s+)r  z&(?<!\.)(Module|Namespace|Imports)(\s+)r   z|(?<!\.)(Boolean|Byte|Char|Date|Decimal|Double|Integer|Long|Object|SByte|Short|Single|String|Variant|UInteger|ULong|UShort)\bzU(?<!\.)(AddressOf|And|AndAlso|As|GetType|In|Is|IsNot|Like|Mod|Or|OrElse|TypeOf|Xor)\bzE&=|[*]=|/=|\\=|\^=|\+=|-=|<<=|>>=|<<|>>|:=|<=|>=|<>|[-&*/\\^+=<>\[\]]r   stringz(_)(\n)z	[%&@!#$]?z#.*?#z"(\d+\.\d*|\d*\.\d+)(F[+-]?[0-9]+)?z\d+([SILDFR]|US|UI|UL)?z&H[0-9a-f]+([SILDFR]|US|UI|UL)?z&O[0-7]+([SILDFR]|US|UI|UL)?""z"C?r   [^"]+\.z?(Function|Sub|Property|Class|Structure|Enum|Module|Namespace)\b)r   r  r  r  r  r   r  c                 C   s   t d| t jrdS d S )Nz^\s*(#If|Module|Namespace)g      ?)r   searchr   r   r   r   r   r     s    zVbNetLexer.analyse_textN),r   r   r   r   r   r   r   r   r   r   r   r   Zuni_namer   r   
IGNORECASEr   r   r   r   r   r   r   r
   r   ZDeclarationr	   r   r   r  r   r   r   Dater   r   r   Variabler   r   r   r   r   r   r   r   r   r   r     s          
=


 Yc                   @   sj   e Zd ZdZdZg Zg ZdZej	Z
ddeejeejfdeeeeeefdeefdeefgiZd	S )
GenericAspxLexerz"
    Lexer for ASP.NET pages.
    zaspx-gen.https://dotnet.microsoft.com/en-us/apps/aspnetr   z(<%[@=#]?)(.*?)(%>)z(<script.*?>)(.*?)(</script>)z
(.+?)(?=<)z.+N)r   r   r   r   r   r   r   r   r   r   r   r   r   Tagr   r   r   r   r   r   r   r   r!    s    


r!  c                       sN   e Zd ZdZdZdgZddddddgZg Zd	Zd
Z	 fddZ
dd Z  ZS )r   z9
    Lexer for highlighting C# within ASP.NET pages.
    zaspx-cs*.aspx*.asax*.ascx*.ashx*.asmx*.axdr"  r!   c                    s   t  jttf| d S N)superr   r   r!  r   r   r   r   r   r   ;  s    zCSharpAspxLexer.__init__c                 C   s4   t d| t jd k	rdS t d| t jd k	r0dS d S )NzPage\s*Language="C#"皙?zscript[^>]+language=["\']C#333333?r   r  Ir  r   r   r   r   >  s    zCSharpAspxLexer.analyse_textr   r   r   r   r   r   r   r   r   r   r   r   __classcell__r   r   r-  r   r   /  s   c                       sN   e Zd ZdZdZdgZddddddgZg Zd	Zd
Z	 fddZ
dd Z  ZS )r   zG
    Lexer for highlighting Visual Basic.net within ASP.NET pages.
    zaspx-vbr$  r%  r&  r'  r(  r)  r"  r!   c                    s   t  jttf| d S r*  )r+  r   r   r!  r,  r-  r   r   r   Q  s    zVbNetAspxLexer.__init__c                 C   s4   t d| t jd k	rdS t d| t jd k	r0dS d S )NzPage\s*Language="Vb"r.  zscript[^>]+language=["\']vbr/  r0  r  r   r   r   r   T  s    zVbNetAspxLexer.analyse_textr2  r   r   r-  r   r   E  s   c                B   @   s  e Zd ZdZdZdZddgZdddgZd	gZd
Z	dddddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLgBZ
e
dMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfg7 Z
dgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dddddddddddddddddddg+ZdZdddgZdZdZdddddddddddddddddddddddddgZdejfdejfdejfdejfgdefdejjfdejdfdefdeejefdeejefdedfdedfdedfdedfdeeeejfdeeeejfdeeeejfdeeeeeej fdǠ!dȠ"e
efdefdʠ!dȠ"ee#fde de de e#fdǠ!dȠ"ee#j$fdǠ!dȠ"eej%fdeej&eej&ej&efdefde'j(fde'j)fde'j*fde'j+fde'j,fdej-fdej-fdefdej.dfdejfg defdtefdejfdedfdedfe/dۃgdefdedfdedfdedfdedfdedfdefgdefe0ddefdefdedfgdefdefdefdedfgdefdefdedfdefgdZ1dd Z2dS )r   z,
    For the F# language (version 3.0).
    zF#zhttps://fsharp.org/Zfsharpzf#z*.fsz*.fsiz*.fsxztext/x-fsharpr   rf   rg   assertrj   beginr   r   rr   zdo!rs   doneZdowncastZdowntoelifrt   r  	exceptionrx   ry   rz   r|   functionZfunglobalr~   Zinheritinliner   r   r   Zlazyzlet!r   matchmembermoduleZmutabler   r   r   Zofopenr   r   r   Zreczreturn!r   r   r   structZthentor   r   typeZupcastzuse!Zusevalr   r   r   r   zyield!r   Zatomicrk   ro   	componentrp   
constraintconstructorrq   eagerrv   Zexternalr{   Zfunctorr   methodZmixinobjectparallelprocessr   Zpurer   ZtailcallZtraitr   ZvolatilerI   #rK   rV   r   r   z\*z\+,z-\.z->rR   z\.\.r  z::z:=z:>:z;;;z<-z<\]rY   z>\]rZ   z\?\?z\?z\[<z\[\|z\[z\]_`z\{z\|\]z\|z\}r]   z<@@z<@r^   z@>z@@>z[!$%&*+\./:<=>?@^|~-]r   r   r   z[!?~]z[=<>@^|&+\*/$%-]ZsbytebytecharZ	nativeintZ
unativeintZfloat32ZsinglefloatdoubleZint8Zuint8Zint16Zuint16Zint32Zuint32Zint64Zuint64decimalunitboolr  r   Zexnobjru   z\\[\\"\'ntbrafv]z
\\[0-9]{3}z\\u[0-9a-fA-F]{4}z\\U[0-9a-fA-F]{8}r   z	\(\)|\[\]z \b(?<!\.)([A-Z][\w\']*)(?=\s*\.)dottedz\b([A-Z][\w\']*)z(///.*?)(\n)z(//.*?)(\n)z
\(\*(?!\))r  z@"lstringz"""tqsr   z\b(open|module)(\s+)([\w.]+)z\b(let!?)(\s+)(\w+)z\b(type)(\s+)(\w+)z&\b(member|override)(\s+)(\w+)(\.)(\w+)z\b({})\brW   z``([^`\n\r\t]|`[^`\n\r\t])+``z({})r   z)?z;(#)([ \t]*)(if|endif|else|line|nowarn|light|\d+)\b(.*?)(\n)z[^\W\d][\w']*z\d[\d_]*[uU]?[yslLnQRZINGmM]?z-0[xX][\da-fA-F][\da-fA-F_]*[uU]?[yslLn]?[fF]?z0[oO][0-7][0-7_]*[uU]?[yslLn]?z0[bB][01][01_]*[uU]?[yslLn]?z/-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)[fFmM]?z9'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'B?z'.''z@?"z[~?][a-z][\w\']*:z[A-Z][\w\']*(?=\s*\.)z[A-Z][\w\']*r   z[a-z_][\w\']*z	[^(*)@"]+z\(\*r   z\*\)z[(*)@]z[^\\"]+escape-sequencez\\\nrB   z"B?r  r  z"""B?)r^  r   rZ  r  r  r[  r\  c                 C   s(   d}d| kr|d7 }d| kr$|d7 }|S )zSF# doesn't have that many unique features -- |> and <| are weak
        indicators.r   z|>g?z<|r   r   r   r   r   r     s    zFSharpLexer.analyse_textN)3r   r   r   r   r   r   r   r   r   r   keywordsZkeyopts	operatorsZword_operatorsZprefix_symsZ
infix_syms
primitivesr   ZEscaper   r   r  ZPseudor   r   ZDocr   r   r   r   r   r
   r   formatr   r   r  r   r   r   r   r   r  r   r   r   r  r   r   r   r   r   r   r   r   r   \  s  
                                                                                                                     
                     
  
3
ac                   @   sJ  e Zd ZdZdZdZddgZdgZdZe	j
Zded	d
dddd d d ed	d
ddddddddd d ZeddZdZdZdZdZi Zdeeeeefde d e d  eeeeejeefd!eeejejjejfd"efd#ee efd$e!j"fd%e!j#fd&efe$ee%fd'e%fd(efd)efd*e&fd+e&fd,e&j'fd-e(fe$ed.d/efd0ej)fd1eeed2fd3e d4 eejjefd5eeejjeefd6e d7 e d8 eeeejjeeej*eefd9e d8 eeeejjeefe$ed:d/ejj+fe$ed:d/ejj+feefgeejd;fe,d;gd:e d;fd3e d< ej-d;fgd=Zd>S )?r   zG
    For X++ source code. This is based loosely on the CSharpLexer
    zX++zchttps://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-language-referenceZxppzx++z*.xppz2.15r1   r$   r%   r&   r'   r2   r(   r3   r4   r+   r,   r-   r.   r/   r0    )rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   )_rf   Zanytyperg   rh   Zascatavgrk   
breakpointrl   byrefrm   rn   Zchangecompanyclient	containerrq   countZcrosscompanyr   rr   Zdelete_fromdescZdisplaydivrs   Zeditrt   elementZeventhandlerexistsry   finalZ	firstfastZ	firstonlyZfirstonly10Zfirstonly100Zfirstonly1000flushr|   ZforceliteralsZforcenestedloopZforceplaceholdersZforceselectorderZ	forupdater   r   r~   Zinsert_recordsetr   r   r   likeZmaxofZminofmodr   nextZnofetchZ	notexistsr   ZoptimisticlockorderouterpauseZpessimisticlockprintr   r   r   Zrepeatablereadretryr   reverser   serverZsettingr   sumr+  r   Z	tablelockr   r   r   r   ZttsabortZttsbeginZ	ttscommitZupdate_recordsetZvalidtimestater   r   r   Zwindow)Z	_durationabsacosZany2DateZany2EnumZany2GuidZany2IntZ	any2Int64Zany2RealZany2StrZ	anytodateZ	anytoenumZ	anytoguidZanytointZ
anytoint64Z	anytorealZanytostrasinatanZbeepZcTermZchar2NumZ
classIdGetZcorrFlagGetZcorrFlagSetcoscoshZcurExtZ	curUserIdZdate2NumZdate2StrZdatetime2StrZdayNameZdayOfMthZdayOfWkZdayOfYrZddbZdecRoundZdgZdimOfZendMthZenum2strexpZexp10ZfVZfieldId2NameZfieldId2PNameZfieldName2IdfracfuncNameZgetCurrentPartitionZgetCurrentPartitionRecIdZ	getPrefixZguid2StrZidgZindexId2NameZindexName2IdZint2StrZ	int642StrZintvMaxZintvNameZintvNoZintvNormlog10ZlogNr<  maxminZmkDateZmthNameZmthOfYrZnewGuidZnextMthZnextQtrZnextYrZnum2CharZnum2DateZnum2StrZpmtpowerZprevMthZprevQtrZprevYrZprmIsDefaultptpvZrateZrefPrintAllroundZrunAsZ	sessionIdZ	setPrefixsinsinhsleepZslnZstr2DateZstr2DatetimeZstr2EnumZstr2GuidZstr2IntZ	str2Int64Zstr2NumZstr2TimeZstrAlphaZstrCmpZ	strColSeqZstrDelZstrFindZstrFmtZstrInsZstrKeepZstrLTrimZstrLenZstrLineZstrLwrZstrNFindZstrPokeZ	strPromptZstrRTrimZstrRemZstrRepZstrScanZstrUprZsubStrZsydZsystemDateGetZsystemDateSetZtableId2NameZtableId2PNameZtableName2IdtantanhZtermZtime2StrZtimeNowtodaytruncZtypeOfZuint2StrZwkOfYryear)MZattributeStrZclassNumZclassStrZconfigurationKeyNumZconfigurationKeyStrZdataEntityDataSourceStrZdelegateStrZdimensionHierarchyLevelStrZdimensionHierarchyStrZdimensionReferenceStrZdutyStrZenumCntZenumLiteralStrZenumNumZenumStrZextendedTypeNumZextendedTypeStrZfieldNumZ
fieldPNameZfieldStrZformControlStrZformDataFieldStrZformDataSourceStrZformMethodStrZformStrZidentifierStrZindexNumZindexStrZlicenseCodeNumZlicenseCodeStrZ
literalStrZmaxDateZmaxIntZ
measureStrZmeasurementStrZmenuItemActionStrZmenuItemDisplayStrZmenuItemOutputStrZmenuStrZ	methodStrZminIntZprivilegeStrZqueryDatasourceStrZqueryMethodStrZqueryStrZ	reportStrZresourceStrZroleStrZssrsReportStrZstaticDelegateStrZstaticMethodStrZtableCollectionStrZtableFieldGroupStrZtableMethodStrZtableNumZ
tablePNameZtableStaticMethodStrZtableStrZtileStrZvarStrZwebActionItemStrZwebDisplayContentItemStrZ
webFormStrZ
webMenuStrZwebOutputContentItemStrZwebReportStrZwebSiteTempStrZwebStaticFileStrZwebUrlItemStrZwebWebPartStrZwebletItemStrZwebpageDefStrZwebsiteDefStrZworkflowApprovalStrZworkflowCategoryStrZworkflowTaskStrZworkflowTypeStrz(\s*)\b(else|if)\b([^\n])r:   r;   r<   z^(\s*)(\[)([^\n]*?)(\])r>   r?   z//[^\n]*?\nz/[*][^\n]*?[*]/rB   r_   z[()\[\];:,.#@]r`   ra   rb   rc   rd   r   r   z+(boolean|int|int64|str|real|guid|date)\b\??z&(class|struct|extends|implements)(\s+)r   r   z)(::)z(\s*)(\w+)(\s+\w+(,|=)?[^\n]*;)z(fieldNum\()(z)(\s*,\s*)(z)(\s*\))z(tableNum\()(r   r   r   )r   r   r   N).r   r   r   r   r   r   r   r   r   r   r   r   r   r   Z	XPP_CHARSreplaceZ	OPERATORSZKEYWORDSZRUNTIME_FUNCTIONSZCOMPILE_FUNCTIONSr   r   r   r   r   r   r   r   r
   r   r   r   r   r   r   r   r	   r   r   r   r   r   ZPropertyZMagicr   r   r   r   r   r   r     s       	

 
'
)(r   r   Zpygments.lexerr   r   r   r   r   r   r   r	   Zpygments.tokenr
   r   r   r   r   r   r   r   r   r   r   Zpygments.utilr   Zpygmentsr   r   Zpygments.lexers.htmlr   __all__r   r   r   r   r!  r   r   r   r   r   r   r   r   <module>   s0   	(4     2Ep "