U
    nufå  ã                   @   s   d Z dd„ ZG dd„ dƒZdS )zU
This file is about errors in Python files and not about exception handling in
Jedi.
c                 C   s   dd„ |   |¡D ƒS )Nc                 S   s   g | ]}t |ƒ‘qS © )ÚSyntaxError)Ú.0Úer   r   ú3/tmp/pip-unpacked-wheel-ol4ehs9f/jedi/api/errors.pyÚ
<listcomp>   s     z(parso_to_jedi_errors.<locals>.<listcomp>)Ziter_errors)ZgrammarZmodule_noder   r   r   Úparso_to_jedi_errors   s    r   c                   @   sX   e Zd ZdZdd„ Zedd„ ƒZedd„ ƒZedd	„ ƒZed
d„ ƒZ	dd„ Z
dd„ ZdS )r   zK
    Syntax errors are generated by :meth:`.Script.get_syntax_errors`.
    c                 C   s
   || _ d S ©N)Ú_parso_error)ÚselfZparso_errorr   r   r   Ú__init__   s    zSyntaxError.__init__c                 C   s   | j jd S )z2The line where the error starts (starting with 1).é    ©r	   Ú	start_pos©r
   r   r   r   Úline   s    zSyntaxError.linec                 C   s   | j jd S )z4The column where the error starts (starting with 0).é   r   r   r   r   r   Úcolumn   s    zSyntaxError.columnc                 C   s   | j jd S )z0The line where the error ends (starting with 1).r   ©r	   Úend_posr   r   r   r   Ú
until_line   s    zSyntaxError.until_linec                 C   s   | j jd S )z2The column where the error ends (starting with 0).r   r   r   r   r   r   Úuntil_column!   s    zSyntaxError.until_columnc                 C   s   | j jS r   )r	   Úmessager   r   r   r   Úget_message&   s    zSyntaxError.get_messagec                 C   s   d| j j| jj| jjf S )Nz<%s from=%s to=%s>)Ú	__class__Ú__name__r	   r   r   r   r   r   r   Ú__repr__)   s
    ýzSyntaxError.__repr__N)r   Ú
__module__Ú__qualname__Ú__doc__r   Úpropertyr   r   r   r   r   r   r   r   r   r   r      s   



r   N)r   r   r   r   r   r   r   Ú<module>   s   