
    |e                     l    d Z ddlZddl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 dgZ G d de      Zy)z
    pygments.lexers.carbon
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for the Carbon programming language.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)
RegexLexerbygroupswords)	TextCommentOperatorKeywordNameStringNumberPunctuation
WhitespaceCarbonLexerc                      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fd	efd
efdej                   fdej"                  fdej&                  fdej(                  f edd      efdej,                  fdej.                  fdej0                  fdej4                  fdej6                  fdej8                  fdej:                  fdej<                  fdefdej@                  fde!fde"fde#jH                  fgiZ%d Z&y )!r   z8
    For Carbon source.

    .. versionadded:: 2.15
    Carbonz.https://github.com/carbon-language/carbon-langz*.carboncarbonztext/x-carbonrootz\nz\s+z\\\nz	//(.*?)\nz/(\\\n)?[*].*?[*](\\\n)?/z((package|import|api|namespace|library)\bzg(abstract|alias|fn|class|interface|let|var|virtual|external|base|addr|extends|choice|constraint|impl)\b)asornotandbreakcontinuecasedefaultifelse
destructorforforallwhilewheretheninisreturnreturnedfriendpartialprivate	protectedobserveSelfoverridefinalmatchtypelikez\b)suffixz(self)\bz(true|false)\bzA(auto|bool|string|i8|i16|i32|i64|u8|u16|u32|u64|f8|f16|f32|f64)\bz[0-9]*[.][0-9]+z0b[01]+z0o[0-7]+z0x[0-9a-fA-F]+z[0-9]+z"(\\.|[^"\\])*"z\'(\\.|[^\'\\])\'zm<<=|>>=|<<|>>|<=|>=|\+=|-=|\*=|/=|\%=|\|=|&=|\^=|&&|\|\||&|\||\+\+|--|\%|\^|\~|==|!=|::|[.]{3}|->|=>|[+\-*/&]z[|<>=!()\[\]{}.,;:\?]z
[^\W\d]\w*c                     d}d| v r|dz  }d| v r|dz  }d| v r|dz  }d| v r|dz  }d| v r|dz  }d| v r|dz  }d	| v r|dz  }d
| v r|dz  }d| v r|dz  }d| v r|dz  }|S )Nr   r    g?r1   r-   r,   packagelibrarychoiceaddr
constraintimpl )textresults     8/usr/lib/python3/dist-packages/pygments/lexers/carbon.pyanalyse_textzCarbonLexer.analyse_textJ   s    tcMFT>cMFT>cMFcMFcMFcMFtcMFT>cMF4cMFT>cMF    N)'__name__
__module____qualname____doc__nameurl	filenamesaliases	mimetypesre	MULTILINEDOTALLflagsr   r   r   Single	Multiliner	   	NamespaceDeclarationr   PseudoConstantTyper   DoubleBinOctHexIntegerr   Charr   r   r
   Othertokensr?   r;   r@   r>   r   r      sm   
 D
:CIjG !ILL299$E 	JZ dO7>>*)7+<+<=8':K:KL<=D=P=PR  B KP	Q SZ	[
 '..) 0 01"#*<<1  /$&**%

+'(!6;;/@AIK%{3DJJ'I%
'FRr@   )rD   rJ   pygments.lexerr   r   r   pygments.tokenr   r   r   r	   r
   r   r   r   r   __all__r   r;   r@   r>   <module>r`      s;    
 6 6$ $ $ /M* Mr@   