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

    Lexers for .net languages.

    :copyright: Copyright 2006-2023 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                      e Zd ZdZdZdZg dZdgZdgZe	j                  e	j                  z  Zdd ej                  d	d
ddd      z   dz   dz    ej                  d	d
dddddddd
      z   dz   d ej                  d	d
dddd      z   dz   dz    ej                  d	d
ddddddddd      z   dz   dZi ZdZej'                         D ]4  \  ZZdez   dz   ez   dz    ee ee      ej6                  ee      fd eeej:                        fd efd! eee      fd"ej@                  fd#ejB                  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$jJ                  fd,e&fd- eejN                  eejN                  ejN                  e      fd. ee(ee(      fd/e(fd0 ee(e      fd1e(jR                  fd2 ee(e      d3fd4 ee(e      d5feefgeejT                  d6f e+d6      gd7ed6fd8ez   d9z   ejX                  d6fgd:ee<   7 d; Z-y<)=r   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/)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^([ \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)\ba  (abstract|as|async|await|base|break|by|case|catch|checked|const|continue|default|delegate|do|else|enum|event|explicit|extern|false|finally|fixed|for|foreach|goto|if|implicit|in|interface|internal|is|let|lock|new|null|on|operator|out|override|params|private|protected|public|readonly|ref|return|sealed|sizeof|stackalloc|static|switch|this|throw|true|try|typeof|unchecked|unsafe|virtual|void|while|get|set|new|partial|yield|add|remove|value|alias|ascending|descending|from|group|into|orderby|select|thenby|where|join|equals)\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+)	namespace#pop(?=\()(|\.)+rootrh   rj   c                     t        |dt        | j                        d      }|| j                  vr!| j                  j                  |      | _        n| j                  |   | _        t        j                  | fi | y Nunicodelevelr9   	r   listtokens_all_tokens	__class__process_tokendef_tokensr   __init__selfoptionslevels      8/usr/lib/python3/dist-packages/pygments/lexers/dotnet.pyr{   zCSharpLexer.__init__   sd    wT[[8I7S(((>>::5ADL++E2DLD,G,    N).__name__
__module____qualname____doc__nameurlaliases	filenames	mimetypesre	MULTILINEDOTALLflagsunicombine	allexceptlevelsrv   token_variantsitems	levelnamecs_identr   r   r   r   r   Functionr   	Attributer   r   Single	Multiliner
   r   r   Charr   Preprocr   TypeClassr	   	Namespacer{    r   r   r   r      s   , D
;C$GI !ILL299$E ";3;;tT4tDDsJ#D$dD$$($668<= tT4tTBCEIJ%dD$dD&*D$dDD GKK	F FN%||~ >
	8 "H, 0  !$ *eDk4==*%'(
 $Xj$..%IJj)htZ89W^^,!2!23
#  
  1(; +.+&!6*5v>!6;;/56<>K'//:w!//:78 -hw
/ # %,- !(7K"@ACDKLLR'':)FP*HWj,I;W4 e3j 4::v.
 D&)x(*DNNFCs=
y>
@-r   r   c            "       `   e Zd ZdZdZdZdgZdgZdgZe	j                  e	j                  z  Zdd ej                  d	d
ddd      z   dz   dz    ej                  d	d
dddddddd
      z   dz   d ej                  d	d
dddd      z   dz   dz    ej                  d	d
ddddddddd      z   dz   dZi ZdZej'                         D ]  \  ZZdez   dz   ez   dz    ee ee      ej6                  ee      fd eeej:                        fd efd! eee      fd"ej@                  fd#ejB                  fd$efd% ee"ee"      d&fd' ee"ee"      d(fd)e"d*fd+ez   d,z    ee#ee#      fd-e#fd.ez   efd/ eee      d0fd1efd2efd3e"fd4e"fd5e"jH                  fd6e%fd7e%fd8 eejL                  eejL                        d9fd: ee#ee#      fd;e#fd< ee#e      fd=e#jN                  fd>ez   d?z    eeee#jN                        fd@ ee#e      dAfdB ee#e      dCfeefgeejP                  dDfgdEejL                  fdFefd$edDfgdGedDfdHez   dIz   ejR                  dDfgdJe"fd.ez   efd/ eee      d0fdKe"fdLe"dDfgdMe"fd.ez   efd/ eee      d0fd)e"dNfdOe"dDfgdPe"fd)e"dNfdOe"dDfgdQe#fdRefeefdSe%fdTedNfdUedDfgdVee<    dW Z*dX Z+yY)Zr   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``.

    .. versionadded:: 1.5
    Nemerlezhttp://nemerle.orgnemerlez*.nztext/x-nemerler$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   Tr;   r<   r=   r>   r?   r@   rA   rB   rC   z(\$)(\s*)(")splice-stringz(\$)(\s*)(<#)splice-string2z<#recursive-stringz(<\[)(\s*)(z:)?z\]\>z\$z(\$)(\()splice-string-contentz[~!%^&*()+=|\[\]:;,.<>/?-]ra   rb   z"(\\\\|\\[^\\]|[^"\\\n])*["\n]rd   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preprocrf   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)\brg   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+)rh   ri   rj   rk   z\w+z[ \t]+rl   rm   rn   z[^"$]z\\""z[^#<>$]#pushz#>z[^#<>]zif|matchz[~!%^&*+=|\[\]:;,.<>/?-\\"$ ]\d+\(\))rp   rh   r   rj   r   r   r   r   c                     t        |dt        | j                        d      }|| j                  vr!| j                  j                  |      | _        n| j                  |   | _        t        j                  | fi | y rr   rt   r|   s      r   r{   zNemerleLexer.__init__0  sg    wT[[8I&((((>>::5ADL++E2DLD,G,r   c                     d}d| v r|dz  }|S )zUNemerle is quite similar to Python, but @if is relatively uncommon
        elsewhere.r   z@ifg?r   textresults     r   analyse_textzNemerleLexer.analyse_text;  s     D=cMFr   N),r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rv   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
CkGI!"ILL299$E ";3;;tT4tDDsJ#D$dD$$($668<= tT4tTBCEIJ%dD$dD&*D$dDD GKK	F FN%||~ j
	8 "H, 0  !$ *eDk4==*%'(
 $Xj$..%IJj)htZ89W^^,!2!23
# (6:v"F#%!8FJ#G$& 23(*U2':w79'" !4(ht[9(* /<+&!6*2F;!6;;/*F3>GB'//:wGT -hw
G.TU: <CD !(7K"@AI  (*W4+z7<<@B6':.9*HWj,I4 {>@ 4::v. )J'
F+ D&)x(*DNNFC
 F#!4(ht[9(*&!' f%!4(ht[9(*)( V$)(! g&1;?4  W-V,&Ci
yj
X	-r   r   c                      e Zd ZdZdZdZdgZdgZdg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j2                  fd efd!ej4                  fd"ej6                  fd#ej8                  j:                  fd$ej8                  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!y,)-r   z
    For Boo source code.
    Boozhttps://github.com/boo-lang/boobooz*.booz
text/x-boo\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+)rj   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[*]/rk   z[^/*]z[*/]z[a-zA-Z_][\w.]*)rp   r   r   r   rj   N)"r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Wordr   Regexr   r   BuiltinDoubler   FloatOctHexIntegerLongr   r   r   rv   r   r   r   r   r   F  s     D
+CgG	II Z 7>>*g''3k*(445DM$hmm4)6<<8)6<<8,h7! #*+ "7+HWj9:Fhw
;[I (7J"?M  "&	/
 %fmm4(&--8(&--8d#5v||D'0fjj!

+fnn))*V^^$I%
N W&&0W&&/g''(W&&'	
 dmmV4
 djj&1
  8
g6Fr   r   c                      e Zd ZdZdZdZg dZddgZddgZd	 e	j                  d
ddd      z   dz   dz    e	j                  d
dddddddd	      z   dz   Zej                  ej                  z  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j0                  eej0                  eej0                        f eddd !      efd"ed#fd$ed%fd& eee      d'fd( eee      d)fd* eee      d+fd,ej4                  fd-ej8                  fd.efd/ed0fd1 eee      fed2z   efd3ej@                  fd4e!jD                  fd5e!jF                  fd6e!jF                  fd7e!jF                  fgd8efd9ed:fd;efgeejH                  d:f e%d:      geejL                  d:fgeejN                  d:fgeejP                  fd<ejP                  f e%d:      gdefd=ed:f e%d:      gd>Z)d? Z*y@)Ar   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.netvbnetlobasoobassobasz*.vbz*.basztext/x-vbnetz
text/x-vbaz[_r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   z	^\s*<.*?>r   rC   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))l
AddHandlerAliasByRefByValCallCaseCatchCBoolCByteCCharCDateCDecCDblCIntCLngCObjContinueCSByteCShortCSngCStrCTypeCUIntCULngCUShortDeclareDefaultDelegate
DirectCastDoEachElseElseIfEndIfEraseErrorEventExitFalseFinallyForFriendGetGlobalGoSubGoToHandlesIf
ImplementsInherits	InterfaceLetLibLoopMeMustInheritMustOverrideMyBaseMyClass	NarrowingNewNextNotNothingNotInheritableNotOverridableOfOnr   OptionOptional	OverloadsOverridable	Overrides
ParamArrayPartialPrivate	ProtectedPublic
RaiseEventReadOnlyReDimRemoveHandlerResumeReturnSelectSetShadowsSharedr   StaticStepStopSyncLockThenThrowToTrueTryTryCastWendUsingWhenWhileWideningWith
WithEvents	WriteOnlyz(?<!\.)\b)prefixsuffixz(?<!\.)End\bendz(?<!\.)(Dim|Const)\bdimz#(?<!\.)(Function|Sub|Property)(\s+)r   z"(?<!\.)(Class|Structure|Enum)(\s+)r   z&(?<!\.)(Module|Namespace|Imports)(\s+)rj   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?rk   [^"]+\.z?(Function|Sub|Property|Class|Structure|Enum|Module|Namespace)\b)rp   r8  r7  r   r   rj   r6  c                 P    t        j                  d| t         j                        ryy )Nz^\s*(#If|Module|Namespace)g      ?)r   searchr   r   s    r   r   zVbNetLexer.analyse_text  s     992D",,G Hr   N)+r   r   r   r   r   r   r   r   r   r   r   uni_namer   r   
IGNORECASEr   r   r   r   r   r   r   r   r   Declarationr
   r   r   r   r   r   r   Dater   r   r   Variabler	   r   r   r   rv   r   r   r   r   r   r     s   
 D
AC<G!I.Ikckk$dD99C? S[[tT4t!%tT3359:H LL2==(E 4>>*Z J* =>HWj9:= __ [)%g)):w7J7J '"5"578  ?& %U'4& 6='>( gu-$gu53gz*J82gz*K96gz*K9"<<)()18+ &(#$
34#T*gll#2FLLA'8/@,fnn=u;
z FOVV$v
 t}}f-FO

 t}}f-
 tzz6*
 t~~&DNN#FO
 Z OfFO	
cWFrr   r   c            
           e Zd ZdZdZg Zg 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y)	GenericAspxLexerz"
    Lexer for ASP.NET pages.
    zaspx-genrp   z(<%[@=#]?)(.*?)(%>)z(<script.*?>)(.*?)(</script>)z
(.+?)(?=<)z.+N)r   r   r   r   r   r   r   r   r   r   r   r   Tagr   r   r   rv   r   r   r   rE  rE    s     DIIIIE 	#Xdhhtxx%HI-xh8=8=h0I J E(O,E(O$
	Fr   rE  c                   >     e Zd ZdZdZdgZg dZg Z fdZd Z	 xZ
S )r   z9
    Lexer for highlighting C# within ASP.NET pages.
    zaspx-csz*.aspxz*.asaxz*.ascxz*.ashxz*.asmxz*.axdc                 8    t        |   t        t        fi | y N)superr{   r   rE  r}   r~   rx   s     r   r{   zCSharpAspxLexer.__init__  s    &6B'Br   c                     t        j                  d| t         j                        yt        j                  d| t         j                        yy )NzPage\s*Language="C#"皙?zscript[^>]+language=["\']C#333333?r   r=  Ir>  s    r   r   zCSharpAspxLexer.analyse_text  >    99,dBDD9EYY5tRTTBN Or   r   r   r   r   r   r   r   r   r{   r   __classcell__rx   s   @r   r   r     s+     DkGKIICr   r   c                   >     e Zd ZdZdZdgZg dZg Z fdZd Z	 xZ
S )r   zG
    Lexer for highlighting Visual Basic.net within ASP.NET pages.
    zaspx-vbrH  c                 8    t        |   t        t        fi | y rJ  )rK  r{   r   rE  rL  s     r   r{   zVbNetAspxLexer.__init__/  s    %5AAr   c                     t        j                  d| t         j                        yt        j                  d| t         j                        yy )NzPage\s*Language="Vb"rN  zscript[^>]+language=["\']vbrO  rP  r>  s    r   r   zVbNetAspxLexer.analyse_text2  rR  r   rS  rU  s   @r   r   r   %  s+     DkGKIIBr   r   c                      e Zd ZdZdZdZddgZg dZdgZg dZ	e	g d	z  Z	g d
Z
dZg dZdZdZg dZdej"                  fdej"                  fdej"                  fdej"                  fgg defdej(                  j*                  fdej,                  dfdefd eej0                  e      fd eej4                  e      fdedfdedfded fd!ed"fd# eeeej,                        fd$ eeeej8                        fd% eeeej:                        fd& eeeeeej>                        fd'd(jA                  e	      z  efd)efd*d(jA                  e
      z  e!fd+ed(ed,ee!fd'd(jA                  e      z  e!jD                  fd'd(jA                  e      z  ejF                  fd- eejH                  eejH                  ejH                  e      fd.efd/e%jL                  fd0e%jN                  fd1e%jP                  fd2e%jR                  fd3e%jT                  fd4ejV                  fd5ejV                  fd6efd7ejX                  d"fd8ej8                  fdefd9efd:ej,                  fd;ed<fd=ed<f e-d<      gd>efd?ed@fdAed<fdedfded fd!ed"fdBefgdCef e.dD      dEefdFefdGed<fgdHefdFefdIefdGed<fgdHefdFefdJed<fd!efgdKZ/dL Z0yM)Nr   zG
    For the F# language (version 3.0).

    .. versionadded:: 1.5
    zF#zhttps://fsharp.org/fsharpzf#)z*.fsz*.fsiz*.fsxztext/x-fsharp)Babstractasassertbasebeginrh   r	   delegatezdo!dodonedowncastdowntoelifelser6  	exceptionexternfalsefinallyforfunctionfunglobalifinheritinline	interfaceinternalinlazyzlet!letmatchmembermodulemutablerj   newnullofopenoverrideprivatepublicreczreturn!returnselectstaticstructthentotruetrytypeupcastzuse!usevalvoidwhenwhilewithzyield!yield)atomicbreakchecked	componentconst
constraintconstructorcontinueeagereventexternalfixedfunctorr   methodmixinobjectparallelprocess	protectedpuresealedtailcalltraitvirtualvolatile)+rJ   #rL   rW   r   r   z\*z\+,z-\.z->rS   z\.\.r;  z::z:=z:>:z;;;z<-z<\]rZ   z>\]r[   z\?\?z\?z\[<z\[\|z\[z\]_`z\{z\|\]z\|z\}r^   z<@@z<@r_   z@>z@@>z[!$%&*+\./:<=>?@^|~-])andornotz[!?~]z[=<>@^|&+\*/$%-])sbytebytechar	nativeint
unativeintfloat32singlefloatdoubleint8uint8int16uint16int32uint32int64uint64decimalunitboolr8  ru   exnobjenumz\\[\\"\'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   r8  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(%s)\brX   z``([^`\n\r\t]|`[^`\n\r\t])+``z(%s)rm   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\']*:r;  z[A-Z][\w\']*(?=\s*\.)z[A-Z][\w\']*rk   z[a-z_][\w\']*z	[^(*)@"]+z\(\*r   z\*\)z[(*)@]z[^\\"]+escape-sequencez\\\nrC   z"B?r:  r9  z"""B?)r  rp   r  r   r8  r  r  c                 .    d}d| v r|dz  }d| v r|dz  }|S )zSF# doesn't have that many unique features -- |> and <| are weak
        indicators.r   z|>g?z<|r   r   s     r   r   zFSharpLexer.analyse_text  s.     4<dNF4<dNFr   N)1r   r   r   r   r   r   r   r   r   keywordskeyopts	operatorsword_operatorsprefix_syms
infix_syms
primitivesr   Escaper   r   r   Pseudor   r   Docr   r   r   rC  r   r   r   joinr   r   r   r   r   r   r   r   Binr   r   r   r	   r   rv   r   r   r   r   r   r   :  s    D
CG*I !I
H   HG )I)NK$JJ !&--0FMM*!6==1!6==1	
1
Z 1
4<<../1
 1^^X'1

 !$'1
 hvzz:>?1
 XgnnjAB1
 GY/1
 FI&1
 VU#1
 68$1
 -gz4>>:<1
  $gz4==9;!1
$ #gz4::68%1
( 7gz4dmmLN)1
, 388H--w7-1
. .t4/1
0 sxx(((311
2 )+yA8L31
4 388N33X]]C51
6 388J//>71
8 Lgooz7??ooz3491
@ t$A1
D .v~~>E1
F >vzzJG1
H /

;I1
J -fjj9K1
L @\\M1
R J[[S1
V V[[!W1
X 7OY1
\ V]]H-]1
` "4==1a1
f Z K %t~~6dF+tV,FO
 7#gw'gv&FI&VU#68$ 	
  %&fFOVV$
 vFOFOVV$	
 vFOvv&6N	
s_FB	r   r   c                   *   e Zd ZdZdZdZddgZdgZej                  Z
d ej                  dd	d
ddd      z   dz   dz    ej                  dd	d
dddddddd      z   dz   Zej                  dd      ZdZdZdZdZi Zd eee ee            fdez   dz   ez   dz    ee ee      ej4                  ee      fd  eeej8                  ej:                  j<                  ej8                        fd!efd" eee      fd#e jB                  fd$e jD                  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%jL                  fd,e'f e#ed-.      efd/ejP                  fd0 eee      d1fd2ez   d3z    eej:                  j<                  e      fd4 eeej:                  j<                   ee            fd5ez   d6z   ez   d7z    e ee      ej:                  j<                   ee      ejR                   ee            fd8ez   d7z    e ee      ej:                  j<                   ee            f e#ed9.      ej4                  jT                  f e#ed9.      ej4                  jT                  feefgeej<                  d:f e+d:      gd9ed:fd2ez   d;z   ejX                  d:fgd<Zy=)>r    zc
    For X++ source code. This is based loosely on the CSharpLexer

    .. versionadded:: 2.15
    zX++zchttps://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-language-referencexppzx++z*.xppr3   r&   r'   r(   r)   r4   r*   r5   r6   r-   r.   r/   r0   r1   r2    )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^   r_   )_r[  anytyper\  asyncascatavgr  
breakpointbybyrefcasecatchchangecompanyclient	containerr  countcrosscompanyr	   r`  delete_fromdescdisplaydivra  editrf  elementeventhandlerexistsri  final	firstfast	firstonlyfirstonly10firstonly100firstonly1000flushrk  forceliteralsforcenestedloopforceplaceholdersforceselectorder	forupdatefromgroupro  insert_recordsetrr  isr  likemaxofminofmodr{  nextnofetch	notexistsr|  optimisticlockorderouterpausepessimisticlockprintr  r  r  repeatablereadretryr  reverser  serversettingr  sumrK  switch	tablelockr   throwr  r  ttsabortttsbegin	ttscommitupdate_recordsetvalidtimestater  wherer  window)	_durationabsacosany2Dateany2Enumany2Guidany2Int	any2Int64any2Realany2Str	anytodate	anytoenum	anytoguidanytoint
anytoint64	anytorealanytostrasinatanbeepcTermchar2Num
classIdGetcorrFlagGetcorrFlagSetcoscoshcurExt	curUserIddate2Numdate2Strdatetime2StrdayNamedayOfMthdayOfWkdayOfYrddbdecRounddgdimOfendMthenum2strexpexp10fVfieldId2NamefieldId2PNamefieldName2IdfracfuncNamegetCurrentPartitiongetCurrentPartitionRecId	getPrefixguid2StridgindexId2NameindexName2Idint2Str	int642StrintvMaxintvNameintvNointvNormlog10logNrw  maxminmkDatemthNamemthOfYrnewGuidnextMthnextQtrnextYrnum2Charnum2Datenum2StrpmtpowerprevMthprevQtrprevYrprmIsDefaultptpvraterefPrintAllroundrunAs	sessionId	setPrefixsinsinhsleepslnstr2Datestr2Datetimestr2Enumstr2Guidstr2Int	str2Int64str2Numstr2TimestrAlphastrCmp	strColSeqstrDelstrFindstrFmtstrInsstrKeepstrLTrimstrLenstrLinestrLwrstrNFindstrPoke	strPromptstrRTrimstrRemstrRepstrScanstrUprsubStrsydsystemDateGetsystemDateSettableId2NametableId2PNametableName2Idtantanhtermtime2StrtimeNowtodaytrunctypeOfuint2StrwkOfYryear)MattributeStrclassNumclassStrconfigurationKeyNumconfigurationKeyStrdataEntityDataSourceStrdelegateStrdimensionHierarchyLevelStrdimensionHierarchyStrdimensionReferenceStrdutyStrenumCntenumLiteralStrenumNumenumStrextendedTypeNumextendedTypeStrfieldNum
fieldPNamefieldStrformControlStrformDataFieldStrformDataSourceStrformMethodStrformStridentifierStrindexNumindexStrlicenseCodeNumlicenseCodeStr
literalStrmaxDatemaxInt
measureStrmeasurementStrmenuItemActionStrmenuItemDisplayStrmenuItemOutputStrmenuStr	methodStrminIntprivilegeStrqueryDatasourceStrqueryMethodStrqueryStr	reportStrresourceStrroleStrssrsReportStrstaticDelegateStrstaticMethodStrtableCollectionStrtableFieldGroupStrtableMethodStrtableNum
tablePNametableStaticMethodStrtableStrtileStrvarStrwebActionItemStrwebDisplayContentItemStr
webFormStr
webMenuStrwebOutputContentItemStrwebReportStrwebSiteTempStrwebStaticFileStrwebUrlItemStrwebWebPartStrwebletItemStrwebpageDefStrwebsiteDefStrworkflowApprovalStrworkflowCategoryStrworkflowTaskStrworkflowTypeStrz(\s*)\b(else|if)\b([^\n])r;   r<   r=   z^(\s*)(\[)([^\n]*?)(\])r?   r@   z//[^\n]*?\nz/[*][^\n]*?[*]/rC   r`   z[()\[\];:,.#@]ra   rb   rc   rd   re   r3  )r5  z+(boolean|int|int64|str|real|guid|date)\b\??z&(class|struct|extends|implements)(\s+)rh   rm   z)(::)z(\s*)(\w+)(\s+\w+(,|=)?[^\n]*;)z(fieldNum\()(z)(\s*,\s*)(z)(\s*\))z(tableNum\()(rl   rk   rn   ro   N)-r   r   r   r   r   r   r   r   r   r   r   r   r   	XPP_CHARSreplace	OPERATORSKEYWORDSRUNTIME_FUNCTIONSCOMPILE_FUNCTIONSrv   r   r   r   r   r   r   r   r   r   rC  r   r   r   r   r   r
   r   r   r   r   r   PropertyMagicr	   r   r   r   r   r    r      s`    D
oCenG	ILLEtT4tTBCEIJ%dD$dD&*D$dDD GKKI !!&&1II
bHN	L F
 *8Jt+UV	) -  !$ U4[$--#%&
 (*dnndmmNaNacgcqcq)rs*%(445W^^,!2!23J9x(,h7,k"v&16:v{{+45;=8E*G4;W\\J6*8UW^_)^G#Xdmm.A.A;%OP/*dmmFYFY[`ae[f1ghi'6y@Ltdmm&9&95;W\]aWbce i'3tdmm&9&95;GI$Y79L9LM$Y79L9LMI%
N 

F+FO

 f%9_x'@
W/Fr   r    )(r   r   pygments.lexerr   r   r   r   r   r   r	   r
   pygments.tokenr   r   r   r   r   r   r   r   r   r   r   pygments.utilr   pygmentsr   r   pygments.lexers.htmlr   __all__r   r   r   r   rE  r   r   r   r    r   r   r   <module>r     s    
     5 5 5 5 ( % )Kx-* x-vo: odAz AHl l^z 0o (_ *_* _Dmz mr   