
    Mh                        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'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                   j   e Zd ZdZdZdZg dZdgZdgZd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                                D ]x\  ZZ ed          dez   dz   ez   d z    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d.e(fd/ ee!j)        ee!j)        e!j)        e          fd0 ee*ee*          f e$d1d23          e*fd4 ee*ee*          fd5 ee*e          fd6e*j+        fd7 ee*e          d8fd9 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d?           ed@          geej0        dAf e1dA          gdBe dAfdCez   dDz   ej2        dAfgdEee<   zdF Z3dGS )Hr   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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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switchr   throwtruetrytypeof	uncheckedunsafevirtualvoidwhilegetsetr   partialyieldaddremovevaluealias	ascending
descendingfromgroupintoorderbyselectthenbywherejoinequalsrecordallowsandinitmanagednameofnintnotnotnullnuintorscoped	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   r<   r   r   c                     t          |dt          | j                  d          }|| j        vr | j                            |          | _        n| j        |         | _        t          j        | fi | d S Nunicodelevelr:   	r   listtokens_all_tokens	__class__process_tokendef_tokensr   __init__selfoptionslevels      V/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/pygments/lexers/dotnet.pyr   zCSharpLexer.__init__   st    wT[8I8I7SS(((>::5AADLL+E2DLD,,G,,,,,    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      s#        , D
;C$$$GI !IML29$E ";3;tT4tDDDsJ#D$dD$$($6 668<= tT4tTBBCEIJ%dD$dD&*D$dD DD GKK	 	F FN%||~~ Y
 Y
	8 	""!H, 0  !$ *eeDkk4=*%' '(
 $XXj$.%I%IJj)hhtZ889W^,!23
#   
  1(; +.+&!6*5v>!6;/56<>K'/:w!/:7 78 -hhw
/ /  $  %! ! !$ #*%+* P8GZ99; ((7K"@"@ACDKLR'':)F)FP*HHWj,I,I;W4 }?B >vzJ6
C2FNC% '-l4 ((&&
 4:v.
 D&)x(*DNFCiX
 X
yt- - - - -r   r   c            "       .   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        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                                D ]\  ZZdez   dz   ez   dz    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z   d-z    ee$ee$          fd.e$fd/ez   efd0 eee          d1fd2efd3efd4e#fd5e#fd6e#j%        fd7e&fd8e&fd9 e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z   d@z    eeee$j(                  fdA ee$e          dBfdC ee$e          dDfeefgeej)        dEfgdFe j'        fdGefd%edEfgdHedEfdIez   dJz   ej*        dEfgdKe#fd/ez   efd0 eee          d1fdLe#fdMe#dEfgdNe#fd/ez   efd0 e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<   dX Z+dY Z,dZS )[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``.
    Nemerlezhttp://nemerle.orgnemerlez*.nztext/x-nemerle1.5r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   Tr=   r>   r?   r@   rA   rB   rC   rD   rE   z(\$)(\s*)(")splice-stringz(\$)(\s*)(<#)splice-string2z<#recursive-stringz(<\[)(\s*)(z:)?z\]\>z\$z(\$)(\()splice-string-contentz[~!%^&*()+=|\[\]:;,.<>/?-]rc   rd   z"(\\\\|\\[^\\]|[^"\\\n])*["\n]rf   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preprocrh   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                     t          |dt          | j                  d          }|| j        vr | j                            |          | _        n| j        |         | _        t          j        | fi | d S r   r   r   s      r   r   zNemerleLexer.__init__K  sy    wT[8I8I&( ((((>::5AADLL+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_textV  s      D==cMFr   N)-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)        ( D
CkGI!"IML29$E ";3;tT4tDDDsJ#D$dD$$($6 668<= tT4tTBBCEIJ%dD$dD&*D$dD DD GKK	 	F FN%||~~ j
 j
	8 "H, 0  !$ *eeDkk4=*%' '(
 $XXj$.%I%IJj)hhtZ889W^,!23
# ((6:v"F"F#%!88FJ#G#G$& 23(*U2':w779'" !4(hht[99(* /<+&!6*2F;!6;/*F3>GB'/:wGGT -hhw
G.T.TU: <CD !((7K"@"@AI  (*W4+z7<@@B6':..9*HHWj,I,I4 {>@ 4:v. )J'
F+ D&)x(*DNFC
 F#!4(hht[99(*&!' f%!4(hht[99(*)( V$)(! g&1;?4  W-V,&Ci
 i
yV	- 	- 	-    r   r   c                   D   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.
    Boozhttps://github.com/boo-lang/boobooz*.booz
text/x-boor$   \s+z	(#|//).*$z/[*]commentz[]{}:(),.;[]rB   z\\z(in|is|and|or|not)\bz/(\\\\|\\[^\\]|[^/\\\s])/z@/(\\\\|\\[^\\]|[^/\\])*/rb   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  Longr   r  r  r   r	  r   r   r   r   a  s         D
+CgG	IIM Z 7>*g'3k*((4445DM$hm4)6<8)6<8,h7! #*+ "7+HHWj99:Fhhw
;;[I ((7J"?"?M  "&	/
 %fm4(&-8(&-8d#5v|D'0fj!
+fn)*V^$I%
N W&0W&/g'(W&'	
 dmV4
 dj&1
  8
g6 6FFFr   r   c                   \   e Zd ZdZdZdZg dZddgZddgZd	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j        eej        eej                  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j        fd.ej        fd/efd0ed1fd2 eee          fed3z   efd4e j!        fd5e"j#        fd6e"j$        fd7e"j$        fd8e"j$        fgd9efd:ed;fd<efgeej%        d;f e&d;          geej'        d;fgeej(        d;fgeej)        fd=ej)        f e&d;          gdefd>ed;f e&d;          gd?Z*d@ Z+dAS )Br   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visual-basicvisualbasicz*.vbz*.basztext/x-vbnetz
text/x-vbar$   z[_r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   z	^\s*<.*?>r!  rE   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(?<!\.)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                 J    t          j        d| t           j                  rdS d S )Nz^\s*(#If|Module|Namespace)g      ?)r   searchr   r  s    r   r  zVbNetLexer.analyse_text  s*    92D",GG 	3	 	r   N),r   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  r   r  r	  r   r   r   r     s2        
 D
AC[[[G!I.IMkck$dD999C? S[tT4t!%tT3 3359:H L2=(E 4>*Z J* = =>HHWj99:= _ [)%Xg):w7J '"57 78 U ?& %U'4 4 4& 6='>( gu-$gu53Xgz**J82Xgz**K96Xgz**K9"<)()18+ &(#$
334#T*gl#2FLA'8/@,fn=u;
z FOVV$v
 t}f-GFOO

 t}f-
 tz6*
 t~&DN#GFOO
 Z OfGFOO	
cW WFr    r   r   c            
           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          DII
:CIE 	#XXdhtx%H%HI-xxh8=8=h0I 0I J EE(OO,EE(OO$
	FFFr   r  c                   F     e Zd ZdZdZdgZg dZg ZdZd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*.axdr  r$   c                 R     t                      j        t          t          fi | d S N)superr   r   r  r   r   r   s     r   r   zCSharpAspxLexer.__init__;  s+    &6BB'BBBBBr   c                     t          j        d| t           j                  dS t          j        d| t           j                  dS d S )NzPage\s*Language="C#"皙?zscript[^>]+language=["\']C#333333?r   r  Ir  s    r   r  zCSharpAspxLexer.analyse_text>  C    9,dBD99E3Y5tRTBBN4 ONr   r   r   r   r   r   r   r   r   r   r   r   r  __classcell__r   s   @r   r   r   /  s~          DkGKKKII
:CMC C C C C      r   r   c                   F     e Zd ZdZdZdgZg dZg ZdZdZ	 fdZ
d Z xZS )r   zG
    Lexer for highlighting Visual Basic.net within ASP.NET pages.
    zaspx-vbr  r  r$   c                 R     t                      j        t          t          fi | d S r  )r  r   r   r  r  s     r   r   zVbNetAspxLexer.__init__Q  s+    %5AAAAAAAr   c                     t          j        d| t           j                  dS t          j        d| t           j                  dS d S )NzPage\s*Language="Vb"r  zscript[^>]+language=["\']vbr  r  r  s    r   r  zVbNetAspxLexer.analyse_textT  r  r   r  r  s   @r   r   r   E  s~          DkGKKKII
:CMB B B B B      r   r   c                   p   e Zd ZdZdZdZddgZg dZdgZd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j        e          fd eej        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j                  fd& eeeej                  fd' eeeeeej                   fd(!                    d)"                    e
                    efd*efd+!                    d)"                    e                    e#fd,e d)e d-e e#fd(!                    d)"                    e                    e#j$        fd(!                    d)"                    e                    ej%        fd. eej&        eej&        ej&        e          fd/efd0e'j(        fd1e'j)        fd2e'j*        fd3e'j+        fd4e'j,        fd5ej-        fd6ej-        fd7efd8ej.        d#fd9ej        fdefd:efd;ej        fd<ed=fd>ed=f e/d=          gd?efd@edAfdBed=fdedfd ed!fd"ed#fdCefgdDef e0dE          dFefdGefdHed=fgdIefdGefdJefdHed=fgdIefdGefdKed=fd"efgdLZ1dM Z2dNS )Or   z,
    For the F# language (version 3.0).
    zF#zhttps://fsharp.org/fsharpzf#)z*.fsz*.fsiz*.fsxztext/x-fsharpr  )Bri   rj   assertrm   beginr   r	   ru   zdo!rv   donedowncastdowntoelifrw   r  	exceptionr{   r|   r}   r   functionfunglobalr   inheritinliner   r   r   lazyzlet!r   matchmembermodulemutabler   r   r   ofopenr   r   r   reczreturn!r   r   r   structthentor   r   typeupcastzuse!usevalr   r   r   r   zyield!r   )atomicrn   rr   	componentrs   
constraintconstructorrt   eagerry   externalr~   functorr   methodmixinobjectparallelprocessr   purer   tailcalltraitr   volatile)+rL   #rN   rY   r  r  z\*z\+,z-\.z->rU   z\.\.r  z::z:=z:>:z;;;z<-z<\]r\   z>\]r]   z\?\?z\?z\[<z\[\|z\[z\]_`z\{z\|\]z\|z\}r`   z<@@z<@ra   z@>z@@>z[!$%&*+\./:<=>?@^|~-])r   r   r   z[!?~]z[=<>@^|&+\*/$%-])sbytebytechar	nativeint
unativeintfloat32singlefloatdoubleint8uint8int16uint16int32uint32int64uint64decimalunitboolr  r   exnobjrx   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  r  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({})\brZ   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\']*:r  z[A-Z][\w\']*(?=\s*\.)z[A-Z][\w\']*r   z[a-z_][\w\']*z	[^(*)@"]+z\(\*r  z\*\)z[(*)@]z[^\\"]+escape-sequencez\\\nrE   z"B?r  r  z"""B?)r  r   r	  r"  r  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  s2     4<<dNF4<<dNFr   N)3r   r   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   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   \  sH         D
CG***I !IM
 
 
H     H  G )I)))NK$J  J !&-0FM*!6=1!6=1	
1
Z 1
4<./1
 1^X'1

 !$'1
 hhvz:>>?1
 XXgnjAAB1
 GY/1
 FI&1
 VU#1
 68$1
 -Xgz4>::<1
  $Xgz4=99;!1
$ #Xgz4:668%1
( 7Xgz4dmLLN)1
,  2 233W=-1
. .t4/1
0 ^^CHHW--..911
2 :*99{99i998D31
4  8 8998=I51
6  4 455w|D71
8 LXgoz7?oz3 3491
@ t$A1
D .v~>E1
F >vzJG1
H /
;I1
J -fj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,GFOO
 7#gw'gv&FI&VU#68$ 	
  G%&&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d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                    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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./          efd0ej)        fd1 eee          d2fd3ez   d4z    eej        j        e          fd5 eeej        j         ee                    fd6ez   d7z   ez   d8z    e ee          ej        j         ee          ej*         ee                    fd9ez   d8z    e ee          ej        j         ee                    f e$ed:/          ej        j+        f e$ed:/          ej        j+        feefgeej        d;f e,d;          gd:e d;fd3ez   d<z   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-referencexppzx++z*.xppz2.15r4   r'   r(   r)   r*   r5   r+   r6   r7   r.   r/   r0   r1   r2   r3    )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`   ra   )_ri   anytyperj   rk   ascatavgrn   
breakpointro   byrefrp   rq   changecompanyclient	containerrt   countcrosscompanyr	   ru   delete_fromdescdisplaydivrv   editrw   elementeventhandlerexistsr|   final	firstfast	firstonlyfirstonly10firstonly100firstonly1000flushr   forceliteralsforcenestedloopforceplaceholdersforceselectorder	forupdater   r   r   insert_recordsetr   r   r   likemaxofminofmodr   nextnofetch	notexistsr   optimisticlockorderouterpausepessimisticlockprintr   r   r   repeatablereadretryr   reverser   serversettingr   sumr  r   	tablelockr   r   r   r   ttsabortttsbegin	ttscommitupdate_recordsetvalidtimestater   r   r   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logNr  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]*?)(\])rA   rB   z//[^\n]*?\nz/[*][^\n]*?[*]/rE   rb   z[()\[\];:,.#@]rc   rd   re   rf   rg   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   	XPP_CHARSreplace	OPERATORSKEYWORDSRUNTIME_FUNCTIONSCOMPILE_FUNCTIONSr   r   r   r   r   r   r   r   r   r   r  r  r   r   r   r   r
   r   r   r   r   r  PropertyMagicr	   r  r	  r   r   r    r      s         D
oCenG	IMLEtT4tTBBCEIJ%dD$dD&*D$dD DD GKKI !!&&11II
bHN	L F
 *88Jt+U+UV	) -  !$ UU4[[$-#% %&
 (*dndmNacgcq)r)rs*%((4445W^,!23JU9x(,h7,k"v&16:v{+45;=U8E***G4;W\J6*8U8UW^_)^G#XXdm.A;%O%OP/*dmFY[`[`ae[f[f1g1ghi'6y@Ltdm&955;;W\W\]aWbWbcce i'3tdm&955;;GGIU$Y7779LMU$Y7779LMI%
N 
F+GFOO

 f%9_x'@
W/ /FFFr   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   r  r   r   r   r    r	  r   r   <module>r@     s    
			                                       5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ( ( ( ( ( ( % % % % % % ) ) ) ) ) )K K KT- T- T- T- T-* T- T- T-nn n n n n: n n nbB B B B Bz B B BJm m m m m m m m`    z   2    o   ,    _   .^ ^ ^ ^ ^* ^ ^ ^Bl l l l lz l l l l lr   