
    &gv                     B    S r SS jrS r " S S5      r " S S\5      rg)	z
pygments.filter
~~~~~~~~~~~~~~~

Module that implements the default filter.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
Nc                 6   ^ U4S jnU H  nU" X@5      n M     U $ )z
Use this method to apply an iterable of filters to
a stream. If lexer is given it's forwarded to the
filter, otherwise the filter receives `None`.
c              3   F   >#    U R                  TU5       S h  vN   g  N7fN)filter)filter_streamlexers     1/usr/lib/python3/dist-packages/pygments/filter.py_applyapply_filters.<locals>._apply   s     >>%000s   !! )r   filtersr   r
   r   s     `  r	   apply_filtersr      s!    1( M    c                 j    [        U R                  [        4[        U S5      U R                  U S.5      $ )z
Decorator that converts a function into a filter::

    @simplefilter
    def lowercase(self, lexer, stream, options):
        for ttype, value in stream:
            yield ttype, value.lower()

__module__)r   __doc__function)type__name__FunctionFiltergetattrr   )fs    r	   simplefilterr      s5     

^-a.990  r   c                   $    \ rS rSrSrS rS rSrg)Filter)   z`
Default filter. Subclass this class or use the `simplefilter`
decorator to create own filters.
c                     Xl         g r   optionsselfr   s     r	   __init__Filter.__init__/   s    r   c                     [        5       er   )NotImplementedErrorr!   r   r   s      r	   r   Filter.filter2   s    !##r   r   N)r   r   __qualname____firstlineno__r   r"   r   __static_attributes__r   r   r	   r   r   )   s    
$r   r   c                   (    \ rS rSrSrSrS rS rSrg)r   6   z
Abstract class used by `simplefilter` to create simple
function filters on the fly. The `simplefilter` decorator
automatically creates subclasses of this class for
functions passed to it.
Nc                     [        U S5      (       d#  [        U R                  R                  < S35      e[        R
                  " U 40 UD6  g )Nr   z used without bound function)hasattr	TypeError	__class__r   r   r"   r    s     r	   r"   FunctionFilter.__init__?   s>    tZ((t~~6699UVWW((r   c              #   X   #    U R                  XU R                  5       S h  vN   g  N7fr   )r   r   r&   s      r	   r   FunctionFilter.filterD   s     =====s    *(*r   )	r   r   r(   r)   r   r   r"   r   r*   r   r   r	   r   r   6   s     H)
>r   r   r   )r   r   r   r   r   r   r   r	   <module>r4      s*   
 
$ 
$>V >r   