Your IP : 216.73.216.196


Current Path : /opt/alt/python27/lib/python2.7/site-packages/pygments/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pygments/filter.pyo

�
Y-Qc@sKdZdd�Zd�Zdefd��YZdefd��YZdS(s�
    pygments.filter
    ~~~~~~~~~~~~~~~

    Module that implements the default filter.

    :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
cs3�fd�}x|D]}|||�}qW|S(s�
    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`.
    c3s&x|j�|�D]}|VqWdS(N(tfilter(tfilter_tstreamttoken(tlexer(s@/opt/alt/python27/lib/python2.7/site-packages/pygments/filter.pyt_applys((RtfiltersRRR((Rs@/opt/alt/python27/lib/python2.7/site-packages/pygments/filter.pyt
apply_filters
s
cCs7t|jtfi|d6t|d�d6|jd6�S(s�
    Decorator that converts a function into a filter::

        @simplefilter
        def lowercase(lexer, stream, options):
            for ttype, value in stream:
                yield ttype, value.lower()
    tfunctiont
__module__t__doc__(ttypet__name__tFunctionFiltertgetattrR
(tf((s@/opt/alt/python27/lib/python2.7/site-packages/pygments/filter.pytsimplefilters	tFiltercBs eZdZd�Zd�ZRS(sl
    Default filter. Subclass this class or use the `simplefilter`
    decorator to create own filters.
    cKs
||_dS(N(toptions(tselfR((s@/opt/alt/python27/lib/python2.7/site-packages/pygments/filter.pyt__init__1scCs
t��dS(N(tNotImplementedError(RRR((s@/opt/alt/python27/lib/python2.7/site-packages/pygments/filter.pyR4s(RR	R
RR(((s@/opt/alt/python27/lib/python2.7/site-packages/pygments/filter.pyR+s	R
cBs&eZdZdZd�Zd�ZRS(s�
    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.
    cKs<t|d�s(td|jj��ntj||�dS(NRs%r used without bound function(thasattrt	TypeErrort	__class__RRR(RR((s@/opt/alt/python27/lib/python2.7/site-packages/pygments/filter.pyRAsccs8x1|j|||j�D]\}}||fVqWdS(N(RR(RRRtttypetvalue((s@/opt/alt/python27/lib/python2.7/site-packages/pygments/filter.pyRGs%N(RR	R
tNoneRRR(((s@/opt/alt/python27/lib/python2.7/site-packages/pygments/filter.pyR
8s	N(R
RRRtobjectRR
(((s@/opt/alt/python27/lib/python2.7/site-packages/pygments/filter.pyt<module>
s