ó
±xYc           @   s`   d  Z  d Z d e f d „  ƒ  YZ y d d l m Z Wn e k
 rR e ƒ  Z n Xe j Z d S(	   st  
The Token class, interchangeable with ``pygments.token``.

A `Token` has some semantics for a piece of text that is given a style through
a :class:`~prompt_toolkit.styles.Style` class. A pygments lexer for instance,
returns a list of (Token, text) tuples. Each fragment of text has a token
assigned, which when combined with a style sheet, will determine the fine
style.
t   Tokent   ZeroWidthEscapet
   _TokenTypec           B   s   e  Z d  „  Z d „  Z RS(   c         C   sO   | s | d j  ƒ  r( t j |  | ƒ St |  | f ƒ } t |  | | ƒ | S(   Ni    (   t   isuppert   tuplet   __getattribute__R   t   setattr(   t   selft   valt   new(    (    s3   lib/python2.7/site-packages/prompt_toolkit/token.pyt   __getattr__   s
    c         C   s!   d |  r d p d d j  |  ƒ S(   NR    t   .t    (   t   join(   R   (    (    s3   lib/python2.7/site-packages/prompt_toolkit/token.pyt   __repr__   s    (   t   __name__t
   __module__R
   R   (    (    (    s3   lib/python2.7/site-packages/prompt_toolkit/token.pyR      s   	iÿÿÿÿ(   R    N(   R    R   (   t   __doc__t   __all__R   R   t   pygments.tokenR    t   ImportErrorR   (    (    (    s3   lib/python2.7/site-packages/prompt_toolkit/token.pyt   <module>	   s    