+
    TBiz                         R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt . ROt	 ! R R]4      t
 ! R	 R]4      tR
tRt ! R R]4      tR# )z
pygments.formatters.other
~~~~~~~~~~~~~~~~~~~~~~~~~

Other formatters: NullFormatter, RawTokenFormatter.

:copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
)	Formatter)get_choice_opt)Token)colorizeNullFormatterRawTokenFormatterTestcaseFormatterc                   <   a  ] tR t^t o RtRtRR.tR.tR tRt	V t
R# )	r   z3
Output the text unchanged without any formatting.
z	Text onlytextnullz*.txtc                    V P                   pV F@  w  rEV'       d#   VP                  VP                  V4      4       K/  VP                  V4       KB  	  R # N)encodingwriteencode)selftokensourceoutfileencttypevalues   &&&   >/usr/lib/python3.14/site-packages/pygments/formatters/other.pyformatNullFormatter.format   s;    mm'LEell3/0e$	 (     N)__name__
__module____qualname____firstlineno____doc__namealiases	filenamesr   __static_attributes____classdictcell____classdict__s   @r   r   r      s,      DvG	I% %r   c                   F   a  ] tR t^$t o RtRtRR.tR.tRtR t	R t
R	tV tR
# )r   aI  
Format tokens as a raw representation for storing token streams.

The format is ``tokentype<TAB>repr(tokenstring)\n``. The output can later
be converted to a token stream with the `RawTokenLexer`, described in the
:doc:`lexer list <lexers>`.

Only two options are accepted:

`compress`
    If set to ``'gz'`` or ``'bz2'``, compress the output with the given
    compression algorithm after encoding (default: ``''``).
`error_color`
    If set to a color name, highlight error tokens using that color.  If
    set but with no value, defaults to ``'red'``.

    .. versionadded:: 0.11

z
Raw tokensrawtokensz*.rawFc                h   \         P                  ! V 3/ VB  R V n        \        VR. R	OR4      V n        VP                  RR4      V n        V P                  RJ d   RV n        V P                  e    \        V P                  R4       R# R#   \         d    \        RT P                  : R24      hi ; i)
asciicompress error_colorNTredzInvalid color z
 specified)r.   nonegzbz2)
r   __init__r   r   r-   getr/   r   KeyError
ValueErrorr   optionss   &,r   r4   RawTokenFormatter.__init__>   s    4+7+  &w
'@"F";;}d;t#$D'R))2. (  R >$2B2B1EZ!PQQRs   1B &B1c                  aa
  SP                  R 4       T P                  R8X  d2   ^ RIpTP	                  RR^	S4      oSP                   pSP
                  pMMT P                  R8X  d%   ^ RIpTP                  ^	4      o
T
T3R lpT
T3R lpMSP                   pSP                  pT P                  '       dQ   T FI  w  rxR	Yx3,          p	T\        P                  J d   T! \        T P                  T	4      4       KA  T! T	4       KK  	  MT F  w  rxT! R	Yx3,          4       K  	  T! 4        R#   \         d    \        R4      hi ; i)
r   z3The raw tokens formatter needs a binary output filer2   Nr.   wbr3   c                 H   < SP                  SP                  V 4      4       R # r   )r   r-   )r
   
compressorr   s   &r   r   'RawTokenFormatter.format.<locals>.write_   s    j11$78r   c                  f   < SP                  S P                  4       4       SP                  4        R # r   )r   flush)r>   r   s   r   rA   'RawTokenFormatter.format.<locals>.flushb   s!    j..01r   s   %r	%r
)r   	TypeErrorr-   gzipGzipFilecloser3   BZ2CompressorrA   r/   r   Errorr   )r   r   r   rD   r   rA   r3   r   r   liner>   s   &&f       @r   r   RawTokenFormatter.formatO   s   	+MM# ==D mmBa9GMMEMME]]e#**1-J9  MMEMME +"e^3EKK'(4#3#3T:;$K !, !,kUN23 !,C  	+ * + +	+s   D* *E)r-   r   r/   N)r   r   r   r   r    r!   r"   r#   unicodeoutputr4   r   r$   r%   r&   s   @r   r   r   $   s7     & DhG	IMR"$ $r   zG    def testNeedsName(lexer):
        fragment = %r
        tokens = [
zD        ]
        assert list(lexer.get_tokens(fragment)) == tokens
c                   :   a  ] tR t^t o RtRtR.tR tR tRt	V t
R# )r   zI
Format tokens as appropriate for a new testcase.

.. versionadded:: 2.0
Testcasetestcasec                    \         P                  ! V 3/ VB  V P                  e   V P                  R8w  d   \        R4      hR # R # )Nutf-8z*Only None and utf-8 are allowed encodings.)r   r4   r   r7   r8   s   &,r   r4   TestcaseFormatter.__init__   s?    4+7+==$')AIJJ *B$r   c           	     "   Rp. p. pV F1  w  rgVP                  V4       VP                  V RV RV: R24       K3  	  \        RP                  V4      3,          pRP                  V4      p	\        p
V P                  f    VP                  W,           V
,           4       M`VP                  VP                  R4      4       VP                  V	P                  R4      4       VP                  V
P                  R4      4       VP                  4        R# ) (z, z),
r.   NrP   z            )appendTESTCASE_BEFOREjoinTESTCASE_AFTERr   r   r   rA   )r   r   r   indentationrawbufoutbufr   r   beforeduringafters   &&&        r   r   TestcaseFormatter.format   s    'LEMM% MM[M5'E9DAB ( !BGGFO#55== MM&/E12MM&--01MM&--01MM%,,w/0r   r   N)r   r   r   r   r    r!   r"   r4   r   r$   r%   r&   s   @r   r   r      s(     
 DlGK
 r   N)r   r   r   )r    pygments.formatterr   pygments.utilr   pygments.tokenr   pygments.consoler   __all__r   r   rV   rX   r   r   r   r   <module>re      sR    ) (   %
E%I %"O	 Od
	 r   