
                             d Z dZ G d de      Z	 ddlmZ ej                  Zy# e$ r  e       ZY ej                  Zyw xY w)at  
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.
)TokenZeroWidthEscapec                       e Zd Zd Zd Zy)
_TokenTypec                     |r|d   j                         st        j                  | |      S t        | |fz         }t	        | ||       |S )N    )isuppertuple__getattribute__r   setattr)selfvalnews      'lib/third_party/prompt_toolkit/token.py__getattr__z_TokenType.__getattr__   sF    #a&..*))$44'c3
    c                 @    d| xr dxs dz   dj                  |       z   S )Nr   . )join)r   s    r   __repr__z_TokenType.__repr__   s#    $,3,"->>r   N)__name__
__module____qualname__r   r    r   r   r   r      s    ?r   r   r   )r   N)__doc____all__r	   r   pygments.tokenr   ImportErrorr   r   r   r   <module>r      sW   
? 
?$ ''  LE ''s   $ ??