ó
P'^c           @   s>   d  Z  d g Z d   Z d d  Z d e f d     YZ d S(   s!   Error classes used by simplejson
t   JSONDecodeErrorc         C   sU   |  j  d d |  d } | d k r2 | d } n | |  j d d |  } | | f S(   Ns   
i    i   (   t   countt   rindex(   t   doct   post   linenot   colno(    (    s3   /tmp/pip-unpacked-wheel-9xjeDh/simplejson/errors.pyt   linecol   s
    c   	      C   s   t  | |  \ } } |  j d t | | | d !  }  | d  k r^ d } | |  | | | f St  | |  \ } } d } | |  | | | | | | f S(   Ns   %ri   s   %s: line %d column %d (char %d)s8   %s: line %d column %d - line %d column %d (char %d - %d)(   R   t   replacet   reprt   None(	   t   msgR   R   t   endR   R   t   fmtt	   endlinenot   endcolno(    (    s3   /tmp/pip-unpacked-wheel-9xjeDh/simplejson/errors.pyt   errmsg   s    #c           B   s#   e  Z d  Z d d  Z d   Z RS(   sØ  Subclass of ValueError with the following additional properties:

    msg: The unformatted error message
    doc: The JSON document being parsed
    pos: The start index of doc where parsing failed
    end: The end index of doc where parsing failed (may be None)
    lineno: The line corresponding to pos
    colno: The column corresponding to pos
    endlineno: The line corresponding to end (may be None)
    endcolno: The column corresponding to end (may be None)

    c         C   s¡   t  j |  t | | | d |  | |  _ | |  _ | |  _ | |  _ t | |  \ |  _ |  _	 | d  k	 r t | |  \ |  _ |  _ n d \ |  _ |  _ d  S(   NR   (   NN(   t
   ValueErrort   __init__R   R   R   R   R   R   R   R   R
   R   R   (   t   selfR   R   R   R   (    (    s3   /tmp/pip-unpacked-wheel-9xjeDh/simplejson/errors.pyR   (   s    "				c         C   s%   |  j  |  j |  j |  j |  j f f S(   N(   t	   __class__R   R   R   R   (   R   (    (    s3   /tmp/pip-unpacked-wheel-9xjeDh/simplejson/errors.pyt
   __reduce__4   s    N(   t   __name__t
   __module__t   __doc__R
   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-9xjeDh/simplejson/errors.pyR       s   N(   R   t   __all__R   R
   R   R   R    (    (    (    s3   /tmp/pip-unpacked-wheel-9xjeDh/simplejson/errors.pyt   <module>   s   			