o
    x¡·i	  ã                   @   s€   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 g d¢ZG dd„ deƒZG dd	„ d	eƒZG d
d„ deƒZdS )zË
    pygments.lexers.diff
    ~~~~~~~~~~~~~~~~~~~~

    Lexers for diff/patch formats.

    :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)Ú
RegexLexerÚincludeÚbygroups)ÚTextÚCommentÚOperatorÚKeywordÚNameÚGenericÚLiteral)Ú	DiffLexerÚDarcsPatchLexerÚ
WDiffLexerc                
   @   sx   e Zd ZdZdZddgZddgZddgZd	d
efde	j
fde	jfde	jfde	jfde	jfde	jfdefgiZdd„ ZdS )r   z>
    Lexer for unified or context-style diffs or patches.
    ÚDiffÚdiffÚudiffz*.diffz*.patchztext/x-diffztext/x-patchÚrootz .*\nz\+.*\nz-.*\nz!.*\nz@.*\nz([Ii]ndex|diff).*\nz=.*\nú.*\nc                 C   s@   | d d… dkr
dS | d d… dkrdS | d d… dkrdS d S )	Né   zIndex: Té   zdiff é   z--- gÍÌÌÌÌÌì?© )Útextr   r   úU/home/ubuntu/.local/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/diff.pyÚanalyse_text,   s   ÿzDiffLexer.analyse_textN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesr   r
   ÚInsertedÚDeletedÚStrongÚ
SubheadingÚHeadingÚtokensr   r   r   r   r   r      s$    øÿr   c                   @   s  e Zd ZdZdZdgZddgZdZdefdefd	efd
efde	ee
eeeeejeeƒ	fde	ee
eeeeejeƒdfdejfdejfdejfdd e¡ e	ee
eƒfdejdfdejdfdefgdefdedfgdedfdefgedƒdejfdejfgedƒdejfdejfgd œZd!S )"r   zä
    DarcsPatchLexer is a lexer for the various versions of the darcs patch
    format.  Examples of this format are derived by commands such as
    ``darcs annotate --patch`` and ``darcs send``.

    .. versionadded:: 0.10
    zDarcs PatchÚdpatchz*.dpatchz*.darcspatch)ÚhunkÚaddfileÚadddirÚrmfileÚrmdirÚmoveÚreplaceú<ú>z\{z\}z/(\[)((?:TAG )?)(.*)(\n)(.*)(\*\*)(\d+)(\s?)(\])z+(\[)((?:TAG )?)(.*)(\n)(.*)(\*\*)(\d+)(\s?)ÚcommentzNew patches:zContext:zPatch bundle hash:z(\s*)(%s)(.*\n)ú|z\+Úinsertú-Údeleter   z	[^\]].*\nz\]ú#popz\nz
\[_[^_]*_]ÚspecialTextz\[z[^\n\[]+)r   r3   r9   r5   r7   N)r   r   r   r   r   r    r!   ÚDPATCH_KEYWORDSr   r   r   r	   r   r   ÚDater
   r'   Újoinr#   r$   r   r   r(   r   r   r   r   r   5   s\    ÿÿÿþ
ÿ

îþþýý
Þr   c                	   @   sà   e Zd ZdZdZdgZdgZg Zej	ej
B ZdZdZdZdZd	Zeejd
feejdfeefdefgeejdfeejdfeejdfeejdfeejfdejfgeejdfeejdfeejdfeejdfeejfdejfgdœZdS )r   a'  
    A `wdiff <https://www.gnu.org/software/wdiff/>`_ lexer.

    Note that:

    * only to normal output (without option like -l).
    * if target files of wdiff contain "[-", "-]", "{+", "+}",
      especially they are unbalanced, this lexer will get confusing.

    .. versionadded:: 2.2
    ÚWDiffÚwdiffz*.wdiffz\{\+z\+\}z\[\-z\-\]z[^{}[\]+-]+ÚinsertedÚdeletedÚ.z#pushr8   )r   r?   r@   N)r   r   r   r   r   r    r!   r"   ÚreÚ	MULTILINEÚDOTALLÚflagsÚins_opÚins_clÚdel_opÚdel_clÚnormalr
   r#   r$   r   r(   r   r   r   r   r   o   s@    

ü



ù




ù
ðr   )r   rB   Úpygments.lexerr   r   r   Úpygments.tokenr   r   r   r   r	   r
   r   Ú__all__r   r   r   r   r   r   r   Ú<module>   s   
$ :